[dw-free] Helpful text when there are no earlier entries
[commit: http://hg.dwscoalition.org/dw-free/rev/35494aff0407]
http://bugs.dwscoalition.org/show_bug.cgi?id=2331
Add a message in the navigation section clarifying why you may have no more
entries on your read page, and style appropriately.
Patch by
ninetydegrees.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2331
Add a message in the navigation section clarifying why you may have no more
entries on your read page, and style appropriately.
Patch by
Files modified:
- bin/upgrading/s2layers/bases/layout.s2
- bin/upgrading/s2layers/compartmentalize/layout.s2
- bin/upgrading/s2layers/core2.s2
- bin/upgrading/s2layers/core2base/layout.s2
- bin/upgrading/s2layers/fluidmeasure/layout.s2
- bin/upgrading/s2layers/practicality/layout.s2
--------------------------------------------------------------------------------
diff -r e03794ee5a42 -r 35494aff0407 bin/upgrading/s2layers/bases/layout.s2
--- a/bin/upgrading/s2layers/bases/layout.s2 Mon Jan 24 10:17:18 2011 -0600
+++ b/bin/upgrading/s2layers/bases/layout.s2 Tue Jan 25 12:24:34 2011 +0800
@@ -643,6 +643,7 @@ ul ul {list-style: circle;}
.navigation li {display: inline; padding: 0 1em 0 1em; border-right: 0.083em solid $*color_page_border; }
li.page-separator {display: none;}
.navigation li + li {margin-left: -0.25em;}
+.noentries { padding: 0 1em; }
/* ====================== ENTRIES ======================= */
diff -r e03794ee5a42 -r 35494aff0407 bin/upgrading/s2layers/compartmentalize/layout.s2
--- a/bin/upgrading/s2layers/compartmentalize/layout.s2 Mon Jan 24 10:17:18 2011 -0600
+++ b/bin/upgrading/s2layers/compartmentalize/layout.s2 Tue Jan 25 12:24:34 2011 +0800
@@ -194,6 +194,25 @@ h2#subtitle {
.navigation.empty {
display: none;
}
+
+.page-read .navigation.empty {
+ display: block;
+ padding: 1em;
+ }
+
+.page-read .navigation.empty ul {
+ margin: 0;
+ padding: 0;
+ }
+
+.page-read .navigation.empty ul li {
+ margin: 0;
+ padding: 0;
+ }
+
+.page-read .noentries {
+ font-weight: normal;
+}
li.page-separator {
display: none;
@@ -601,4 +620,4 @@ div.ContextualPopup div.Inner a:link {
$userpic_css
""";
-}
\ No newline at end of file
+}
diff -r e03794ee5a42 -r 35494aff0407 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2 Mon Jan 24 10:17:18 2011 -0600
+++ b/bin/upgrading/s2layers/core2.s2 Tue Jan 25 12:24:34 2011 +0800
@@ -2483,15 +2483,24 @@ property bool all_commentsubjects {
}
property string text_noentries_recent {
- des = "Text to display when there are no entries on the recent or friends views";
+ des = "Text to display when there are no entries on the recent page";
maxlength = 255;
size = 50;
+ noui = 1;
+}
+
+property string text_noentries_read {
+ des = "Text to display when there are no entries on the reading page";
+ maxlength = 255;
+ size = 50;
+ noui = 1;
}
property string text_noentries_day {
des = "Text to display when there are no entries on the day view";
maxlength = 255;
size = 50;
+ noui = 1;
}
property string text_month_screened_comments { des = "Text to indicate there are screened comments"; }
@@ -2505,6 +2514,7 @@ set all_entrysubjects = true;
set all_entrysubjects = true;
set all_commentsubjects = false;
set text_noentries_recent = "There are no entries to display.";
+set text_noentries_read = "There are no earlier entries to display. This page displays only the most recent 1000 entries posted within the last 14 days.";
set text_noentries_day = "There were no entries on this day.";
set text_month_screened_comments = "w/ Screened";
set text_month_form_btn = "View";
@@ -4817,6 +4827,11 @@ function RecentPage::print_navigation( s
print safe """<li class="page-forward"><a href="$.nav.forward_url">""" + get_plural_phrase( $.nav.forward_count, "text_skiplinks_forward" ) + "</a></li>\n";
}
if ( not $empty ) { "</ul>"; }
+
+ if ( $this isa FriendsPage and $.nav.backward_url == "" and $opts{"class"} == "bottomnav" ) {
+ print safe """<p class="noentries">$*text_noentries_read</p>""";
+ }
+
"""
</div><!-- navigation>inner -->
</div><!-- navigation -->
diff -r e03794ee5a42 -r 35494aff0407 bin/upgrading/s2layers/core2base/layout.s2
--- a/bin/upgrading/s2layers/core2base/layout.s2 Mon Jan 24 10:17:18 2011 -0600
+++ b/bin/upgrading/s2layers/core2base/layout.s2 Tue Jan 25 12:24:34 2011 +0800
@@ -437,6 +437,9 @@ h2#pagetitle {
display: inline;
padding: 0 .5em;
}
+.noentries {
+ padding: 0 .5em;
+}
/* entries */
diff -r e03794ee5a42 -r 35494aff0407 bin/upgrading/s2layers/fluidmeasure/layout.s2
--- a/bin/upgrading/s2layers/fluidmeasure/layout.s2 Mon Jan 24 10:17:18 2011 -0600
+++ b/bin/upgrading/s2layers/fluidmeasure/layout.s2 Tue Jan 25 12:24:34 2011 +0800
@@ -241,9 +241,9 @@ position: relative; z-index: 130; }
.navigation { text-align: right; clear: both; }
.navigation ul { margin: 0;
padding: .25em;
- display: inline;
- color: $*color_entry_title; }
-.navigation li { background-color: $*color_entry_title_background;
+ display: inline; }
+.navigation li, .noentries { background-color: $*color_entry_title_background;
+ color: $*color_entry_title;
padding: .5em;
border-radius: 1em;
-moz-border-radius: 1em;
@@ -252,6 +252,14 @@ position: relative; z-index: 130; }
.navigation .page-forward { margin-left: 1em; }
.navigation a { color: $*color_entry_title; }
.navigation .page-separator { display: none; }
+
+.page-read .navigation.empty ul {
+ display: block;
+ }
+
+.page-read .navigation.empty ul li {
+ display: block;
+ }
/* entries */
.entry-wrapper { margin-top: 2em;
diff -r e03794ee5a42 -r 35494aff0407 bin/upgrading/s2layers/practicality/layout.s2
--- a/bin/upgrading/s2layers/practicality/layout.s2 Mon Jan 24 10:17:18 2011 -0600
+++ b/bin/upgrading/s2layers/practicality/layout.s2 Tue Jan 25 12:24:34 2011 +0800
@@ -301,6 +301,21 @@ h2#subtitle {
.navigation.empty {
display: none;
+ }
+
+.page-read .navigation.empty {
+ display: block;
+ padding: 10px;
+ }
+
+.page-read .navigation.empty ul {
+ margin: 0;
+ padding: 0;
+ }
+
+.page-read .navigation.empty ul li {
+ margin: 0;
+ padding: 0;
}
/*--- Sidebar ---*/
--------------------------------------------------------------------------------
