classic_session.tpl 8.1 KB

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