list.html.twig 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {% autoescape false %}
  2. {% if data is empty %}
  3. <div class="alert alert-info" role="alert">{{ 'There is no thematic section' | get_lang }}</div>
  4. {% if is_allowed_to_edit %}
  5. <div id="no-data-view" class="tool-view">
  6. <h2>{{ "Glossary"|trans }}</h2>
  7. <img src="{{ "glossary.png"|icon(64) }}" width="64" height="64">
  8. <div class="controls">
  9. <a href="{{ _p.web_self }}?{{ _p.web_cid_query ~ "&action=addglossary" }}" class="btn btn-outline-primary">
  10. {{ "Add glossary"|trans }}
  11. </a>
  12. </div>
  13. </div>
  14. {% endif %}
  15. {% else %}
  16. <div class="glossary mt-5">
  17. {% for item in data %}
  18. <div class="item-glossary mb-4 pl-2 pr-2">
  19. {% if item.edit %}
  20. <div class="float-right">
  21. <div class="btn-group" role="group">
  22. <a href="{{ item.edit }}" class="btn btn-light btn-sm">
  23. <i class="fas fa-pencil-alt"></i>
  24. </a>
  25. <a title="{{ 'Confirm if you want to delete'|trans }}" href="{{ item.delete }}" class="btn btn-light btn-sm delete-swal">
  26. <i class="far fa-trash-alt"></i>
  27. </a>
  28. </div>
  29. </div>
  30. {% endif %}
  31. <h5 class="terms-title">{{ item.title }}</h5>
  32. {{ item.description }}
  33. </div>
  34. {% endfor %}
  35. </div>
  36. {% endif %}
  37. {% endautoescape %}