index.html.twig 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% import '@ChamiloTheme/Macros/box.html.twig' as macro %}
  2. {% block content %}
  3. {% autoescape false %}
  4. {% for message in messages %}
  5. {{ message }}
  6. {% endfor %}
  7. {% for description in listing.descriptions %}
  8. {% if not description is empty %}
  9. <div id="description_{{ description.description_type }}" class="panel panel-default"
  10. data-id="{{ description.id }}" data-c_id="{{ description.c_id }}" data-type="course_description">
  11. <div class="panel-heading">
  12. {% if is_allowed_to_edit %}
  13. <div class="pull-right">
  14. {% if session_id == description.session_id %}
  15. <a href="{{ _p.web_self }}?action=edit&amp;id={{ description.id }}&amp;{{ _p.web_cid_query }}"
  16. title="{{ 'Edit'|get_lang }}">
  17. <img src="{{ 'edit.png'|icon(22) }}"/>
  18. </a>
  19. <a href="{{ _p.web_self }}?action=delete&amp;id={{ description.id }}&amp;{{ _p.web_cid_query }}"
  20. onclick="javascript:return confirmation('{{ description.title_js }}');"
  21. title="{{ 'Delete'|get_lang }}">
  22. <img src="{{ 'delete.png'|icon(22) }}"/>
  23. </a>
  24. {% else %}
  25. <img title="{{ 'EditionNotAvailableFromSession'|get_lang }}"
  26. alt="{{ 'EditionNotAvailableFromSession'|get_lang }}"
  27. src="{{ 'edit_na.png'|icon(22) }}" width="22" height="22"
  28. style="vertical-align:middle;">
  29. {% endif %}
  30. </div>
  31. {% endif %}
  32. {{ description.title }}
  33. </div>
  34. <div class="panel-body">
  35. {{ description.content }}
  36. </div>
  37. </div>
  38. {% endif %}
  39. {% endfor %}
  40. {% endautoescape %}
  41. {% endblock %}