fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-03-30 07:37 pm

[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 [personal profile] fu.

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> |
--------------------------------------------------------------------------------
kareila: (Default)

[personal profile] kareila 2011-03-31 01:31 pm (UTC)(link)
Is the showing/hiding of these extra action links also affecting the showing/hiding of the Mark Read/Mark Unread/Delete Selected/Previous/Next bar that I reported in dw_maintenance?

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.
kareila: (Default)

[personal profile] kareila 2011-04-01 01:28 pm (UTC)(link)
Thanks for the clarification!

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.
kareila: (Default)

[personal profile] kareila 2011-04-04 01:49 pm (UTC)(link)
These most recent examples come from my subscription that tracks all comments made in changelog, but I'm seeing them on all the comment notifications that are still in my Inbox, which also include individually tracked posts.

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
kareila: (Default)

[personal profile] kareila 2011-04-05 04:23 am (UTC)(link)
Thank you! <3