classic_session.tpl 8.9 KB

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