<!-- $Id: modindex.tt2 12733 2016-03-12 22:44:21Z sikeda $ -->
<h2>[%|loc%]Listing messages to moderate[%END%] <a  href="[% 'nomenu/help/admin' | url_rel %]#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 -->
[% IF mod_message %]
[% line_count = 0 %]
[% mod_display_message = 1 %]
[% FOREACH msg = spool %]
    [% line_count = line_count + 1 %]
<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 %]

<div id="viewmod[% msg.key %]">
  [%|loc%]loading message...[%END%]
  <!-- empty div that will display a content by AJAX -->
</div>
<a class="close-reveal-modal" aria-label="Close">&#215;</a>
</div>

[% END %]

[% mod_display_message = 0 %]

 <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%]Author[%END%]</th>
	<th>[%|loc%]Subject[%END%]</th>
        <th>[%|loc%]Date[%END%]</th>
	<th>[%|loc%]Size[%END%]</th>
      </tr>	 
      [% FOREACH msg = spool %]

        [% line_count = line_count + 1 %]	
        [% IF dark == '1' %]
	  [% dark = '0' %]
	  <tr>
	[% ELSE %]
	  [% 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%]" />
	  [%- ELSE -%]&nbsp;
	  [%- END -%]
	</td>
	[%- END -%]

	  <td>
	    [% IF msg.value.gecos %]
	    [% msg.value.gecos %] &lt;[% msg.value.from %]&gt;
	    [% ELSE %]
	    [% msg.value.from %]
	    [% END %]
	  </td>
	  <td>
	    [% IF msg.value.subject == 'no_subject' %]
	      [%|loc%]No subject[%END%]
	    [% ELSE %]
	      [% msg.value.subject %]
	    [% END %]
	  </td>

	  <td>
	    [% IF msg.value.date %]
	      [% msg.value.date %]
	    [% ELSE %]
	      &nbsp;
	    [% END %]
	  </td>
	  <td>[% msg.value.size %] kb</td>
	</tr>
      [% END %] 
    </table>
[% ELSE %]
<p class="small-8 small-centered columns alert-box info text-center">[%|loc%]No messages to moderate[%END%]</p>
[% END %]
<br />
<h2>[%|loc%]Moderation management[%END%] <a  href="[% 'nomenu/help/admin' | url_rel %]#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>

<form class="noborder" action="[% path_cgi %]" method="post" name="moderation_management">
<fieldset>
  <input type="hidden" name="list" value="[% list %]" />
[% IF conf.use_blacklist != 'none' %]
   <input class="MainMenuLinks" type="submit" name="action_blacklist" value="[%|loc%]edit blacklist[%END%]" />
[% END %]
 <input class="MainMenuLinks" type="submit" name="action_manage_template" value="[%|loc%]Manage rejection messages[%END%]" />
</fieldset>
</form>
<!-- end modindex.tt2 -->
