[dw-free] Add Additional Navigational Links to Inbox and Pages
[commit: http://hg.dwscoalition.org/dw-free/rev/2f61583503c7]
http://bugs.dwscoalition.org/show_bug.cgi?id=1669
Duplicate menus once we have over 2 items (not once we have over 10)
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1669
Duplicate menus once we have over 2 items (not once we have over 10)
Patch by
Files modified:
- cgi-bin/LJ/Widget/InboxFolder.pm
- htdocs/inbox/index.bml
--------------------------------------------------------------------------------
diff -r a11dedf1db2d -r 2f61583503c7 cgi-bin/LJ/Widget/InboxFolder.pm
--- a/cgi-bin/LJ/Widget/InboxFolder.pm Wed Mar 30 04:41:25 2011 +0800
+++ b/cgi-bin/LJ/Widget/InboxFolder.pm Thu Mar 31 03:37:40 2011 +0800
@@ -86,7 +86,7 @@ sub render_body {
$page = $last_page if $page > $last_page;
my $starting_index = ($page - 1) * $page_limit;
${$opts{itemcount}} = scalar( @$nitems ) - $starting_index;
- my $duplicate_menus = ${$opts{itemcount}} >= 10;
+ my $duplicate_menus = ${$opts{itemcount}} >= 3;
my $prev_disabled = ($page <= 1) ? 'disabled' : '';
my $next_disabled = ($page >= $last_page) ? 'disabled' : '';
diff -r a11dedf1db2d -r 2f61583503c7 htdocs/inbox/index.bml
--- a/htdocs/inbox/index.bml Wed Mar 30 04:41:25 2011 +0800
+++ b/htdocs/inbox/index.bml Thu Mar 31 03:37:40 2011 +0800
@@ -186,7 +186,7 @@ body<=
itemid => $itemid,
);
- # Repeat refresh/manage links if more than 10 items on page (15 max per page)
+ # Repeat refresh/manage links if we have more than a few items (15 max per page)
$body .= qq{
<div class="inbox_newitems pkg">
<span class="esnlinks" style="float: left"><a href="$LJ::SITEROOT/inbox/?page=$page$viewarg$itemidarg"><?_ml inbox.refresh _ml?></a> |
--------------------------------------------------------------------------------

no subject
It seems to me like these should be calculated differently. The navigation bar should be linked to number of items in the inbox, but repeating the action links should depend on the length of the affected item.
no subject
The action links depends on the character length and number of newlines; the navigation bar is now (as of last commit) always showing.
no subject
Although I'm not sure the action links are working as intended; I am seeing them show up twice on notifications of one word comments.
no subject
no subject
http://changelog.dreamwidth.org/915173.html?thread=215269#cmt215269
http://changelog.dreamwidth.org/912951.html?thread=214839#cmt214839
http://changelog.dreamwidth.org/914903.html?thread=214231#cmt214231
no subject
no subject
no subject