session.tpl 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <div class="panel panel-default">
  2. {% if not session.show_simple_session_info %}
  3. {% set collapsable = '' %}
  4. <div class="panel-heading">
  5. {% if session.course_list_session_style == 1 %}
  6. {# Classic #}
  7. <a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ session.id }}">
  8. <img id="session_img_{{ session.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ session.title }}" title="{{ session.title }}" />
  9. {{ session.title }}
  10. </a>
  11. {% elseif session.course_list_session_style == 2 %}
  12. {# No link #}
  13. <img id="session_img_{{ session.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ session.title }}" title="{{ session.title }}" />
  14. {{ session.title }}
  15. {% elseif session.course_list_session_style == 3 %}
  16. {# Foldable #}
  17. <a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ session.id }}" aria-expanded="false" >
  18. <img id="session_img_{{ session.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ session.title }}" title="{{ session.title }}" />
  19. {{ session.title }}
  20. </a>
  21. {% set collapsable = 'collapse' %}
  22. {% endif %}
  23. {% if session.show_actions %}
  24. <div class="pull-right">
  25. <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ session.id }}">
  26. <img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}" />
  27. </a>
  28. </div>
  29. {% endif %}
  30. </div>
  31. {% endif %}
  32. <div class="sessions panel-body {{ collapsable }}" id="collapse_{{ session.id }}">
  33. {% if session.show_simple_session_info %}
  34. <div class="row">
  35. <div class="col-md-7">
  36. <h3>
  37. {{ session.title ~ session.notifications }}
  38. </h3>
  39. {% if session.show_description %}
  40. <div>
  41. {{ session.description }}
  42. </div>
  43. {% endif %}
  44. {% if session.subtitle %}
  45. <small>{{ session.subtitle }}</small>
  46. {% endif %}
  47. {% if session.teachers %}
  48. <h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ session.teachers }}</h5>
  49. {% endif %}
  50. {% if session.coaches %}
  51. <h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ session.coaches }}</h5>
  52. {% endif %}
  53. </div>
  54. {% if session.show_actions %}
  55. <div class="col-md-5 text-right">
  56. <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ session.id }}">
  57. <img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}">
  58. </a>
  59. </div>
  60. {% endif %}
  61. </div>
  62. {% else %}
  63. <div class="row">
  64. <div class="col-md-12">
  65. {% if session.subtitle %}
  66. <div class="subtitle-session">
  67. <em class="fa fa-clock-o"></em> {{ session.subtitle }}
  68. </div>
  69. {% endif %}
  70. {% if session.show_description %}
  71. <div class="description-session">
  72. {{ session.description }}
  73. </div>
  74. {% endif %}
  75. <div class="sessions-items">
  76. {% for item in session.courses %}
  77. <div class="row">
  78. <div class="col-md-2">
  79. {% if item.link %}
  80. <a href="{{ item.link }}" class="thumbnail">{{ item.icon }}</a>
  81. {% else %}
  82. {{ item.icon }}
  83. {% endif %}
  84. </div>
  85. <div class="col-md-10">
  86. {{ item.title }}
  87. {% if item.coaches|length > 0 %}
  88. <img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
  89. {% for coach in item.coaches %}
  90. {{ loop.index > 1 ? ' | ' }}
  91. <a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'user_id': coach.user_id}|url_encode() }}" data-title="{{ coach.full_name }}" class="ajax">
  92. {{ coach.full_name }}
  93. </a>
  94. {% endfor %}
  95. {% endif %}
  96. </div>
  97. </div>
  98. {% endfor %}
  99. </div>
  100. </div>
  101. </div>
  102. {% endif %}
  103. </div>
  104. </div>