templates/admin/persona/index.html.twig line 1

Open in your IDE?
  1. {%  extends '@EasyAdmin/crud/index.html.twig' %}
  2. {% block table_body %}
  3.     {% for entity in entities %}
  4.         {% if not entity.isAccessible %}
  5.             {% set some_results_are_hidden = true %}
  6.         {% else %}
  7.             <tr data-id="{{ entity.primaryKeyValueAsString }}">
  8.                 {% if has_batch_actions %}
  9.                     <td><input type="checkbox" class="form-batch-checkbox" value="{{ entity.primaryKeyValue }}"></td>
  10.                 {% endif %}
  11.                 {% for field in entity.fields %}
  12.                     <td class="{{ field.property == sort_field_name ? 'sorted' }} text-{{ field.textAlign }} {{ field.cssClass }}" dir="{{ ea.i18n.textDirection }}">
  13.                         {% if field.property == 'tipoEntidad' %}
  14.                             {% if field.value == 0 %}
  15.                                 Preinscrito
  16.                             {% else %}
  17.                                 {{ include(field.templatePath, { field: field, entity: entity }, with_context = false) }}
  18.                             {% endif %}
  19.                         {% elseif field.property == 'activo' %}
  20.                             {% if field.value is null %}
  21.                                 Nuevo
  22.                             {% elseif field.value == false %}
  23.                                 No vigente
  24.                             {% else %}
  25.                                 Vigente
  26.                             {% endif %}
  27.                         {% else %}
  28.                             {{ include(field.templatePath, { field: field, entity: entity }, with_context = false) }}
  29.                         {% endif %}
  30.                     </td>
  31.                 {% endfor %}
  32.                 {% block entity_actions %}
  33.                     <td class="actions">
  34.                         {% if not ea.crud.showEntityActionsAsDropdown %}
  35.                             {% for action in entity.actions %}
  36.                                 {{ include(action.templatePath, { action: action, entity: entity, isIncludedInDropdown: ea.crud.showEntityActionsAsDropdown }, with_context = false) }}
  37.                             {% endfor %}
  38.                         {% else %}
  39.                             <div class="dropdown dropdown-actions">
  40.                                 <a class="dropdown-toggle btn btn-secondary btn-sm" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  41.                                     <i class="fa fa-fw fa-ellipsis-h"></i>
  42.                                 </a>
  43.                                 <div class="dropdown-menu dropdown-menu-right">
  44.                                     {% for action in entity.actions %}
  45.                                         {{ include(action.templatePath, { action: action, isIncludedInDropdown: ea.crud.showEntityActionsAsDropdown }, with_context = false) }}
  46.                                     {% endfor %}
  47.                                 </div>
  48.                             </div>
  49.                         {% endif %}
  50.                     </td>
  51.                 {% endblock entity_actions %}
  52.             </tr>
  53.         {% endif %}
  54.     {% else %}
  55.         <tr>
  56.             <td class="no-results" colspan="100">
  57.                 {{ 'datagrid.no_results'|trans(ea.i18n.translationParameters, 'EasyAdminBundle') }}
  58.             </td>
  59.         </tr>
  60.     {% endfor %}
  61.     {% if some_results_are_hidden %}
  62.         <tr class="datagrid-row-empty">
  63.             <td class="text-center" colspan="{{ entities|first.fields|length + 1 }}">
  64.                 <span class="datagrid-row-empty-message"><i class="fa fa-lock mr-1"></i> {{ 'datagrid.hidden_results'|trans({}, 'EasyAdminBundle') }}</span>
  65.             </td>
  66.         </tr>
  67.     {% endif %}
  68. {% endblock %}