{extends "account/account-wrapper.tpl"}

{block "title"}
   <h1>{$view->getTitle()}</h1>
{/block}

{block "account-content"}
    <table class="table orders-list">
      <thead>
      <tr>
         <th>{t}Kód{/t}</th>
         <th>{t}Název{/t}</th>
         <th>{t}Platnost do{/t}</th>
         <th>{t}Uplatněn{/t}</th>
         <th>{t}Zobrazit{/t}</th>
         <th>{t}Odeslat{/t}</th>
      </tr>
      </thead>
      <tbody>
      {foreach $body.couponList as $item}
         <tr>
            <td>{$item.code}</td>
            <td>{$item.name}</td>
            <td>{$item.date_to|format_date_pretty}</td>
            <td>{if $item.used == 'Y'}Ano{else}Ne{/if}</td>
            <td><a href="{path('kupshop_bonusprogram_bonusprogramexchange_usercouponpdf', ['couponId' => $item.id])}" target="_blank">{t}Zobrazit{/t}</a></td>
            <td><a href="" data-wpj-focus="{path('kupshop_bonusprogram_bonusprogramexchange_focussendcoupon', ['couponId' => $item.id])}" data-wpj-focus-ajax="1">{t}Odeslat na e-mail{/t}</a></td>
         </tr>
      {foreachelse}
         <tr>
            <td colspan="6">{t}Žádné poukazy{/t}</td>
         </tr>
      {/foreach}
      </tbody>
   </table>
{/block}
