catalog.tpl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
  2. <div id="buy-courses-tabs">
  3. {% if sessions_are_included %}
  4. <ul class="nav nav-tabs buy-courses-tabs" role="tablist">
  5. <li id="buy-courses-tab" class="{{ showing_courses ? 'active' : '' }}" role="presentation">
  6. <a href="course_catalog.php" aria-controls="buy-courses" role="tab">{{ 'Courses'|get_lang }}</a>
  7. </li>
  8. <li id="buy-sessions-tab" class="{{ showing_sessions ? 'active' : '' }}" role="presentation">
  9. <a href="session_catalog.php" aria-controls="buy-sessions" role="tab">{{ 'Sessions'|get_lang }}</a>
  10. </li>
  11. {% if services_are_included %}
  12. <li id="buy-services-tab" class="{{ showing_services ? 'active' : '' }}" role="presentation">
  13. <a href="service_catalog.php" aria-controls="buy-services"
  14. role="tab">{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}</a>
  15. </li>
  16. {% endif %}
  17. </ul>
  18. {% endif %}
  19. <div class="tab-content">
  20. <div class="tab-pane active" aria-labelledby="buy-sessions-tab" role="tabpanel">
  21. <div class="row">
  22. <div class="col-md-3">
  23. {{ search_filter_form }}
  24. </div>
  25. <div class="col-md-9">
  26. <div class="row">
  27. {% if showing_courses %}
  28. {% for course in courses %}
  29. <div class="col-md-4 col-sm-6">
  30. <article class="items-course">
  31. <div class="items-course-image">
  32. <img alt="{{ course.title }}" class="img-responsive"
  33. src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
  34. </div>
  35. <div class="items-course-info">
  36. {% set course_description_url = _p.web_ajax ~ 'course_home.ajax.php?' ~ {'code': course.code, 'a': 'show_course_information'}|url_encode() %}
  37. <h4 class="title">
  38. <a class="ajax" href="{{ course_description_url }}"
  39. data-title="{{ course.title }}">{{ course.title }}</a>
  40. </h4>
  41. <ul class="list-unstyled">
  42. {% for teacher in course.teachers %}
  43. <li><em class="fa fa-user"></em> {{ teacher }}</li>
  44. {% endfor %}
  45. </ul>
  46. <p class="text-right">
  47. <span class="label label-primary">
  48. {{ course.currency }} {{ course.price }}
  49. </span>
  50. </p>
  51. {% if course.enrolled == "YES" %}
  52. <div class="alert alert-success">
  53. <em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheCourse'|get_plugin_lang('BuyCoursesPlugin') }}
  54. </div>
  55. {% elseif course.enrolled == "NO" %}
  56. <div class="toolbar">
  57. <a class="ajax btn btn-info btn-block btn-sm" title=""
  58. href="{{ course_description_url }}"
  59. data-title="{{ course.title }}">
  60. <em class="fa fa-file-text"></em> {{ 'SeeDescription'|get_plugin_lang('BuyCoursesPlugin') }}
  61. </a>
  62. <a class="btn btn-success btn-block btn-sm" title=""
  63. href="{{ _p.web_plugin ~ 'buycourses/src/process.php?' ~ {'i': course.id, 't': 1}|url_encode() }}">
  64. <em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  65. </a>
  66. </div>
  67. {% elseif course.enrolled == "TMP" %}
  68. <div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
  69. {% endif %}
  70. </div>
  71. </article>
  72. </div>
  73. {% endfor %}
  74. {% endif %}
  75. {% if showing_sessions %}
  76. {% for session in sessions %}
  77. <div class="col-md-4 col-sm-6">
  78. <article class="items-course">
  79. <div class="items-course-image">
  80. <img alt="{{ session.name }}" class="img-responsive"
  81. src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
  82. </div>
  83. <div class="items-course-info">
  84. <h4 class="title">
  85. <a href="{{ _p.web ~ 'session/' ~ session.id ~ '/about/' }}">{{ session.name }}</a>
  86. </h4>
  87. {% if 'show_session_coach'|api_get_setting == 'true' %}
  88. <p><em class="fa fa-user fa-fw"></em> {{ session.coach }}</p>
  89. {% endif %}
  90. <p><em class="fa fa-calendar fa-fw"></em> {{ session.dates.display }}</p>
  91. <p class="text-right">
  92. <span class="label label-primary">
  93. {{ session.currency }} {{ session.price }}
  94. </span>
  95. </p>
  96. <ul class="list-unstyled">
  97. {% for course in session.courses %}
  98. <li>
  99. <em class="fa fa-book fa-fw"></em> {{ course.title }}
  100. {% if course.coaches|length %}
  101. <ul>
  102. {% for coach in course.coaches %}
  103. <li>{{ coach }}</li>
  104. {% endfor %}
  105. </ul>
  106. {% endif %}
  107. </li>
  108. {% endfor %}
  109. </ul>
  110. {% if session.enrolled == "YES" %}
  111. <div class="alert alert-success">
  112. <em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheSession'|get_plugin_lang('BuyCoursesPlugin') }}
  113. </div>
  114. {% elseif session.enrolled == "NO" %}
  115. <div class="toolbar">
  116. <a class="btn btn-success btn-block btn-sm"
  117. href="{{ _p.web_plugin ~ 'buycourses/src/process.php?' ~ {'i': session.id, 't': 2}|url_encode() }}">
  118. <em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  119. </a>
  120. </div>
  121. {% elseif session.enrolled == "TMP" %}
  122. <div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
  123. {% endif %}
  124. </div>
  125. </article>
  126. </div>
  127. {% endfor %}
  128. {% endif %}
  129. {% if showing_services %}
  130. {% for service in services %}
  131. <div class="col-md-4 col-sm-6">
  132. <div class="items-course">
  133. <div class="items-course-image">
  134. <a href="{{ _p.web }}service/{{ service.id }}"><img alt="{{ service.name }}"
  135. class="img-responsive"
  136. src="{{ service.image ? service.image : 'session_default.png'|icon() }}"></a>
  137. </div>
  138. <div class="items-course-info">
  139. <h4 class="title">
  140. <a title="{{ service.name }}"
  141. href="{{ _p.web }}service/{{ service.id }}">
  142. {{ service.name }}
  143. </a>
  144. </h4>
  145. <ul class="list-unstyled">
  146. <li>
  147. <em class="fa fa-clock-o"></em> {{ 'Duration'|get_plugin_lang('BuyCoursesPlugin') }}
  148. : {{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
  149. </li>
  150. {% if service.applies_to == 0 %}
  151. <li>
  152. <em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'None'|get_lang }}
  153. </li>
  154. {% elseif service.applies_to == 1 %}
  155. <li>
  156. <em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'User'|get_lang }}
  157. </li>
  158. {% elseif service.applies_to == 2 %}
  159. <li>
  160. <em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Course'|get_lang }}
  161. </li>
  162. {% elseif service.applies_to == 3 %}
  163. <li>
  164. <em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Session'|get_lang }}
  165. </li>
  166. {% elseif service.applies_to == 4 %}
  167. <li>
  168. <em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'TemplateTitleCertificate'|get_plugin_lang('BuyCoursesPlugin') }}
  169. </li>
  170. {% endif %}
  171. <li><em class="fa fa-user"></em> {{ service.owner_name }}</li>
  172. </ul>
  173. <p class="text-right">
  174. <span class="label label-primary">
  175. {{ service.currency == 'BRL' ? 'R$' : service.currency }} {{ service.price }}
  176. </span>
  177. </p>
  178. <div class="toolbar">
  179. <a class="btn btn-info btn-block btn-sm" title=""
  180. href="{{ _p.web }}service/{{ service.id }}">
  181. <em class="fa fa-info-circle"></em> {{ 'ServiceInformation'|get_plugin_lang('BuyCoursesPlugin') }}
  182. </a>
  183. <a class="btn btn-success btn-block btn-sm" title=""
  184. href="{{ _p.web_plugin ~ 'buycourses/src/service_process.php?' ~ {'i': service.id, 't': service.applies_to}|url_encode() }}">
  185. <em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  186. </a>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. {% endfor %}
  192. {% endif %}
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>