[dw-free] moderated comms UI quickfixes
[commit: http://hg.dwscoalition.org/dw-free/rev/93a8bb5d5cfe]
http://bugs.dwscoalition.org/show_bug.cgi?id=1434
Add link to the moderation queue on the navbar for communities that are
moderatored.
Patch by
denise.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1434
Add link to the moderation queue on the navbar for communities that are
moderatored.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- bin/upgrading/en.dat
- cgi-bin/communitylib.pl
- cgi-bin/weblib.pl
- htdocs/community/manage.bml.text
- htdocs/community/moderate.bml
-------------------------------------------------------------------------------- diff -r defc0a54946f -r 93a8bb5d5cfe bin/upgrading/en.dat --- a/bin/upgrading/en.dat Wed Jul 22 02:33:46 2009 +0000 +++ b/bin/upgrading/en.dat Wed Jul 22 02:38:48 2009 +0000 @@ -3743,6 +3743,8 @@ web.controlstrip.links.post2=Post web.controlstrip.links.postcomm=Post to this community +web.controlstrip.links.queue=Queue + web.controlstrip.links.random=Random Journal web.controlstrip.links.recentcomments=View Recent Comments diff -r defc0a54946f -r 93a8bb5d5cfe cgi-bin/communitylib.pl --- a/cgi-bin/communitylib.pl Wed Jul 22 02:33:46 2009 +0000 +++ b/cgi-bin/communitylib.pl Wed Jul 22 02:38:48 2009 +0000 @@ -579,6 +579,10 @@ sub maintainer_linkbar { $page eq "members" ? "<strong>" . LJ::Lang::ml('/community/manage.bml.commlist.actmembers2') . "</strong>" : "<a href='$LJ::SITEROOT/community/members.bml?authas=$username'>" . LJ::Lang::ml('/community/manage.bml.commlist.actmembers2') . "</a>", + $page eq "queue" ? + "<strong>" . LJ::Lang::ml('/community/manage.bml.commlist.queue') . "</strong>" : + "<a href='$LJ::SITEROOT/community/moderate.bml?authas=$username'>" . LJ::Lang::ml('/community/manage.bml.commlist.queue' ) . "</a>", + ); my $ret .= "<strong>" . LJ::Lang::ml('/community/manage.bml.managelinks', { user => $comm->ljuser_display }) . "</strong> "; diff -r defc0a54946f -r 93a8bb5d5cfe cgi-bin/weblib.pl --- a/cgi-bin/weblib.pl Wed Jul 22 02:33:46 2009 +0000 +++ b/cgi-bin/weblib.pl Wed Jul 22 02:38:48 2009 +0000 @@ -2444,6 +2444,7 @@ sub control_strip 'learn_more' => LJ::run_hook('control_strip_learnmore_link') || "<a href='$LJ::SITEROOT/'>$BML::ML{'web.controlstrip.links.learnmore'}</a>", 'explore' => "<a href='$LJ::SITEROOT/explore/'>" . BML::ml('web.controlstrip.links.explore', { sitenameabbrev => $LJ::SITENAMEABBREV }) . "</a>", 'confirm' => "<a href='$LJ::SITEROOT/register.bml'>$BML::ML{'web.controlstrip.links.confirm'}</a>", + 'queue' => "<a href='$LJ::SITEROOT/community/moderate.bml'>$BML::ML{'web.controlstrip.links.queue'}</a>", ); if ($remote) { @@ -2663,7 +2664,14 @@ sub control_strip if ($haspostingaccess) { $ret .= "$links{post_to_community} " unless $remote->is_identity; } - $ret .= "$links{edit_community_profile} $links{edit_community_invites} $links{edit_community_members}"; + + if ( $journal->prop( 'moderated' ) ) { + $ret .= "$links{queue} "; + } else { + $ret .= "$links{edit_community_profile} "; + } + + $ret .= "$links{edit_community_invites} $links{edit_community_members}"; } elsif ($watching && $memberof) { $ret .= "$statustext{memberwatcher}<br />"; if ($haspostingaccess) { diff -r defc0a54946f -r 93a8bb5d5cfe htdocs/community/manage.bml.text --- a/htdocs/community/manage.bml.text Wed Jul 22 02:33:46 2009 +0000 +++ b/htdocs/community/manage.bml.text Wed Jul 22 02:38:48 2009 +0000 @@ -27,6 +27,8 @@ .commlist.none=<i>You are not managing any communities.</i> .commlist.post=Post + +.commlist.queue=Queue .commlist.text=Here are the communities that you manage or co-manage: diff -r defc0a54946f -r 93a8bb5d5cfe htdocs/community/moderate.bml --- a/htdocs/community/moderate.bml Wed Jul 22 02:33:46 2009 +0000 +++ b/htdocs/community/moderate.bml Wed Jul 22 02:38:48 2009 +0000 @@ -51,7 +51,7 @@ body<= return $ret; } - $ret .= LJ::maintainer_linkbar($c); + $ret .= LJ::maintainer_linkbar($c, "queue"); # use dbcm to read to minimize collisions between moderators due to replication lag my $entry = $dbcm->selectrow_hashref("SELECT * FROM modlog WHERE journalid=? AND modid=?", @@ -200,7 +200,7 @@ body<= return $ret; } - $ret .= LJ::maintainer_linkbar($c) unless LJ::did_post() && ($mode eq 'approve_do' || $mode eq 'reject_do'); + $ret .= LJ::maintainer_linkbar($c, "queue") unless LJ::did_post() && ($mode eq 'approve_do' || $mode eq 'reject_do'); my $formauth = LJ::form_auth(); --------------------------------------------------------------------------------