configuration.tpl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
  2. {% if sessions_are_included or services_are_included %}
  3. <ul class="nav nav-tabs buy-courses-tabs" role="tablist">
  4. <li role="presentation" class="active">
  5. <a href="#courses" aria-controls="courses" role="tab" data-toggle="tab">{{ 'Courses'|get_lang }}</a>
  6. </li>
  7. {% if sessions_are_included %}
  8. <li role="presentation">
  9. <a href="#sessions" aria-controls="sessions" role="tab" data-toggle="tab">{{ 'Sessions'|get_lang }}</a>
  10. </li>
  11. {% endif %}
  12. {% if services_are_included %}
  13. <li role="presentation">
  14. <a href="#services" aria-controls="services" role="tab"
  15. data-toggle="tab">{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}</a>
  16. </li>
  17. {% endif %}
  18. </ul>
  19. {% endif %}
  20. <div class="tab-content">
  21. <div role="tabpanel" class="tab-pane fade in active" id="courses">
  22. <div class="table-responsive">
  23. <table id="courses_table" class="table table-striped table-hover">
  24. <thead>
  25. <tr>
  26. <th>{{ 'Title'|get_lang }}</th>
  27. <th class="text-center">{{ 'OfficialCode'|get_lang }}</th>
  28. <th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  29. <th class="text-right" width="200">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  30. {% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 2) %}
  31. <th class="text-center" width="100">{{ tax_name }}</th>
  32. {% endif %}
  33. <th class="text-right">{{ 'Options'|get_lang }}</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. {% for item in courses %}
  38. <tr data-item="{{ item.course_id }}" data-type="course">
  39. <td>
  40. {% if item.course_visibility == 0 %}
  41. <img src="{{ 'bullet_red.png'|icon() }}" alt="{{ 'CourseVisibilityClosed'|get_lang }}"
  42. title="{{ 'CourseVisibilityClosed'|get_lang }}">
  43. {% elseif item.course_visibility == 1 %}
  44. <img src="{{ 'bullet_orange.png'|icon() }}" alt="{{ 'Private'|get_lang }}"
  45. title="{{ 'Private'|get_lang }}">
  46. {% elseif item.course_visibility == 2 %}
  47. <img src="{{ 'bullet_green.png'|icon() }}" alt="{{ 'OpenToThePlatform'|get_lang }}"
  48. title="{{ 'OpenToThePlatform'|get_lang }}">
  49. {% elseif item.course_visibility == 3 %}
  50. <img src="{{ 'bullet_blue.png'|icon() }}" alt="{{ 'OpenToTheWorld'|get_lang }}"
  51. title="{{ 'OpenToTheWorld'|get_lang }}">
  52. {% elseif item.course_visibility == 4 %}
  53. <img src="{{ 'bullet_grey.png'|icon() }}" alt="{{ 'CourseVisibilityHidden'|get_lang }}"
  54. title="{{ 'CourseVisibilityHidden'|get_lang }}">
  55. {% endif %}
  56. <a href="{{ _p.web_course ~ item.course_directory ~ '/index.php' }}">
  57. {{ item.course_title }}
  58. </a>
  59. <span class="label label-info">{{ item.course_visual_code }}</span>
  60. </td>
  61. <td class="text-center">
  62. {{ item.course_code }}
  63. </td>
  64. <td class="text-center">
  65. {% if item.visible %}
  66. <em class="fa fa-fw fa-check-square-o"></em>
  67. {% else %}
  68. <em class="fa fa-fw fa-square-o"></em>
  69. {% endif %}
  70. </td>
  71. <td width="200" class="text-right">
  72. {{ "#{item.price} #{tem.currency ?: item.currency}" }}
  73. </td>
  74. {% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 2) %}
  75. <td class="text-center">
  76. {% if item.tax_perc is null %}
  77. {{ global_tax_perc }} %
  78. {% else %}
  79. {{ item.tax_perc }} %
  80. {% endif %}
  81. </td>
  82. {% endif %}
  83. <td class="text-right">
  84. <a href="{{ _p.web_plugin ~ 'buycourses/src/configure_course.php?' ~ {'i': item.course_id, 't':product_type_course}|url_encode() }}"
  85. class="btn btn-info btn-sm">
  86. <em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
  87. </a>
  88. </td>
  89. </tr>
  90. {% endfor %}
  91. </tbody>
  92. </table>
  93. </div>
  94. </div>
  95. {% if sessions_are_included %}
  96. <div role="tabpanel" class="tab-pane" id="sessions">
  97. <div class="table-responsive">
  98. <table id="courses_table" class="table">
  99. <thead>
  100. <tr>
  101. <th>{{ 'Title'|get_lang }}</th>
  102. <th class="text-center">{{ 'StartDate'|get_lang }}</th>
  103. <th class="text-center">{{ 'EndDate'|get_lang }}</th>
  104. <th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  105. <th class="text-right">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  106. {% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 3) %}
  107. <th class="text-center" width="100">{{ tax_name }}</th>
  108. {% endif %}
  109. <th class="text-right">{{ 'Options'|get_lang }}</th>
  110. </tr>
  111. </thead>
  112. <tbody>
  113. {% for item in sessions %}
  114. <tr data-item="{{ item.session_id }}" data-type="session">
  115. <td>
  116. <a href="{{ _p.web_main ~ 'session/index.php?' ~ {'session_id': item.session_id}|url_encode() }}">{{ item.session_name }}</a>
  117. </td>
  118. <td class="text-center">
  119. {{ item.session_display_start_date }}
  120. </td>
  121. <td class="text-center">
  122. {{ item.session_display_end_date }}
  123. </td>
  124. <td class="text-center">
  125. {% if item.visible %}
  126. <em class="fa fa-fw fa-check-square-o"></em>
  127. {% else %}
  128. <em class="fa fa-fw fa-square-o"></em>
  129. {% endif %}
  130. </td>
  131. <td class="text-right" width="200">
  132. {{ "#{item.price} #{tem.currency ?: item.currency}" }}
  133. </td>
  134. {% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 3) %}
  135. <td class="text-center">
  136. {% if item.tax_perc is null %}
  137. {{ global_tax_perc }} %
  138. {% else %}
  139. {{ item.tax_perc }} %
  140. {% endif %}
  141. </td>
  142. {% endif %}
  143. <td class="text-right">
  144. <a href="{{ _p.web_plugin ~ 'buycourses/src/configure_course.php?' ~ {'i': item.session_id, 't': product_type_session}|url_encode() }}"
  145. class="btn btn-info btn-sm">
  146. <em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
  147. </a>
  148. </td>
  149. </tr>
  150. {% endfor %}
  151. </tbody>
  152. </table>
  153. </div>
  154. </div>
  155. {% endif %}
  156. {% if services_are_included %}
  157. <div role="tabpanel" class="tab-pane" id="services">
  158. <div class="table-responsive">
  159. <a href="{{ _p.web_plugin ~ 'buycourses/src/services_add.php' }}" class="btn btn-primary">
  160. <em class="fa fa-cart-plus fa-fw"></em> {{ 'NewService'| get_plugin_lang('BuyCoursesPlugin') }}
  161. </a>
  162. </br>
  163. </br>
  164. <table id="services_table" class="table">
  165. <thead>
  166. <tr>
  167. <th>{{ 'Service'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  168. <th>{{ 'Description'|get_lang }}</th>
  169. <th class="text-center">{{ 'Duration'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  170. <th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  171. <th class="text-center">{{ 'Owner'|get_lang }}</th>
  172. <th class="text-right">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  173. {% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 4) %}
  174. <th class="text-center" width="100">{{ tax_name }}</th>
  175. {% endif %}
  176. <th class="text-right">{{ 'Options'|get_lang }}</th>
  177. </tr>
  178. </thead>
  179. <tbody>
  180. {% for item in services %}
  181. <tr data-item="{{ item.id }}" data-type="service">
  182. <td>
  183. {{ item.name }}
  184. </td>
  185. <td>
  186. {{ item.description }}
  187. </td>
  188. <td class="text-center">
  189. {% if item.duration_days == 0 %}
  190. {{ 'NoLimit'|get_lang }}
  191. {% else %}
  192. {{ item.duration_days }} {{ 'Days'|get_lang }}
  193. {% endif %}
  194. </td>
  195. <td class="text-center">
  196. {% if item.visibility == 1 %}
  197. <em class="fa fa-fw fa-check-square-o"></em>
  198. {% else %}
  199. <em class="fa fa-fw fa-square-o"></em>
  200. {% endif %}
  201. </td>
  202. <td class="text-center">
  203. {{ item.owner_name }}
  204. </td>
  205. <td class="text-right" width="200">
  206. {{ "#{item.price} #{tem.currency ?: item.currency}" }}
  207. </td>
  208. {% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 4) %}
  209. <td class="text-center">
  210. {% if item.tax_perc is null %}
  211. {{ global_tax_perc }} %
  212. {% else %}
  213. {{ item.tax_perc }} %
  214. {% endif %}
  215. </td>
  216. {% endif %}
  217. <td class="text-right">
  218. <a href="{{ _p.web_plugin ~ 'buycourses/src/services_edit.php?' ~ {'id': item.id}|url_encode() }}"
  219. class="btn btn-info btn-sm">
  220. <em class="fa fa-wrench fa-fw"></em> {{ 'Edit'|get_lang }}
  221. </a>
  222. </td>
  223. </tr>
  224. {% endfor %}
  225. </tbody>
  226. </table>
  227. </div>
  228. </div>
  229. {% endif %}
  230. </div>