about.html.twig 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. {% autoescape false %}
  2. <section id="about-course" class="about">
  3. {% if is_subscribed and user_session_time != -0 and user_session_time >= 1 %}
  4. <div class="alert alert-info">
  5. {{ 'AlreadyRegisteredToSession'|get_lang }}
  6. </div>
  7. {% elseif is_subscribed and user_session_time < 1 %}
  8. <div class="alert alert-warning">
  9. {{ 'YourSessionTimeIsExpired'|get_lang }}
  10. </div>
  11. {% endif %}
  12. <section class="session">
  13. <div class="card">
  14. <div class="card-body">
  15. <div class="row">
  16. <div class="col-md-8">
  17. <h2 class="session-title">{{ session.name }}</h2>
  18. {% if show_tutor and session.generalCoach %}
  19. <div class="session-tutor">
  20. <em class="fa fa-user"></em> {{ 'SessionGeneralCoach'|get_lang }}:
  21. <em>{{ session.generalCoach.getCompleteName() }}</em>
  22. </div>
  23. {% endif %}
  24. {% if session.getShowDescription() %}
  25. <div class="session-description">
  26. {{ session.getDescription() }}
  27. </div>
  28. {% endif %}
  29. {% if "display.hide_social_media_links" | api_get_setting == 'false' %}
  30. <div class="share-social-media">
  31. <ul class="sharing-buttons">
  32. <li>
  33. {{ "ShareWithYourFriends"|get_lang }}
  34. </li>
  35. <li>
  36. <a href="https://www.facebook.com/sharer/sharer.php?{{ {'u': page_url }|url_encode }}"
  37. target="_blank" class="btn btn-facebook btn-inverse btn-sm">
  38. <em class="fab fa-facebook-square"></em> Facebook
  39. </a>
  40. </li>
  41. <li>
  42. <a href="https://twitter.com/home?{{ {'status': session.getName() ~ ' ' ~ page_url }|url_encode }}"
  43. target="_blank" class="btn btn-twitter btn-inverse btn-sm">
  44. <em class="fab fa-twitter"></em> Twitter
  45. </a>
  46. </li>
  47. <li>
  48. <a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': page_url , 'title': session.getName() }|url_encode }}"
  49. target="_blank" class="btn btn-linkedin btn-inverse btn-sm">
  50. <em class="fab fa-linkedin-in"></em> Linkedin
  51. </a>
  52. </li>
  53. </ul>
  54. </div>
  55. {% endif %}
  56. </div>
  57. <div class="col-md-4">
  58. <div class="session-info">
  59. <div class="date">
  60. <p>
  61. {% if session.duration %}
  62. {{ 'SessionDurationXDaysTotal'|get_lang|format(session.duration) }}
  63. {% else %}
  64. {{ session_date.display }}
  65. {% endif %}
  66. </p>
  67. </div>
  68. {% if is_premium == false %}
  69. <h5>{{ 'CourseSubscription'|get_lang }}</h5>
  70. <div class="session-subscribe">
  71. {% if _u.logged and not is_subscribed %}
  72. {{ subscribe_button }}
  73. {% elseif not _u.logged %}
  74. {% if 'allow_registration'|api_get_setting != 'false' %}
  75. <a href="{{ _p.web_main ~ 'auth/inscription.php' ~ redirect_to_session }}"
  76. class="btn btn-success btn-block btn-lg">
  77. <i class="fa fa-pencil" aria-hidden="true"></i> {{ 'SignUp'|get_lang }}
  78. </a>
  79. {% endif %}
  80. {% endif %}
  81. </div>
  82. {% else %}
  83. <div class="session-price">
  84. <div class="sale-price">
  85. {{ 'SalePrice'|get_lang }}
  86. </div>
  87. <div class="price-text">
  88. {{ is_premium.iso_code }} {{ is_premium.price }}
  89. </div>
  90. <div class="buy-box">
  91. <a href="{{ _p.web }}plugin/buycourses/src/process.php?i={{ is_premium.product_id }}&t={{ is_premium.product_type }}"
  92. class="btn btn-lg btn-primary btn-block">{{ 'BuyNow'|get_lang }}</a>
  93. </div>
  94. </div>
  95. {% endif %}
  96. {% if has_requirements %}
  97. <div class="session-requirements">
  98. <h5>{{ 'RequiredSessions'|get_lang }}</h5>
  99. {% for sequence in sequences %}
  100. {% if sequence.requirements %}
  101. <p>
  102. {{ sequence.name }} :
  103. {% for requirement in sequence.requirements %}
  104. <a href="{{ _p.web ~ 'session/' ~ requirement.getId ~ '/about/' }}">
  105. {{ requirement.getName }}
  106. </a>
  107. {% endfor %}
  108. </p>
  109. {% endif %}
  110. {% endfor %}
  111. </div>
  112. {% endif %}
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </section>
  119. {% for course_data in courses %}
  120. {% set course_video = '' %}
  121. {% for extra_field in course_data.extra_fields %}
  122. {% if extra_field.value.getField().getVariable() == 'video_url' %}
  123. {% set course_video = extra_field.value.getValue() %}
  124. {% endif %}
  125. {% endfor %}
  126. <div class="card panel-course">
  127. <div class="card-body">
  128. <div class="row">
  129. <div class="col-sm-5">
  130. {% if course_video %}
  131. <div class="embed-responsive embed-responsive-16by9">
  132. {{ essence.replace(course_video) }}
  133. </div>
  134. {% else %}
  135. <div class="course-image">
  136. <img src="{{ course_data.image }}" class="img-rounded img-fluid" width="100%">
  137. </div>
  138. {% endif %}
  139. </div>
  140. <div class="col-sm-7">
  141. {% if courses|length > 1 %}
  142. <div class="course-title">
  143. <h3>{{ course_data.course.getTitle }}</h3>
  144. </div>
  145. {% endif %}
  146. <div class="course-description">
  147. {% for description in course_data.description %}
  148. {{ description.content }}
  149. {% endfor %}
  150. </div>
  151. </div>
  152. </div>
  153. {% if course_data.tags %}
  154. <ul class="list-inline course-tags d-flex flex-row bd-highlight mb-3">
  155. <li class="px-2 bd-highlight">{{ 'Tags'|get_lang }} :</li>
  156. {% for tag in course_data.tags %}
  157. <li class="px-2 bd-highlight">
  158. <span>{{ tag.getTag }}</span>
  159. </li>
  160. {% endfor %}
  161. </ul>
  162. {% endif %}
  163. </div>
  164. </div>
  165. <section class="course">
  166. <div class="row">
  167. <div class="col-md-8">
  168. <div class="card">
  169. <div class="card-body">
  170. <h3 class="sub-title">{{ "CourseInformation"|get_lang }}</h3>
  171. <div class="course-information read-more-area">
  172. {% if course_data.objectives %}
  173. {% for objectives in course_data.objectives %}
  174. <div class="topics">
  175. <h4 class="title-info"><em
  176. class="fa fa-book"></em> {{ objectives.title }}</h4>
  177. <div class="content-info">
  178. {{ objectives.content }}
  179. </div>
  180. </div>
  181. {% endfor %}
  182. {% endif %}
  183. {% if course_data.topics %}
  184. {% for topics in course_data.topics %}
  185. <div class="topics">
  186. <h4 class="title-info"><em
  187. class="fa fa-book"></em> {{ topics.title }}</h4>
  188. <div class="content-info">
  189. {{ topics.content }}
  190. </div>
  191. </div>
  192. {% endfor %}
  193. {% endif %}
  194. {% if course_data.methodology %}
  195. {% for methodology in course_data.methodology %}
  196. <div class="topics">
  197. <h4 class="title-info"><em
  198. class="fa fa-book"></em> {{ methodology.title }}</h4>
  199. <div class="content-info">
  200. {{ methodology.content }}
  201. </div>
  202. </div>
  203. {% endfor %}
  204. {% endif %}
  205. {% if course_data.material %}
  206. {% for material in course_data.material %}
  207. <div class="topics">
  208. <h4 class="title-info"><em
  209. class="fa fa-book"></em> {{ material.title }}</h4>
  210. <div class="content-info">
  211. {{ material.content }}
  212. </div>
  213. </div>
  214. {% endfor %}
  215. {% endif %}
  216. {% if course_data.resources %}
  217. {% for resources in course_data.resources %}
  218. <div class="topics">
  219. <h4 class="title-info"><em
  220. class="fa fa-book"></em> {{ resources.title }}</h4>
  221. <div class="content-info">
  222. {{ resources.content }}
  223. </div>
  224. </div>
  225. {% endfor %}
  226. {% endif %}
  227. {% if course_data.assessment %}
  228. {% for assessment in course_data.assessment %}
  229. <div class="topics">
  230. <h4 class="title-info"><em
  231. class="fa fa-book"></em> {{ assessment.title }}</h4>
  232. <div class="content-info">
  233. {{ assessment.content }}
  234. </div>
  235. </div>
  236. {% endfor %}
  237. {% endif %}
  238. {% if course_data.custom %}
  239. {% for custom in course_data.custom %}
  240. <div class="topics">
  241. <h4 class="title-info"><em class="fa fa-book"></em> {{ custom.title }}
  242. </h4>
  243. <div class="content-info">
  244. {{ custom.content }}
  245. </div>
  246. </div>
  247. {% endfor %}
  248. {% endif %}
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. <div class="col-md-4">
  254. <div class="card">
  255. <div class="card-body">
  256. {% if course_data.coaches %}
  257. <div class="card-teachers">
  258. <h3 class="cards-title">{{ "Coaches"|get_lang }}</h3>
  259. {% for coach in course_data.coaches %}
  260. <div class="coach-information">
  261. <div class="coach-header">
  262. <div class="coach-avatar">
  263. <img class="img-circle img-fluid" src="{{ coach.image }}"
  264. alt="{{ coach.complete_name }}">
  265. </div>
  266. <div class="coach-title">
  267. <h4>{{ coach.complete_name }}</h4>
  268. {% if coach.diploma %}
  269. <p>{{ coach.diploma }}</p>
  270. {% endif %}
  271. </div>
  272. </div>
  273. {% if coach.openarea %}
  274. <div class="open-area {{ course_data.coaches | length >= 2 ? 'open-more' : ' ' }}">
  275. <p>{{ coach.openarea }}</p>
  276. </div>
  277. {% endif %}
  278. {% for coach_extra_field in coach.extra_fields %}
  279. {% set coach_field = coach_extra_field.value.field %}
  280. {% set coach_field_value = coach_extra_field.value.value %}
  281. {% if not coach_field_value is empty %}
  282. <dl class="coach-extrafield">
  283. <dt class="extrafield_dt dt_{{ coach_field.variable }}">{{ coach_field.displayText }}</dt>
  284. <dd class="extrafield_dd dd_{{ coach_field.variable }}">{{ coach_extra_field.value.value }}</dd>
  285. </dl>
  286. {% endif %}
  287. {% endfor %}
  288. </div>
  289. {% endfor %}
  290. </div>
  291. {% endif %}
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </section>
  297. {% endfor %}
  298. </div>
  299. </section>
  300. <script>
  301. $(function() {
  302. $('.course-information').readmore({
  303. speed: 100,
  304. lessLink: '<a class="hide-content" href="#">{{ 'SetInvisible' | get_lang }}</a>',
  305. moreLink: '<a class="read-more" href="#">{{ 'ReadMore' | get_lang }}</a>',
  306. collapsedHeight: 500,
  307. heightMargin: 100
  308. });
  309. $('.open-more').readmore({
  310. speed: 100,
  311. lessLink: '<a class="hide-content" href="#">{{ 'SetInvisible' | get_lang }}</a>',
  312. moreLink: '<a class="read-more" href="#">{{ 'ReadMore' | get_lang }}</a>',
  313. collapsedHeight: 90,
  314. heightMargin: 20
  315. });
  316. });
  317. </script>
  318. {% endautoescape %}