configuration.tpl 10 KB

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