templates/SalesJournal/index.html.twig line 1

Open in your IDE?
  1. {% extends 'layout.html.twig' %}
  2. {% trans_default_domain 'PotentialCustomerCompany' %}
  3. {% block title %}{{ 'ui.sales_journals' | trans }}{% endblock %}
  4. {% block body %}
  5.     <div class="container">
  6.         <div class="row">
  7.             <div class="col-xs-12">
  8.                 <div class="page-header">
  9.                     <h1>{{ 'ui.sales_journals' | trans }}</h1>
  10.                 </div>
  11.                 <div class="btn-toolbar">
  12.                     <div class="btn-group pull-right">
  13.                         <a href="{{ path('app.sales_journal.create') }}" class="btn btn-primary" title="{{ 'ui.create' | trans }}"><i class="fa fa-plus"></i> {{ 'ui.create' | trans }}</a>
  14.                     </div>
  15.                     <div class="btn-group pull-right">
  16.                         <a href="{{ path('app.sales_journal.print_all') }}" target="_blank" class="btn btn-default" title="{{ 'ui.print' | trans({}, 'app') }}"><i class="fa fa-print"></i> {{ 'ui.print' | trans({}, 'app') }}</a>
  17.                     </div>
  18.                 </div>
  19.                 <table id="customer-list" class="table">
  20.                     <thead>
  21.                     <tr>
  22.                         <th>#</th>
  23.                         <th>{{ 'property.name' | trans }} / VAR / {{ 'property.notes' | trans }}</th>
  24.                         <th>{{ 'property.contacts' | trans }}</th>
  25.                         <th style="min-width: 170px;"></th>
  26.                     </tr>
  27.                     </thead>
  28.                     <tbody>
  29.                     {% for company in companies %}
  30.                         <tr id="company-{{ company.id }}">
  31.                             <td>{{ company.id }}</td>
  32.                             <td>
  33.                                 <p><strong>{{ company.name }}</strong></p>
  34.                                 <p>
  35.                                     {% if company.company is null %}
  36.                                         {% if is_granted('create', newVar) %}
  37.                                             <a href="{{ path('app.sales_journal.create_var', {'company': company.id}) }}" class="btn btn-default btn-sm">{{ 'ui.create_var' | trans }}</a>
  38.                                         {% else %}
  39.                                             <i>{{ 'ui.no_var' | trans }}</i>
  40.                                         {% endif %}
  41.                                     {% else %}
  42.                                         <a href="{{ path('app.company.update', {'company': company.company.id}) }}">{{ company.company.name }} &raquo;</a>
  43.                                     {% endif %}
  44.                                 </p>
  45.                                 <p>{{ company.notes | nl2br }}</p>
  46.                             </td>
  47.                             <td>
  48.                                 {% for contact in company.contacts %}
  49.                                     <p>
  50.                                         {{ contact.name }}{% if contact.role is not null %}, {{ contact.role }}{% endif %}{% if contact.email is not null %}<br/> {{ contact.email }}{% endif %}{% if contact.phone is not null %}<br/> {{ contact.phone }}{% endif %}
  51.                                     </p>
  52.                                 {% endfor %}
  53.                             </td>
  54.                             <td>
  55.                                 <div class="btn-toolbar pull-right">
  56.                                     <div class="btn-group btn-group-sm">
  57.                                         <a href="{{ path('app.sales_journal.print', {'company': company.id}) }}" target="_blank" class="btn btn-default" title="{{ 'ui.print' | trans({}, 'app') }}"><i class="fa fa-print"></i></a>
  58.                                     </div>
  59.                                     <div class="btn-group btn-group-sm">
  60.                                         <a href="{{ path('app.sales_journal.update', {'company': company.id}) }}" class="btn btn-default" title="{{ 'ui.update' | trans }}"><i class="fa fa-pencil"></i></a>
  61.                                         <button class="btn btn-danger delete" data-message="{{ 'ui.delete_confirm' | trans({'%name%': company.name}) }}" data-url="{{ path('app.sales_journal.delete', {'company': company.id}) }}"><i class="fa fa-trash-o"></i></button>
  62.                                     </div>
  63.                                 </div>
  64.                             </td>
  65.                         </tr>
  66.                     {% endfor %}
  67.                     </tbody>
  68.                 </table>
  69.             </div>
  70.         </div>
  71.     </div>
  72. {% endblock %}
  73. {% block stylesheets %}
  74.     <style type="text/css">
  75.         #customer-list .item.address td:first-child,
  76.         #customer-list .item.customer td:first-child {
  77.             padding-left: 20px;
  78.         }
  79.     </style>
  80. {% endblock %}
  81. {% block javascripts %}
  82.     <script type="text/javascript">
  83.         $(document).ready(function () {
  84.             initList('customer-list');
  85.         });
  86.     </script>
  87. {% endblock %}