templates/accounting/accounting_expense/_table.html.twig line 1

Open in your IDE?
  1. <div class="table-responsive">
  2.     <table class="align-middle mb-0 table table-bordered">
  3.         <thead>
  4.             <tr style="background-color: #ddd;">
  5.                 <th>Catégorie</th>
  6.                 <th>Libellé</th>
  7.                 <th>Date Début</th>
  8.                 <th>Date Fin</th>
  9.                 <th>Caisse</th>
  10.                 <th width="10%">Action</th>
  11.             </tr>
  12.         </thead>
  13.         <tbody>
  14.             <tr>
  15.                 <form 
  16.                     action="#" 
  17.                     hx-post="{{ path('accounting_expense_searh_table')}}"
  18.                     hx-trigger="load, submit delay:500ms"
  19.                     hx-target="#search-results" 
  20.                     hx-indicator="#htmx-indicator-results">
  21.                     <td>
  22.                         <select class="form-control select" name="accounting_expense_category" id="accounting_expense_category" style="width: 100%">
  23.                             <option value="0">Toutes les catégories</option>
  24.                             {% for category in accounting_expense_categories %}
  25.                                 <option value="{{ category.id }}" {% if category == accountingExpenseCategory %} selected="selected" {% endif %}>{{ category.name }}</option>
  26.                             {% endfor %}
  27.                         </select>
  28.                     </td>
  29.                     <td><input type="text" class="form-control" name="label" id="label" value="{{ label }}" placeholder="Rechercher par libellé..." style="border-bottom: 4px solid #ddd;" /></td>
  30.                     <td><input  type="date" class="form-control" name="startDate" id="startDate" value="{{ 'now'|date('Y-01-01') }}" style="border-bottom: 4px solid #ddd;" /></td>
  31.                     <td><input  type="date" class="form-control" name="endDate" id="endDate" value="{{ endDate|date('Y-m-d') }}" style="border-bottom: 4px solid #ddd;" /></td>
  32.                     <td>
  33.                         <select class="form-control select" name="checkout" id="checkout" style="width: 100%">
  34.                             <option value="0">Toutes les caisses</option>
  35.                             {% for _checkout in checkouts %}
  36.                                 <option value="{{ _checkout.id }}" {% if _checkout == checkout %} selected="selected" {% endif %}>{{ _checkout.label }} - [{{ (_checkout.cashedIn - (_checkout.spent + _checkout.paid))|number_format(0, ',', ' ') }}]</option>
  37.                             {% endfor %}
  38.                         </select>
  39.                     </td>
  40.                     <td class="text-center">
  41.                         <button class="btn btn-primary"type="submit">
  42.                             <i class="fa fa-search"></i>
  43.                         </button>
  44.                     </td>
  45.                 </form>
  46.             </tr>
  47.         </tbody>
  48.     </table>
  49.     <br>
  50.     <span class="htmx-indicator text-danger" id="htmx-indicator-results"> 
  51.         <img src="{{ asset('spinner-3.gif') }}" width="20" />
  52.         &nbsp;Recherche en cour... 
  53.     </span>
  54.     <table class="display table table-striped table-bordered">
  55.         <thead>
  56.             <tr>
  57.                 <th class="text-center" width="5%">
  58.                     <input type="checkbox" id="check-all" onclick="javascript:checkAllElt()">
  59.                 </th>
  60.                 <th width="5%">#</th>
  61.                 <th width="20%">Libellé</th>
  62.                 <th>Description</th>
  63.                 <th width="10%" class="text-center">Montant</th>
  64.                 <th width="10%" class="text-center">Etat</th>
  65.                 <th width="10%">Date</th>
  66.                 <th width="10%">Approuvé le</th>
  67.                 <th width="10%">Payé le</th>
  68.                 <th>Caisse</th>
  69.                 <th>Catégorie</th>
  70.                 <th>Créé par</th>
  71.                 <th class="text-center" width="10%">Actions</th>
  72.             </tr>
  73.         </thead>
  74.         <tbody id="search-results"></tbody>
  75.     </table>
  76. </div>
  77. <br>
  78. {# <nav aria-label="Page navigation example">
  79.     {{ knp_pagination_render(accounting_expenses) }}
  80. </nav> #}