src/Products/NotificationsBundle/Resources/views/dashboard/default/broadcast_modal.html.twig line 54

Open in your IDE?
  1. {% embed '@ui2022/modal__content.html.twig' with {
  2.     title: 'Template Library',
  3. } %}
  4.     {% block body %}
  5.         <div class="table__filter">
  6.             <div class="row align-items-center">
  7.                 <div class="col-12 col-sm-auto">
  8.                     {% form_theme form '@ui2022/forms/themes/filtering.html.twig' %}
  9.                     {{ form_start(form, {
  10.                         action: path(
  11.                             app.request.attributes.get('_route'),
  12.                             app.request.attributes.get('_route_params')
  13.                         ),
  14.                         attr: {
  15.                             target: '_modal',
  16.                         },
  17.                     }) }}
  18.                         {{ form_rest(form) }}
  19.                     {{ form_end(form) }}
  20.                 </div>
  21.                 {% if type and default is not empty and default.sendable %}
  22.                     <div class="col-12 col-sm-auto ml-sm-auto">
  23.                         <a
  24.                             class="modal__skip-link text-medium"
  25.                             href="{{- path('app.notifications.dashboard.messages.create', {
  26.                                 template: default.id,
  27.                             }) -}}"
  28.                         >
  29.                             Skip and start from scratch
  30.                         </a>
  31.                     </div>
  32.                 {% endif %}
  33.             </div>
  34.         </div>
  35.         <div id="{{ form.vars.id }}__results">
  36.             {% set headers = [
  37.                 {
  38.                     title: 'Name',
  39.                     sort: 'name',
  40.                 },
  41.                 {
  42.                     title: 'Type',
  43.                     spacing: 10,
  44.                     sort: 'type',
  45.                 },
  46.                 {
  47.                     title: 'Last Modified',
  48.                     spacing: 15,
  49.                     sort: 'timestamp',
  50.                 },
  51.             ] %}
  52.             {% embed '@ui2022/table--search.html.twig' with {
  53.                 form: form,
  54.                 headers: headers,
  55.             } %}
  56.                 {% block items %}
  57.                     {% if templates is empty %}
  58.                         {% include '@ui2022/table__empty.html.twig' with {
  59.                             title: 'No templates found',
  60.                         } %}
  61.                     {% else %}
  62.                         {% for template in templates %}
  63.                             <tr>
  64.                                 {% include '@ui2022/table__item__cell--status.html.twig' with {
  65.                                     title: template.name,
  66.                                     link: path('app.notifications.dashboard.messages.create', {
  67.                                         template: template.id,
  68.                                     }),
  69.                                 } %}
  70.                                 <td>
  71.                                     {{- 'app.notifications.templates.types.%s'|format((template.urgent) ? 'urgent' : 'general')|trans -}}
  72.                                 </td>
  73.                                 <td>
  74.                                     {{- template.timestampedAt|ui_relativeDate -}}
  75.                                 </td>
  76.                             </tr>
  77.                         {% endfor %}
  78.                     {% endif %}
  79.                 {% endblock %}
  80.             {% endembed %}
  81.         </div>
  82.     {% endblock %}
  83. {% endembed %}