Commit ac7698e4 authored by lumineau's avatar lumineau
Browse files

[change] Complete reorganization of message moderation interface, with action...

[change] Complete reorganization of message moderation interface, with action icons and modals, otherwise improve alert messages presentation and lisibility

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12573 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 267ffca8
......@@ -482,6 +482,24 @@ table.listOfItems td{
vertical-align:middle;
text-align:center;
}
table.listOfItems td form, table.listOfItems td form fieldset{
display:inline;
margin:0;
padding:0!important;
}
table.listOfItems td form fieldset button.action, table.listOfItems td button.action {
display: inline-block;
color: [% color_5 %];
border: none;
background: none;
font-size: inherit;
font-weight: inherit;
padding: 0;
margin: 0;
}
table.listOfItems td form fieldset button.action:hover, table.listOfItems td button.action:hover {
color: [% color_6 %];
}
table.ls_template th{
border-right: 1px solid [% color_7 %];
}
......@@ -1489,7 +1507,12 @@ h7 strong {
background-color:[% color_7 %];
border-radius: 5px;
}
#ErrorMsg .alert-box {
#ErrorMsg .alert-box, #ephemeralMsg .alert-box {
margin-bottom:0;
padding-top:1.5rem!important;
padding-bottom:1.5rem!important;
}
#ErrorMsg .alert-box form{
margin-bottom:0;
}
......@@ -1504,7 +1527,7 @@ h7 strong {
}
#ephemeralMsg {
height:50%;
height:auto;
width:50%;
position:fixed;
top:calc(50% - 0%);
......@@ -1514,17 +1537,12 @@ h7 strong {
padding: 1em 0.5em;
margin-bottom: 1.5em;
background-color: #fff;
z-index:599;
}
.alert-box {
padding-top:2rem;
padding-bottom:2rem;
font-size: 1.3rem;
text-align:center;
}
p.alert-box {
padding-top:0;
padding-bottom:0;
padding: 0.5rem 1.5rem!important;
font-size: 1rem;
}
/* to overwrite margin-left:0 for p element when *-centered is applied */
......@@ -2172,8 +2190,14 @@ span.fa-stack i.fa-plus-circle {
padding-left: 0;
}
table.listOfItems tr:nth-of-type(1) {
height:2rem!important;
}
height:2rem!important;
}
.table-wrapper table th, .table-wrapper table td{
text-align:left;
}
.table-wrapper table td i.fa-lg{
font-size:1em;
}
}
@media only screen and (max-width: 1025px){
.top-bar .title-area img {
......
<!-- $Id$ -->
[%- IF msg.value.spam_status == 'spam' -%][% idname = 'idspam' %][% therissomespam = '1' %][% ELSE %][% idname = 'id' %][% therissomeham = '1' %][% END -%]
<form class="noborder" style="display:inline" action="[% path_cgi %]" method="post" name="moderate_mail[% line_count %]"><fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="[% idname %]" value="[% msg.key %]" />
[%- IF topic_required -%]
<input class="MainMenuLinks" type="button" name="action_distribute" value="[%|loc%]Distribute[%END%]" onclick="return toggleDivDisplay('topics[% line_count %]')"/>
<div name="hiddenform" class="hiddenform" id="topics[% line_count %]" style="display:none">
<input style="float:right" type="button" name="action_distribute" value="X" onclick="return toggleDivDisplay('topics[% line_count %]')"/>
<button class="action" type="button" name="action_distribute" value="[%|loc%]Distribute[%END%]" data-reveal-id="topics[% line_count %]" data-tooltip aria-haspopup="true" title="[%|loc%]Distribute[%END%]"><i class="fa fa-share fa-lg"></i>[% IF mod_display_message %] [%|loc%]Distribute[%END%][% END %]</button>&nbsp;
<div id="topics[% line_count %]"class="reveal-modal medium" data-reveal aria-labelledby="[%|loc%]Required topic[%END%]" aria-hidden="true" role="dialog">
[%- IF request_topic -%]
<h3> [%|loc%]This list is configured to require topic(s).[%END%]</h3>
<form class="noborder" action="[% path_cgi %]" method="post" name="moderate_mail[% line_count %]" id="moderate_mail[% line_count %]">
<fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="[% idname %]" value="[% msg.key %]" />
<br />[%|loc%]Please select one or more topic(s) that correspond to the messages you wish to distribute:[%END%] <br />
[% FOREACH t = available_topics %]
<input id="topic_[%t.name%].[%line_count%]" type="checkbox" name="topic_[%t.name%]" value="1" /> <label for="topic_[%t.name%].[%line_count%]">[% t.title %] </label><br />
[%- END- %]
<br />
[%- END -%]
<input class="MainMenuLinks" type="submit" name="action_distribute" value="[%|loc%]Distribute[%END%]" onclick="return checkbox_check_topic(moderate_mail[% line_count %],'warningTopic[% line_count %]')"/>
<button type="submit" name="action_distribute" value="[%|loc%]Distribute[%END%]" onclick="return checkbox_check_topic(moderate_mail[% line_count %],'warningTopic[% line_count %]');"><i class="fa fa-share fa-lg"></i> [%|loc%]Distribute[%END%]</button>&nbsp;
<div class="formError" style="display:none" id="warningTopic[% line_count %]">
[%|loc%]You must select a topic[%END%]
<p class="alert-box alert">[%|loc%]You must select a topic[%END%]</p>
</div>
</fieldset>
</form>
<a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>
[%- ELSE -%]
<input class="MainMenuLinks" type="submit" name="action_distribute" value="[%|loc%]Distribute[%END%]" />
<form class="noborder" action="[% path_cgi %]" method="post" name="moderate_mail[% line_count %]" id="moderate_mail[% line_count %]">
<fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="[% idname %]" value="[% msg.key %]" />
<button class="action" type="submit" name="action_distribute" value="[%|loc%]Distribute[%END%]" data-tooltip aria-haspopup="true" title="[%|loc%]Distribute[%END%]"><i class="fa fa-share fa-lg"></i>[% IF mod_display_message %] [%|loc%]Distribute[%END%][% END %]</button>&nbsp;
</fieldset>
</form>
[%- END -%]
&nbsp;
<input class="MainMenuLinks" type="button" name="action_reject" value="[%|loc%]Reject[%END%]" onclick="return toggleDivDisplay('reject[% line_count %]')"/>
<div name="hiddenform" class="hiddenform" id="reject[% line_count %]" style="display:none">
<input type="hidden" name="from_modindex" value="from_modindex" />
<input style="float:right" type="button" name="action_distribute" value="X" onclick="return toggleDivDisplay('reject[% line_count %]')"/>
<button type="button" class="action" name="action_reject" value="[%|loc%]Reject[%END%]" data-reveal-id="reject[% line_count %]" data-tooltip aria-haspopup="true" title="[%|loc%]Reject[%END%]" /><i class="fa fa-trash fa-lg"></i>[% IF mod_display_message %] [%|loc%]Reject[%END%][% END %]</button>
<div id="reject[% line_count %]" class="reveal-modal medium" data-reveal aria-labelledby="[%|loc%]Rejecting message[%END%]" aria-hidden="true" role="dialog">
<h3>[%|loc%]Rejecting message[%END%]</h3>
[%|loc%]Choose notification:[%END%]
<form class="noborder" action="[% path_cgi %]" method="post" name="reject_mail[% line_count %]" id="reject_mail[% line_count %]">
<fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="[% idname %]" value="[% msg.key %]" />
<input type="hidden" name="from_modindex" value="from_modindex" />
<label>[%|loc%]Choose notification:[%END%]</label>
<select name="message_template">
<option value="reject_quiet"[%- IF msg.value.spam_status == 'spam' -%] [% one_template_is_selected = '1' %]selected="selected"[% END %]>[%|loc %]No notification[%END%]</option>
[% FOREACH file = available_files %]
......@@ -37,32 +50,45 @@
[%- END- %]
<option value="reject" [% IF one_template_is_selected != '1' %] selected="selected"[% END %]>[%|loc %]Server default rejection message[%END%]</option>
</select>
<br />
[% IF conf.reporting_spam_script_path %]
[%- IF msg.value.spam_status != 'spam' -%]
<br /> <input id="signal_spam[% line_count %]" type=checkbox name="signal_spam" /><label for="signal_spam[% line_count %]">[%|loc %]Report message as undetected spam [%END%]</label>
[% END %]
[% END %]
<br /> <input id="blacklist[% line_count %]" type=checkbox name="blacklist" /><label for="blacklist[% line_count %]">[%|loc %]Add sender to blacklist[%END%]</label>
<br />
<div class="formError" style="display:none" id="warningSpam[% line_count %]">
[%|loc%]You should rejet spams quietly because the sender of a spam is often spoofed, if you really want to send this notification, please confirm [%END%]
<input type="checkbox" name="iConfirm" value="1" />
<p class="alert-box info text-left"><input type="checkbox" name="iConfirm" value="1" /> [%|loc%]You should rejet spams quietly because the sender of a spam is often spoofed, if you really want to send this notification, please confirm [%END%]</p>
</div>
<br />
[%- IF msg.value.spam_status != 'spam' -%]
<input class="MainMenuLinks" type="submit" name="action_reject" value="[%|loc%]Reject[%END%]">
<button name="action_reject" value="[%|loc%]Reject[%END%]" title="[%|loc%]Reject[%END%]"><i class="fa fa-trash fa-lg"></i> [%|loc%]Reject[%END%]</button>
[% ELSE %]
<input class="MainMenuLinks" type="submit" name="action_reject" value="[%|loc%]Reject[%END%]" onclick="return check_reject_spam(moderate_mail[% line_count %],'warningSpam[% line_count %]')" />
<button type="submit" name="action_reject" value="[%|loc%]Reject[%END%]" onclick="return check_reject_spam(reject_mail[% line_count %],'warningSpam[% line_count %]')" title="[%|loc%]Reject[%END%]"><i class="fa fa-trash fa-lg"></i> [%|loc%]Reject[%END%]</button>
[% END %]
<br />
</fieldset>
</form>
<a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>
[% IF mod_display_message %]
<input type="button" class="MainMenuLinks" name="action_distribute" value="[%|loc%]hide[%END%]" onclick="return hideform('mainviewmod[% msg.key %]')" />
[% ELSE %]
<input type="button" class="MainMenuLinks" name="action_distribute" value="[%|loc%]view[%END%]" onclick="jQuery('.viewmod').hide();jQuery('#viewmod[% msg.key %]').load('[% path_cgi %]/ajax/viewmod/[% list %]/[% msg.key %]').parent().show()" />
[% IF !mod_display_message %]
&nbsp;<button type="button" class="action" name="action_distribute" value="[%|loc%]view[%END%]" data-tooltip aria-haspopup="true" data-reveal-id="mainviewmod[% msg.key %]" onclick="jQuery('#viewmod[% msg.key %]').load('[% path_cgi %]/ajax/viewmod/[% list %]/[% msg.key %]')" title="[%|loc%]view[%END%]"><i class="fa fa-eye fa-lg"></i></button>
[% END %]
</fieldset>
</form>
[% IF is_owner %]
[% IF msg.value.is_subscriber %]
&nbsp;
[% ELSE %]
<form class="noborder"
action="[% path_cgi %]" method="post"
name="add_frommod[% line_count %]"><fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="id" value="[% msg.key %]" />
<input type="hidden" name="from_modindex" value="from_modindex" />
<button class="action" type="submit" name="action_add_frommod"
onclick="return request_confirm('[%|loc(msg.value.from)%]Dou you really want to add %1?[%END%]');"
value="[%|loc%]Add subscribers[%END%]" data-tooltip aria-haspopup="true" title="[%|loc%]Add subscribers[%END%]"><i class="fa fa-user-plus fa-lg"></i>[% IF mod_display_message %] [%|loc%]Add subscribers[%END%][% END %]</button>
</form>
[% END %]
[% END %]
<!-- end modform.tt2 -->
<!-- $Id$ -->
[%# IF mod_total %]
<h2>[%|loc%]Listing messages to moderate[%END%] <a href="[% path_cgi %]/nomenu/help/admin#moderate" title="[%|loc%]Open in a new window[%END%]" onclick="window.open('','wws_help','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=200')" target="wws_help"><i class="fa fa-question-circle" title="[%|loc%]Help[%END%]"></i></a></h2>
<!-- moderation of messages -->
......@@ -9,16 +7,15 @@
[% mod_display_message = 1 %]
[% FOREACH msg = spool %]
[% line_count = line_count + 1 %]
<div id="mainviewmod[% msg.key %]" class="block viewmod">
<input style="float:right" type="button" name="action_distribute" value="X" onclick="return hideform('mainviewmod[% msg.key %]')"/>
<div id="mainviewmod[% msg.key %]" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3>[%|loc%]Current message[%END%]</h3>
[% PROCESS modform.tt2 %]
<p>
<div id="viewmod[% msg.key %]">
[%|loc%]loading message...[%END%]
<!-- empty div that will display a content by AJAX -->
</div>
</p>
<a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>
[% END %]
......@@ -28,11 +25,11 @@
<table class="responsive listOfItems">
<caption>[%|loc%]Listing messages to moderate[%END%]</caption>
<tr>
<th>[%|loc%]Actions[%END%]</th>
[%- IF conf.antispam_feature == 'on' -%]
<th>[%|loc%]Spam[%END%]</th>
[%- END -%]
<th>[%|loc%]Moderate[%END%]</th>
<th [% IF is_owner %]colspan="2"[%END%]>[%|loc%]Author[%END%]</th>
<th >[%|loc%]Author[%END%]</th>
<th>[%|loc%]Subject[%END%]</th>
<th>[%|loc%]Date[%END%]</th>
<th>[%|loc%]Size[%END%]</th>
......@@ -47,7 +44,9 @@
[% dark = '1' %]
<tr class="color0">
[% END %]
<td class="text-left">
[% PROCESS modform.tt2 %]
</td>
[%- IF conf.antispam_feature == 'on' -%]
<td>
[%- IF msg.value.spam_status == 'spam' -%]<img src="[% icons_url %]/junk.png" alt="[%|loc%]junk[%END%]" />
......@@ -56,10 +55,6 @@
</td>
[%- END -%]
<td style="white-space: nowrap">
[% PROCESS modform.tt2 %]
</td>
<td>
[% IF msg.value.gecos %]
[% msg.value.gecos %] &lt;[% msg.value.from %]&gt;
......@@ -67,27 +62,6 @@
[% msg.value.from %]
[% END %]
</td>
[% IF is_owner %]
<td>
[% IF msg.value.is_subscriber %]
&nbsp;
[% ELSE %]
<form class="noborder" style="display:inline"
action="[% path_cgi %]" method="post"
name="add_frommod[% line_count %]"><fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="id" value="[% msg.key %]" />
<input type="hidden" name="from_modindex" value="from_modindex" />
<input class="MainMenuLinks" type="submit"
name="action_add_frommod"
onclick="return request_confirm('[%|loc(msg.value.from)%]Dou you really want to add %1?[%END%]');"
value="[%|loc%]Add subscribers[%END%]" />
</form>
[% END %]
</td>
[% END %]
<td>
[% IF msg.value.subject == 'no_subject' %]
[%|loc%]No subject[%END%]
......@@ -110,7 +84,6 @@
[% ELSE %]
<p class="small-8 small-centered columns alert-box info text-center">[%|loc%]No messages to moderate[%END%]</p>
[% END %]
[%# END %]
<br />
<!-- moderation of document shared -->
<h2>[%|loc%]Listing of shared documents to moderate[%END%]</h2>
......@@ -174,6 +147,4 @@
<input class="MainMenuLinks" type="submit" name="action_manage_template" value="[%|loc%]Manage rejection messages[%END%]" />
</fieldset>
</form>
<!-- end modindex.tt2 -->
<!-- $Id$ -->
<form action="[% path_cgi %]" method="post" name="moderate_mail">
<fieldset>
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="id" value="[% id %]" />
<input type="hidden" name="file" value="[% file %]" />
[%- IF topic_required -%]
<input class="MainMenuLinks" type="submit" name="action_distribute" value="[%|loc%]Distribute[%END%]" onclick="return checkbox_check_topic(moderate_mail)" />
[%- ELSE -%]
<input class="MainMenuLinks" type="submit" name="action_distribute" value="[%|loc%]Distribute[%END%]" />
[%- END -%]
<input class="MainMenuLinks" type="submit" name="action_reject" value="[%|loc%]Reject[%END%]" />
<select name="message_template">
<option value="reject">[%|loc %]Default rejection message[%END%]</option>
<option value="quiet">[%|loc %]Do Not Notify[%END%]</option>
[% FOREACH file = available_files %]
<option value="reject_[% file %]"> [% file %]</option>
[%- END- %]
</select>
</fieldset>
</form>
[%- IF request_topic -%]
<form action="[% path_cgi %]" method="post" name="moderate_mail_2">
<fieldset>
<br /><br />
[%|loc%]This list is configured to require topic(s).[%END%]
<br />
<label for="topics">[%|loc%]Please select one or more topic(s) that corresponds to your message below:[%END%]</label>
<ul id="topics">
[% FOREACH t = available_topics %]
<li><input id="topic_[%t.name%]" type="checkbox" name="topic_[%t.name%]" value="1" /> <label for="topic_[%t.name%]">[% t.title %] </label></li>
[%- END- %]
</ul>
</fieldset>
</form>
[%- END -%]
[% TRY ~%]
[% html_content | eval %]
[%~ CATCH ~%]
......
Supports Markdown
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