Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r19984: LJSUP-9738: Edit Entries, disable pagina...

Committer: mchervonniy
LJSUP-9738: Edit Entries, disable pagination link when they not needed
U   trunk/htdocs/editjournal.bml
Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-09-07 08:09:44 UTC (rev 19983)
+++ trunk/htdocs/editjournal.bml	2011-09-07 08:32:14 UTC (rev 19984)
@@ -80,8 +80,16 @@
         my $show_ad = $opts{show_ad} ? 1 : 0;
 
         $ret .= "<p class='i-qotd-nav'>";
-        $ret .=  "<a class='i-qotd-nav-prev" . (($opts{'prev'} > 0) ? "": " i-qotd-nav-prev-dis") . "' href='$LJ::SITEROOT/editjournal.bml$getextra" . ($getextra ? "&" : "?") . "start_from=$opts{prev}'>prev</a>";
-        $ret .= "<a class='i-qotd-nav-next' href='$LJ::SITEROOT/editjournal.bml$getextra" . ($getextra ? "&" : "?") . "start_from=$opts{next}'>next</a>";
+        if ($opts{'prev'}) {
+            $ret .=  "<a class='i-qotd-nav-prev' href='$LJ::SITEROOT/editjournal.bml$getextra" . ($getextra ? "&" : "?") . "start_from=$opts{prev}'>prev</a>";
+        } else {
+            $ret .=  "<span class='i-qotd-nav-prev i-qotd-nav-prev-dis'>prev</span>";
+        }
+        if ($opts{'next'}) {
+            $ret .= "<a class='i-qotd-nav-next' href='$LJ::SITEROOT/editjournal.bml$getextra" . ($getextra ? "&" : "?") . "start_from=$opts{next}'>next</a>";
+        } else {
+            $ret .= "<span class='i-qotd-nav-next i-qotd-nav-next-dis'>next</span>";
+        }
         $ret .= "</div>"
 
             if @res;

Tags: bml, fiskus_boulder, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments