classic_session.tpl 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. {% set session_image = 'window_list.png'|img(32, row.title) %}
  2. {% for row in session %}
  3. <div class="panel panel-default">
  4. {% set collapsable = '' %}
  5. {% if not row.show_simple_session_info %}
  6. {% if row.course_list_session_style %}
  7. <div class="panel-heading">
  8. {% if row.course_list_session_style == 1 or row.course_list_session_style == 2 %}
  9. {# Session link #}
  10. {% if remove_session_url == true %}
  11. {{ session_image }} {{ row.title }}
  12. {% else %}
  13. {# Default link #}
  14. {% set session_link = _p.web_main ~ 'session/index.php?session_id=' ~ row.id %}
  15. {% if row.course_list_session_style == 2 and row.courses|length == 1 %}
  16. {# Linkt to first course #}
  17. {% set session_link = row.courses.0.link %}
  18. {% endif %}
  19. <a href="{{ session_link }}">
  20. {{ session_image }} {{ row.title }}
  21. </a>
  22. {% endif %}
  23. {% elseif row.course_list_session_style == 4 %}
  24. {{ session_image }} {{ row.title }}
  25. {% elseif row.course_list_session_style == 3 %}
  26. {# Collapsible/Foldable panel #}
  27. <a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ row.id }}"
  28. aria-expanded="false">
  29. {{ session_image }} {{ row.title }}
  30. </a>
  31. {% if row.collapsable_link %}
  32. {% if row.collapsed == 1 %}
  33. {% set collapsable = 'collapse' %}
  34. {% endif %}
  35. {% else %}
  36. {% set collapsable = 'collapse' %}
  37. {% endif %}
  38. {% endif %}
  39. {% if row.show_actions %}
  40. <div class="pull-right">
  41. <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
  42. <img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}"
  43. title="{{ "Edit"|get_lang }}">
  44. </a>
  45. </div>
  46. {% endif %}
  47. {% if row.collapsable_link %}
  48. <div class="pull-right">
  49. {{ row.collapsable_link }}
  50. </div>
  51. {% endif %}
  52. </div>
  53. {% endif %}
  54. {% if row.collapsable_link %}
  55. {% if row.collapsed == 1 %}
  56. {% set collapsable = 'collapse' %}
  57. {% endif %}
  58. {% endif %}
  59. <div class="session panel-body {{ collapsable }}" id="collapse_{{ row.id }}">
  60. <div class="row">
  61. <div class="col-md-12">
  62. {% if row.show_description %}
  63. {{ row.description }}
  64. {% endif %}
  65. <ul class="info-session list-inline">
  66. {% if row.coach_name %}
  67. <li>
  68. <i class="fa fa-user" aria-hidden="true"></i>
  69. {{ row.coach_name }}
  70. </li>
  71. {% endif %}
  72. {% if row.date %}
  73. <li>
  74. <i class="fa fa-calendar" aria-hidden="true"></i>
  75. {{ row.date }}
  76. </li>
  77. {% elseif row.duration %}
  78. <li>
  79. <i class="fa fa-calendar" aria-hidden="true"></i>
  80. {{ row.duration }}
  81. </li>
  82. {% endif %}
  83. </ul>
  84. <div class="sessions-items">
  85. {% for item in row.courses %}
  86. <div class="courses">
  87. <div class="row">
  88. <div class="col-md-2">
  89. <a href="{{ item.link }}" class="thumbnail">
  90. {{ item.html_image }}
  91. </a>
  92. </div>
  93. <div class="col-md-10">
  94. <h4>{{ item.title }}</h4>
  95. <div class="list-teachers">
  96. {% if item.coaches|length > 0 %}
  97. <img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
  98. {% for coach in item.coaches %}
  99. {{ loop.index > 1 ? ' | ' }}
  100. <a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'user_id': coach.user_id, 'session_id': row.id, 'course_id': item.real_id }|url_encode() }}"
  101. data-title="{{ coach.full_name }}" class="ajax">
  102. {{ coach.firstname }}, {{ coach.lastname }}
  103. </a>
  104. {% endfor %}
  105. {% endif %}
  106. </div>
  107. </div>
  108. {% if item.student_info %}
  109. {% if item.student_info.progress is not null or item.student_info.score is not null or item.student_info.certificate is not null %}
  110. <div class="course-student-info">
  111. <div class="student-info">
  112. {% if (item.student_info.progress is not null) %}
  113. {{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
  114. {% endif %}
  115. {% if (item.student_info.score is not null) %}
  116. {{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
  117. {% endif %}
  118. {% if (item.student_info.certificate is not null) %}
  119. {{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
  120. {% endif %}
  121. </div>
  122. </div>
  123. {% endif %}
  124. {% endif %}
  125. </div>
  126. </div>
  127. {% endfor %}
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. {% else %}
  133. <div class="panel-heading">
  134. <a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
  135. <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" alt="{{ row.title }}"
  136. title="{{ row.title }}">
  137. {{ row.title }}
  138. </a>
  139. </div>
  140. <!-- view simple info -->
  141. <div class="panel-body">
  142. <div class="row">
  143. <div class="col-md-2">
  144. <a class="thumbnail" href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
  145. <img class="img-responsive"
  146. src="{{ row.image ? _p.web_upload ~ row.image : 'session_default.png'|icon() }}"
  147. alt="{{ row.title }}" title="{{ row.title }}">
  148. </a>
  149. </div>
  150. <div class="col-md-10">
  151. <div class="info-session">
  152. <p>{{ row.subtitle }}</p>
  153. {% if row.show_description %}
  154. <div class="description">
  155. {{ row.description }}
  156. </div>
  157. {% endif %}
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. <!-- end view simple info -->
  163. {% endif %}
  164. </div>
  165. {% endfor %}