index.tpl 1.8 KB

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