Unverified Commit 75ebdbd5 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1219/#1220 from ikedas/dpc22/mod_count by dpc22 & ikedas

Add summary of outstanding moderation requests in "My lists" page (#1194)
parents 9585c001 5cd04142
......@@ -1027,12 +1027,13 @@ h4.letter {
padding-left: 0;
}
.item_list .item .item_content ul.my li{
.item_list .item .item_content ul.my li {
display:inline;
padding-left: 1.5rem;
}
.item_list .item .item_content ul.my li:nth-child(2){
padding-left: 1.5rem;
.item_list .item .item_content ul.my li:first-child {
padding-left: 0;
}
.item_list .item .item_content p {
......@@ -2593,8 +2594,6 @@ p.retraitita, span.retraitita {
}
.item_list .item .item_content ul.my li{
display:block;
}
.item_list .item .item_content ul.my li:nth-child(2){
padding-left:0;
}
}
......
......@@ -46,9 +46,17 @@
[% ELSE %]
<p>[%|loc(l.value.liststartdate)%]Suspended from %1 to indefinite end date[%END%]</p>
[% END %]
<a href="[% 'suboptions' | url_rel([l.key]) %]">
<i class="fa fa-pencil-square fa-lg"
title="[%|loc%](Edit)[%END%]"></i>
</a>
[% END %]
<ul class="my">
[%~ IF (l.value.is_owner || l.value.is_editor) && l.value.mod_count ~%]
<li><a href="[% 'modindex' | url_rel([l.key]) %]"><i class="fa fa-check-square"></i> [%|loc(l.value.mod_count)%]Messages held for moderation: %1[%END%]</a></li>
[%~ END %]
[% IF l.value.is_owner %]
<li><a href="[% 'review' | url_rel([l.key]) %]"><i class="fa fa-users"></i> [%|loc%]Review members[%END%]</a></li>
[% END %]
......
......@@ -14295,6 +14295,12 @@ sub _set_my_lists_info {
if $r_action =~ /do_it/i;
}
}
# Count messages in moderation queue for each list
foreach my $list (values %all_lists) {
$which->{$list->{'name'}}{mod_count} =
Sympa::Spool::Moderation->new(context => $list)->size;
}
}
 
$param->{'which'} = $which;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment