<!-- $Id: tracking.tt2 12726 2016-03-09 04:01:24Z sikeda $ -->
<div class="block">

<h4>[%|loc %]Message tracking[%END%]</h4>

<a href="[% 'arcsearch_id' | url_rel([list,archive_name,msgid]) %]">
  [%|loc(fromname,fromaddr,listname)%]Message from %1 %2 for list %3 [%END%]
</a>

<ul>
    <li>[%|loc(subject)%]Subject: %1[%END%]</li>
    <li>[%|loc(msgid)%]Message-Id: %1[%END%]</li>
</ul>

[% FOREACH u = tracking_info %]
  <div id="mainviewbounce[% u.envid %]" class="viewmod">
  <input style="float:right" type="button" value="X"
    onclick="return hideform('mainviewbounce[% u.envid %]')"/>
  <p>[%|loc(u.recipient)%]Recipient Email: %1[%END%]<br />
  [%|loc(u.status)%]Delivery Status: %1[%END%]<br />
  [%|loc(u.arrival_date)%]Notification Date: %1[%END%]</p>
  <p>
  <div id="viewbounce[% u.envid %]">
    [%|loc%]loading message...[%END%]
    <!-- empty div that will display a content by AJAX -->
  </div>
  </p>
  </div>
[% END %]

<table  class="listOfItems text_center">
<caption>[%|loc%]Message tracking[%END%]</caption>
  <tr><th>[%|loc%]Recipient Email[%END%]</th><th>[%|loc%]Reception Option[%END%]</th>
     <th>[%|loc%]Delivery Status[%END%]</th>
     <th>[%|loc%]Notification Date[%END%]</th>
     <th>[%|loc%]Notification[%END%]</th>
  </tr>
      
  [% FOREACH u = tracking_info %]
    [% IF dark == '1' %]
      [% SET dark = 0 %]
      <tr>
    [% ELSE %]
      <tr class="color0">
      [% SET dark = 1 %]
    [% END %]
    <td>[% u.recipient %]</td>
    <td>[%|optdesc('reception')%][% u.reception_option %][%END%]</td>
    <td>[% u.status %]</td>
    <td>[% u.arrival_date %]</td>
    <td>
    [% IF u.status %]
      <form class="noborder" style="display:inline"
        action="[% path_cgi %]" method="post">
      <input type="hidden" name="action" value="viewbounce" />
      <input type="hidden" name="list" value="[% list %]" />
      <input type="hidden" name="email" value="[% u.recipient %]" />
      <input type="hidden" name="envid" value="[% u.envid %]" />
      <input type="submit" class="MainMenuLinks"
        value="[%|loc%]view[%END%]"
        onclick="$('.viewmod').hide();$('#viewbounce[% u.envid %]').load('[% 'ajax/viewbounce' | url_rel([list,u.recipient],{envid=>u.envid}) %]').parent().show(); return false" />
      </form>
    [% ELSE %]
      &nbsp;
    [% END %]
    </td>
    </tr>
  [% END %]
</table>

</div>
<!-- end tracking.tt2 -->
