classic_session.tpl 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. <a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
  9. <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" />
  10. {{ row.title }}
  11. </a>
  12. {% elseif row.course_list_session_style == 2 %}
  13. {# No link #}
  14. <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" />
  15. {{ row.title }}
  16. {% elseif row.course_list_session_style == 3 %}
  17. {# Foldable #}
  18. <a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ row.id }}" aria-expanded="false" >
  19. <img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32" alt="{{ row.title }}" title="{{ row.title }}" />
  20. {{ row.title }}
  21. </a>
  22. {% set collapsable = 'collapse' %}
  23. {% endif %}
  24. {% if row.show_actions %}
  25. <div class="pull-right">
  26. <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
  27. <img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}" title="{{ "Edit"|get_lang }}" />
  28. </a>
  29. </div>
  30. {% endif %}
  31. </div>
  32. {% endif %}
  33. <div class="session panel-body {{ collapsable }}" id="collapse_{{ row.id }}">
  34. {% if row.show_simple_session_info %}
  35. <div class="row">
  36. <div class="col-md-7">
  37. {% if row.description != '' %}
  38. {{ row.description }}
  39. {% endif %}
  40. <div class="info-session">
  41. {% if row.coach_name != '' %}
  42. <span><i class="fa fa-user" aria-hidden="true"></i>
  43. {{ row.coach_name }}
  44. </span>
  45. {% endif %}
  46. <span><i class="fa fa-calendar" aria-hidden="true"></i>
  47. {{ row.date }}
  48. </span>
  49. </div>
  50. {% if row.coaches %}
  51. <h5 class="teacher-name">{{ "teacher.png"|icon(16) ~ row.coaches }}</h5>
  52. {% endif %}
  53. </div>
  54. {% if row.show_actions %}
  55. <div class="col-md-5 text-right">
  56. <a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.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 row.description != '' %}
  66. {{ row.description }}
  67. {% endif %}
  68. <div class="info-session">
  69. {% if row.coach_name != '' %}
  70. <span><i class="fa fa-user" aria-hidden="true"></i>
  71. {{ row.coach_name }}
  72. </span>
  73. {% endif %}
  74. <span><i class="fa fa-calendar" aria-hidden="true"></i>
  75. {{ row.date }}
  76. </span>
  77. </div>
  78. <div class="sessions-items">
  79. {% for item in row.courses %}
  80. <div class="courses">
  81. <div class="row">
  82. <div class="col-md-2">
  83. {% if item.link %}
  84. <a href="{{ item.link }}" class="thumbnail">
  85. <img class="img-responsive" src="{{ item.icon }}">
  86. </a>
  87. {% else %}
  88. {{ 'blackboard.png' | img(48, item.title ) }}
  89. {% endif %}
  90. </div>
  91. <div class="col-md-10">
  92. <h4>{{ item.title }}</h4>
  93. <div class="teachers">
  94. {% if item.teachers|length > 0 %}
  95. <img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
  96. {% for coach in item.teachers %}
  97. {{ loop.index > 1 ? ' | ' }}
  98. <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">
  99. {{ coach.firstname }},
  100. {{ coach.lastname }}
  101. </a>
  102. {% endfor %}
  103. {% endif %}
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. {% endfor %}
  109. </div>
  110. </div>
  111. </div>
  112. {% endif %}
  113. </div>
  114. </div>
  115. {% endfor %}