<table class="window">
  <tr>
    <td class="content2">
      <div class="frame_center products" href="{{@URI}}">
        <div class="reload">
          <h1>{{@page_data.title}}</h1>
          <include href="pagination.htm" />
          <table width="100%">
            <tr>
              <th>Название</th>
              <th>Категория</th>
              <th>Цена</th>
              <td align="right">
                <button type="button" class="show_window" href="/products/form">
                  <i class="fa fa-plus"></i>
                  <br>
                  <div class="small">Добавить</div>
                </button>
              </td>
            </tr>
            <repeat group="{{@data}}" value="{{@d}}">
            <tr>
              <td>
                {{@d.title}}
              </td>
              <td>
                {{@d.category_title}}
              </td>
              <td align="center">
                {~@price=@d.price+(@d.price*(@d.vat/100))*max(0, @d.vat_type)~}
                {~@price=round(@price, 2)~}
                {{number_format(@price, 2)}}
              </td>
              <td class="receipts_search_buttons" align="right">
                <button type="button" class="return_receipts_button show_window" href="/messages/continue?uri={{urlencode("/products/delete?id=".@d.id)}}">
                  <i class="fa fa-times"></i>
                  <br>
                  <div class="small">Удалить</div>
                </button>
                <button type="button" class="show_window" href="/products/form?id={{@d.id}}">
                  <i class="fa fa-pen"></i>
                  <br>
                  <div class="small">Изменить</div>
                </button>
              </td>
            </tr>
            </repeat>
          </table>
          <include href="pagination.htm" />
        </div>
      </div>
    </td>
  </tr>
</table>
