classic_session.tpl 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. {% set session_image = 'window_list.png'|img(32, row.title) %}
  2. {% for row in session %}
  3. <div class="panel panel-default">
  4. {% if not row.show_simple_session_info %}
  5. {% set collapsable = '' %}
  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. </div>
  39. {% endif %}
  40. <div class="session panel-body {{ collapsable }}" id="collapse_{{ row.id }}">
  41. <div class="row">
  42. <div class="col-md-12">
  43. {% if row.show_description %}
  44. {{ row.description }}
  45. {% endif %}
  46. <ul class="info-session list-inline">
  47. {% if row.coach_name %}
  48. <li>
  49. <i class="fa fa-user" aria-hidden="true"></i>
  50. {{ row.coach_name }}
  51. </li>
  52. {% endif %}
  53. {% if row.date %}
  54. <li>
  55. <i class="fa fa-calendar" aria-hidden="true"></i>
  56. {{ row.date }}
  57. </li>
  58. {% elseif row.duration %}
  59. <li>
  60. <i class="fa fa-calendar" aria-hidden="true"></i>
  61. {{ row.duration }}
  62. </li>
  63. {% endif %}
  64. </ul>
  65. <div class="sessions-items">
  66. {% for item in row.courses %}
  67. <div class="courses">
  68. <div class="row">
  69. <div class="col-md-2">
  70. <a href="{{ item.link }}" class="thumbnail">
  71. <img class="img-responsive"
  72. src="{{ item.thumbnails ? item.thumbnails : item.icon }}">
  73. </a>
  74. </div>
  75. <div class="col-md-10">
  76. <h4>{{ item.title }}</h4>
  77. <div class="list-teachers">
  78. {% if item.coaches|length > 0 %}
  79. <img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
  80. {% for coach in item.coaches %}
  81. {{ loop.index > 1 ? ' | ' }}
  82. <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() }}"
  83. data-title="{{ coach.full_name }}" class="ajax">
  84. {{ coach.firstname }}, {{ coach.lastname }}
  85. </a>
  86. {% endfor %}
  87. {% endif %}
  88. </div>
  89. </div>
  90. {% if item.student_info %}
  91. {% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
  92. <div class="course-student-info">
  93. <div class="student-info">
  94. {% if (item.student_info.progress is not null) %}
  95. {{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
  96. {% endif %}
  97. {% if (item.student_info.score is not null) %}
  98. {{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
  99. {% endif %}
  100. {% if (item.student_info.certificate is not null) %}
  101. {{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
  102. {% endif %}
  103. </div>
  104. </div>
  105. {% endif %}
  106. {% endif %}
  107. </div>
  108. </div>
  109. {% endfor %}
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. {% else %}
  115. <div class="panel-heading">
  116. <a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
  117. <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" alt="{{ row.title }}"
  118. title="{{ row.title }}">
  119. {{ row.title }}
  120. </a>
  121. </div>
  122. <!-- view simple info -->
  123. <div class="panel-body">
  124. <div class="row">
  125. <div class="col-md-2">
  126. <a class="thumbnail" href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
  127. <img class="img-responsive"
  128. src="{{ row.image ? _p.web_upload ~ row.image : 'session_default.png'|icon() }}"
  129. alt="{{ row.title }}" title="{{ row.title }}">
  130. </a>
  131. </div>
  132. <div class="col-md-10">
  133. <div class="info-session">
  134. <p>{{ row.subtitle }}</p>
  135. {% if row.show_description %}
  136. <div class="description">
  137. {{ row.description }}
  138. </div>
  139. {% endif %}
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <!-- end view simple info -->
  145. {% endif %}
  146. </div>
  147. {% endfor %}