{extends "base_full.tpl.html"}
{block title}{t 1=$smarty.get.iss_id|intval}Issue #%1 - Mail Queue{/t}{/block}

{block "content"}
{if $denied|default:'' == 1}
<div align="center">{t}Sorry, you do not have permission to view this page{/t}</div>
{else}
<form>
    <table class="bordered grid">
        <tr class="title">
            <th colspan="5">
                {capture assign="link"}<a href="{$core.rel_url}view.php?id={$issue_id}" title="{t}view issue details{/t}">{t 1=$issue_id}Issue #%1{/t}</a>{/capture}
                {t 1=$link escape=no}Mail Queue for %1){/t}
            </th>
        </tr>
        <tr>
            <th NOWRAP>{include file="expandable_cell/buttons.tpl.html" ec_id="mailqueue"}</th>
            <th width="20%">{t}Recipient{/t}</th>
            <th width="20%" nowrap>{t}Queued Date{/t}</th>
            <th width="10%">{t}Status{/t}</th>
            <th width="50%">{t}Subject{/t}</th>
        </tr>
        {section name="i" loop=$data}
        <tr class="{cycle values='odd,even'}">
            <td NOWRAP>{include file="expandable_cell/buttons.tpl.html" ec_id="mailqueue" list_id=$data[i].maq_id}</td>
            <td width="20%">{$data[i].maq_recipient|escape:"html"}</td>
            <td width="20%" nowrap>{$data[i].maq_queued_date|timeago}</td>
            <td width="10%">{$data[i].maq_status}</td>
            <td width="50%">{$data[i].maq_subject|escape:"html"}</td>
        </tr>
        {include file="expandable_cell/body.tpl.html" ec_id="mailqueue" list_id=$data[i].maq_id colspan="5"}
        {sectionelse}
        <tr>
            <td colspan="5" align="center">
                {t}No mail queue could be found.{/t}
            </td>
        </tr>
        {/section}
        <tr>
            <td colspan="5">
                <input type="button" value="&lt;&lt; Back" onClick="location.href='{$core.rel_url}view.php?id={$issue_id}';">
            </td>
        </tr>
    </table>
</form>
{/if}
{/block}
