[dw-free] Fix inbox link in nav strip
[commit: http://hg.dwscoalition.org/dw-free/rev/2708187a1a11]
http://bugs.dwscoalition.org/show_bug.cgi?id=559
Make unread count part of the link, and don't show it if there are zero
messages.
Patch by
janinedog.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=559
Make unread count part of the link, and don't show it if there are zero
messages.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/weblib.pl
-------------------------------------------------------------------------------- diff -r 6d4924955c6d -r 2708187a1a11 cgi-bin/weblib.pl --- a/cgi-bin/weblib.pl Fri Mar 27 23:37:15 2009 +0000 +++ b/cgi-bin/weblib.pl Sat Mar 28 12:38:14 2009 +0000 @@ -2956,7 +2956,11 @@ sub control_strip ); if ($remote) { - $links{'inbox'} = "<a href='$LJ::SITEROOT/inbox'>$BML::ML{'web.controlstrip.links.inbox'}</a>"; + my $unread = $remote->notification_inbox->unread_count; + $links{inbox} .= "<a href='$LJ::SITEROOT/inbox/'>$BML::ML{'web.controlstrip.links.inbox'}"; + $links{inbox} .= " ($unread)" if $unread; + $links{inbox} .= "</a>"; + $links{'view_friends_page'} = "<a href='" . $remote->journal_base . "/read/'>$BML::ML{'web.controlstrip.links.viewreadingpage'}</a>"; $links{'add_friend'} = "<a href='$LJ::SITEROOT/manage/circle/add.bml?user=$journal->{user}'>$BML::ML{'web.controlstrip.links.addtocircle'}</a>"; if ($journal->is_syndicated || $journal->is_news) { @@ -3041,8 +3045,7 @@ sub control_strip my $logout = "<input type='submit' value=\"$BML::ML{'web.controlstrip.btn.logout'}\" id='Logout' />"; $ret .= "$remote_display $logout"; $ret .= "</div></form>\n"; - my $unread = $remote->notification_inbox->unread_count; - $ret .= "$links{'home'} $links{'post_journal'} $links{'view_friends_page'} $links{'inbox'} ($unread)"; + $ret .= "$links{'home'} $links{'post_journal'} $links{'view_friends_page'} $links{'inbox'}"; $ret .= "</td>\n"; $ret .= "<td id='lj_controlstrip_actionlinks' nowrap='nowrap'>"; --------------------------------------------------------------------------------