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

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

{block "account-content"}
   <table class="table orders-list">
      <thead>
      <tr>
         <th>{t}Číslo{/t}</th>
         <th>{t}Datum{/t}</th>
         <th>{t}Cena{/t}</th>
         <th class="link">&nbsp;</th>{* pozor na mobilu se skryje *}
      </tr>
      </thead>
      <tbody>
      {foreach $body.sales as $sale}
         <tr>
            <td><a href="{path('kupshop_sales_sales_sale', ['id' => $sale.id])}">{t}č.{/t} {$sale.code}</a></td>
            <td>{$sale.dateCreated|date_format:"%d. %m. %Y"}</td>
            <td>{$sale.totalPrice|format_price}</td>
            <td class="link"><a href="{path('kupshop_sales_sales_sale', ['id' => $sale.id])}">{t}Podrobnosti{/t}</a></td>
         </tr>
      {foreachelse}
         <tr>
            <td colspan="5">{t}Prozatím nemáte žádný nákup na prodejně{/t}</td>
         </tr>
      {/foreach}
      </tbody>
   </table>

    {if $body.pager.count > 1}
        {include "components/pager.tpl" pager=$body.pager}
    {/if}
{/block}
