File "admin-flyers-products.tmpl"

Full Path: /srv/www/www.cadoro.it/src/templates/admin-flyers-products.tmpl
File size: 3.38 KB
MIME-type: text/html
Charset: utf-8

{extends file='layout-admin.tmpl'}
<html>
  <body>
    {block name="breadcrumbs"}
    <div class="breadcrumbs">
      <a href="{$base_url}/admin/flyers">Volantini</a> <span class="divider">&raquo;</span>
      <strong>{$flyer.title}</strong>
    </div>
    {/block}
    {block name="content"}
    <div class="sheet">
      <div class="sheet-header">
        <h1>
          Prodotti volantino
          <small>{$flyer.title}</small>
        </h1>
      </div>
      <div class="sheet-body">
        <form method="get" action="" class="form-search well">
          <input type="text" name="q" class="form-control searchquery" value="{_fr('q')}" data-behaviour="autofocus" autocomplete="off">
          <select name="filter" class="form-control" style="display: inline-block; width: auto;">
            <option value="">Tutti i prodotti</option>
            <option value="missing-image"{if $params.filter eq 'missing-image'} selected="selected"{/if}>Foto mancanti</option>
            <option value="homepage"{if $params.filter eq 'homepage'} selected="selected"{/if}>Mostra in home page</option>
          </select>
          <button type="submit" class="btn btn-default">Cerca</button>
          <a href="{$base_url}/admin/flyers/add" class="btn btn-primary pull-right"><i class="glyphicon glyphicon-plus"></i> Nuovo elemento</a>
        </form>
        <div class="table-responsive">
          <table class="table table-bordered table-striped">
            <thead>
              <tr>
                <th>Codice</th>
                <th>Immagine</th>
                <th>Titolo</th>
                <th>Offerta dal</th>
                <th>Offerta al</th>
                <th>Homepage</th>
                <th style="width: 180px;">Azioni</th>
              </tr>
            </thead>
            <tbody>
              {foreach $products as $product}
              <tr>
                <td><a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}">{$product.code}</a></td>
                <td style="width: 64px; text-align: center;">
                  <a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}">
                    <img src="{$base_url}/assets/{$product.image_thumb}" style="width: 64px;" alt="">
                  </a>
                </td>
                <td><a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}">{$product.title}</a></td>
                <td><a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}">{_dd($product.date_begin)}</a></td>
                <td><a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}">{_dd($product.date_end)}</a></td>
                <td>
                  <input type="checkbox" data-id="{$product.id}"{if $product.homepage} checked="checked"{/if} data-behaviour="toggle-homepage">
                  <span class="label label-success msg" style="vertical-align: -2px;"></span>
                </td>
                <td>
                  <a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}/edit" class="btn btn-default btn-xs">MODIFICA</a>
                  <a href="{$base_url}/admin/flyers/{$flyer.id}/products/{$product.id}/delete" class="btn btn-default btn-xs btn-danger">ELIMINA</a>
                </td>
              </tr>
              {/foreach}
            </tbody>
          </table>
        </div>
        {include "admin-pagination.tmpl"}
      </div>
    </div>
    {/block}
  </body>
</html>