configuration.tpl 12 KB

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