<!-- $Id: review.tt2 12734 2016-03-13 03:31:09Z sikeda $ -->
[% IF is_owner %]
<h2>[%|loc%]Manage list members[%END%] <a  href="[% 'nomenu/help/admin' | url_rel %]#manage_members" 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>

  <h3>[%|loc%]Administrative Options[%END%]</h3>
  <a class="actionMenuLinks" href="[% 'subindex' | url_rel([list]) %]">[%|loc%]Pending subscriptions[%END%]</a> 
  <a class="actionMenuLinks" href="[% 'sigindex' | url_rel([list]) %]">[%|loc%]Pending unsubscriptions[%END%]</a> 
  [% IF conf.use_blacklist != 'none' %]
    <a class="actionMenuLinks" href="[% 'blacklist' | url_rel([list]) %]">[%|loc%]Blacklist[%END%]</a>
  [% END %]
  <a class="actionMenuLinks" href="[% 'reviewbouncing' | url_rel([list]) %]">[%|loc%]Bounces[%END%]</a>
  [% IF action == 'search' %]
     <a class="actionMenuLinks" href="[% 'dump' | url_rel([list,filter]) %]">[%|loc%]Dump[%END%]</a>
  [% ELSE %]
     <a class="actionMenuLinks" href="[% 'dump' | url_rel([list,'light']) %]">[%|loc%]Dump[%END%]</a> 
  [% END %]
     <a class="actionMenuLinks" href="[% 'show_exclude' | url_rel([list]) %]">[%|loc%]Exclude[%END%]</a> 
  <br />

  [% IF may_sync %]
  <br />
  <form name="synchronize_list_members" action="[% path_cgi %]" method="post">
  <input class="MainMenuLinks" type="submit" name="action_sync_include" value="[%|loc%]Synchronize members with data sources[%END%]" onclick="show('loading'); hide('content-inner');" />
  <input type="hidden" name="list" value="[% list %]"/>
  </form>
  [% END %]
  <hr>
  <h3>[%|loc%]Subscription reminder message[%END%]</h3>
  <form class="noborder" name="synchronize_list_members" action="[% path_cgi %]" method="post">
  <input class="MainMenuLinks" type="submit" name="action_remind" value="[%|loc%]Remind all[%END%]" onclick="return request_confirm('[% FILTER escape_quote %][%|loc(total)%]Do you really want to send a subscription reminder message to the %1 subscribers?[%END%][%END%]');"/>
  <input type="hidden" name="list" value="[% list %]"/>
  </form>
  <hr>
  <h3>[%|loc%]Add Subscribers[%END%]</h3>
  <form action="[% path_cgi %]" method="post">
  <h4>[%|loc%]To add an individual user:[%END%]</h4>
  <fieldset>
   <input type="hidden" name="previous_action" value="review" />
   <input type="hidden" name="list" value="[% list %]" />
   <input type="hidden" name="action" value="add" />
   <label for="email_search">[%|loc%]Email address:[%END%]</label>
   <input id="email_search" type="text" name="email" size="35" />
    <input id="quietly" type="checkbox" name="quiet" /><label for="quietly">[%|loc%]Quiet (don't send welcome email)[%END%]</label><br />
    <input class="MainMenuLinks" type="submit" name="action_add" value="[%|loc%]Add[%END%]" />
  </fieldset>
  </form>
  <h4>[%|loc%]To add multiple users:[%END%]</h4>
  <p>[%|loc%]Click the Multiple Add button below to bulk-add users using a form.  (Alternatively, consider using a data-source such as SQL or an Active Directory Group).[%END%]
  <br /><a class="button" href="[% 'add_request' | url_rel([list]) %]">[%|loc%]Multiple add[%END%]</a>
[% END %]

<hr>
<h3>[%|loc%]Search for a User[%END%]</h3>
<form action="[% path_cgi %]" method="post"> 
<fieldset>
<input type="hidden" name="previous_action" value="review" />
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="action" value="search" />
   <label for="filter">[%|loc%]Search for a user by email address, name or part of them: [%END%]</label>
   <input title="[%|loc%]Enter a name, email or part of them[%END%]" type="text" size="18" id="filter" name="filter" value="[% filter %]" />
<input class="MainMenuLinks" type="submit" name="action_search" value="[%|loc%]Search[%END%]" />

[% IF action == 'search' %]
[% IF too_many_select %]
[%|loc%]Selection too wide, can not show selection[%END%]
[% END %]
[% END %]
</fieldset>
</form>

<hr>
<h3>[%|loc%]Subscriber Table[%END%]</h3>

<form name="myform" action="[% path_cgi %]" method="post">
<fieldset>
  <input type="hidden" name="previous_action" value="[% action %]" />
  <input type="hidden" name="previous_list" value="[% list %]" />
  <input type="hidden" name="list" value="[% list %]" />
[% IF action == 'search' %]
<h2>[%|loc(occurrence)%]%1 occurrence(s) found[%END%]</h2>
[% END %]

[% SET thosesubscribers = members %]
[% PROCESS subscriber_table.tt2 %]

[% IF action == 'search' %]	
  [% IF similar_subscribers_occurence != 0 %]
    <h2> [%|loc(similar_subscribers_occurence)%] Other similar subscriber's email(s) (%1)[%END%]</h2>
  [% SET thosesubscribers = similar_subscribers %]
  [% PROCESS subscriber_table.tt2 %]
  [% END %]
[% END %]

[% IF total != 0 %]
      [% IF is_owner %]
        <input class="MainMenuLinks" type="button" value="[%|loc%]Toggle Selection[%END%]" onclick="toggle_selection(document.myform.email)" />
	<br /><input class="MainMenuLinks" type="submit" name="action_del" value="[%|loc%]Delete selected email addresses[%END%]" onclick="return request_confirm('[%|loc%]Do you really want to unsubscribe ALL selected subscribers?[%END%]')" />
        <br /><input type="checkbox" name="quiet" /> [%|loc%]Quiet (don't send deletion email)[%END%]
      [% END %]
<hr>

   [% IF action == 'search' %]
     <h4>[%|loc%]Excluded users[%END%]</h4>
     <table  class="responsive listOfItems">
     <caption>[%|loc%]List of exclude[%END%]</caption>
      <tr>
	<th>[%|loc%]Email[%END%]</th>
        <th>[%|loc%]Since[%END%]</th>
      </tr>

      [% IF user.email %]
        [% IF exclude_users %]
          [% FOREACH exc = exclude_users %] 
            <tr class="color0">
              <td>&nbsp;[% exc.email %]&nbsp;</td>
	      <td>&nbsp;[% exc.since %]&nbsp;</td>
            </tr>
	  [% END %]
        [% END %]
      [% END %]
    </table>
   [% END %]
   </fieldset>
   </form>

[% IF action != 'search' %]
<div class="search_form">
  <form class="noborder" action="[% path_cgi %]">
  <fieldset>
  <label for="size">[%|loc%]Page size[%END%]</label>
  <input type="hidden" name="sortby" value="[% sortby %]" />
  <input type="hidden" name="action" value="review" />
  <input type="hidden" name="list" value="[% list %]" />
  <select id="size" name="size" onchange="this.form.submit();">
          <option value="[% size %]" selected="selected">[% size %]</option>
          <option value="25">25</option>
          <option value="50">50</option>
          <option value="100">100</option>
          <option value="500">500</option>
  </select>
  </fieldset>
  </form>
   [% IF prev_page %]
    <a href="[% 'review' | url_rel([list,prev_page,size,sortby]) %]"><img src="[% icons_url %]/left.png" alt="[%|loc%]Previous page[%END%]" /></a>
   [% END %]
   [% IF page %]
     [%|loc(page,total_page)%]page %1 / %2[%END%]
   [% END %]
   [% IF next_page %]
     <a href="[% 'review' | url_rel([list,next_page,size,sortby]) %]"><img src="[% icons_url %]/right.png" alt="[%|loc%]Next page[%END%]" /></a>
   [% END %]
</div>
[% END %]

[% END %]
<!-- end review.tt2 -->
