templates/city/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{% trans %}City index{% endtrans %} {% endblock %}
  3. {% block body %}
  4. <h1>{% trans %}City index{% endtrans %}</h1>
  5. <div class='table-scrollable'>
  6. <table>
  7. <thead>
  8. <tr>
  9. <th>{% trans %}Id{% endtrans %}</th>
  10. <th>{% trans %}Name{% endtrans %}</th>
  11. <th>{% trans %}Description{% endtrans %}</th>
  12. <th>{% trans %}actions{% endtrans %}</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. {% for city in cities %}
  17. <tr>
  18. <td>{{ city.id }}</td>
  19. <td>{{ city.name }}</td>
  20. <td>{{ city.description }}</td>
  21. <td>
  22. <a href="{{ path('city_show', {'id': city.id}) }}">{% trans %}show{% endtrans %}</a>
  23. {% if is_granted('ROLE_HABITECH') %}
  24. <a href="{{ path('city_edit', {'id': city.id}) }}">{% trans %}edit{% endtrans %}</a>
  25. {% endif %}
  26. </td>
  27. </tr>
  28. {% else %}
  29. <tr>
  30. <td colspan="5">{% trans %} no records found{% endtrans %}</td>
  31. </tr>
  32. {% endfor %}
  33. </tbody>
  34. </table>
  35. </div>
  36. {% if is_granted('ROLE_HABITECH') %}
  37. <a href="{{ path('city_new') }}">{% trans %} Create new {% endtrans %}</a>
  38. {% endif %}
  39. {% endblock %}