{% extends '@TigrisBase/admin/layout.html.twig' %} {% block title %}{{ (transPrefix ~ '.list')|trans }}{% endblock %} {% block main %} {% embed '@TigrisBase/decorators/_card.html.twig' with {'class': ''} %} {% block header %} {% if 'create' in actions %} {{ '.icon-plus'|parse_icons }}{{ (transPrefix ~ '.add.add')|trans }} {% endif %} {% if 'sort' in actions %} {{ '.icon-sort'|parse_icons }}{{ (transPrefix ~ '.sort.sort')|trans }} {% endif %} {% endblock %} {% block body %}
{% endblock %} {% block table %} {% for key, value in values %} {% if value is iterable %} {% set label = value.label is defined ? value.label : key %} {% set value = key %} {% else %} {% set label = value %} {% endif %} {% endfor %} {% for key, value in values %} {% if value is iterable %} {% if value.format is defined %} {% if value.format == 'datetime' %} ${ $filters.formatDate(entity.{{ key }}) } {% elseif value.format == 'date' %} ${ $filters.formatDate(entity.{{ key }}, 'LL') } {% elseif value.format == 'price' %} ${ $filters.currency(entity.{{ key }}) } {% elseif value.format == 'boolean' %} {{ 'yes'|trans }} {{ 'no'|trans }} {% else %} ${ entity.{{ key }} } {% endif %} {% elseif value.value is defined %} ${ entity.{{ value.value }} } {% else %} ${ entity.{{ key }} } {% endif %} {% else %} ${ entity.{{ value }} } {% endif %} {% endfor %}
{{ 'actions'|trans }}
{% for action in actions %} {% if action == 'delete' %} {{ '.icon-trash'|parse_icons }} {% elseif action == 'update' %} {{ '.icon-pencil-alt'|parse_icons }} {% endif %} {% endfor %}
{% endblock %} {% block footer %} {% endblock %} {% endembed %}
{% endblock %}