kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-08-17 11:20 pm

[dw-free] Selective Display of the Navigation Footer in Transmogrified

[commit: http://hg.dwscoalition.org/dw-free/rev/e5b457353613]

http://bugs.dwscoalition.org/show_bug.cgi?id=1516

If there are no navigation links, apply an "empty" class to the navigation
module in core2.

Patch by [personal profile] ninetydegrees.

Files modified:
  • bin/upgrading/s2layers/core2.s2
--------------------------------------------------------------------------------
diff -r 87b4265a6eb2 -r e5b457353613 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Tue Aug 17 12:22:29 2010 -0500
+++ b/bin/upgrading/s2layers/core2.s2	Tue Aug 17 18:19:53 2010 -0500
@@ -4693,8 +4693,9 @@ function RecentPage::print_body {
 
 function RecentPage::print_navigation( string{} opts ) [fixed] {
     var bool empty = $.nav.backward_url == "" and $.nav.forward_url == "";
-    """
-    <div class="navigation $opts{"class"}">
+    var string emptyclass = $empty ? "empty" : "";
+    """
+    <div class="navigation $opts{"class"} $emptyclass">
         <div class="inner">
     """;
 
@@ -5046,8 +5047,10 @@ function MonthPage::print_body {
 }
 
 function MonthPage::print_navigation( string{} opts ) [fixed] {
-    """
-    <div class="navigation $opts{"class"}">
+    var bool empty = $.prev_url == "" and $.next_url == "";
+    var string emptyclass = $empty ? "empty" : "";
+    """
+    <div class="navigation $opts{"class"} $emptyclass">
         <div class="inner"> 
             <ul>
             <form method='post' action='$.redir.url'>
@@ -5142,8 +5145,9 @@ function DayPage::print_body() {
 
 function DayPage::print_navigation( string{} opts ) [fixed] {
     var bool empty = $.prev_url == "" and $.next_url == "";
-    """
-    <div class="navigation $opts{"class"}">
+    var string emptyclass = $empty ? "empty" : "";
+    """
+    <div class="navigation $opts{"class"} $emptyclass">
         <div class="inner">
     """;
     
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org