catalog.tpl 14 KB

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