Add link back to journal if there are no next/previous entries

        Patch by afuna. 

diffs (27 lines):

diff -r 6c310c7f0c2d -r 0d5bd5532722 htdocs/go.bml
--- a/htdocs/go.bml     Sat Nov 21 15:18:14 2009 +0000
+++ b/htdocs/go.bml     Sat Nov 21 15:28:09 2009 +0000
@@ -55,11 +55,13 @@
      
      if ($GET{'dir'} eq "next") {
          $jumpid = LJ::get_itemid_after2($u, $itemid);
-         $body = $ML{'.error.noentry.next'};
+         $body = "<p>$ML{'.error.noentry.next'}</p>";
      } elsif ($GET{'dir'} eq "prev") {
          $jumpid = LJ::get_itemid_before2($u, $itemid);
-         $body = $ML{'.error.noentry.prev'};
+         $body = "<p>$ML{'.error.noentry.prev'}</p>";
      }
+
+    $body .= "<p>" . BML::ml( '.link.to.journal', { journal => 
$u->ljuser_display } ) . "</p>";
 
      if ($jumpid) {
          return BML::redirect(LJ::journal_base($u) . "/$jumpid.html");
diff -r 6c310c7f0c2d -r 0d5bd5532722 htdocs/go.bml.text
--- a/htdocs/go.bml.text        Sat Nov 21 15:18:14 2009 +0000
+++ b/htdocs/go.bml.text        Sat Nov 21 15:28:09 2009 +0000
@@ -13,3 +13,4 @@
 
 .error.usernotfound=User not found.
 
+.link.to.journal=Go back to [[journal]].
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to