configuration.tpl 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <script type='text/javascript' src="../js/buycourses.js"></script>
  2. <link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
  3. {% if sessions_are_included %}
  4. <ul class="nav nav-tabs buy-courses-tabs" role="tablist">
  5. <li role="presentation" class="active">
  6. <a href="#courses" aria-controls="courses" role="tab" data-toggle="tab">{{ 'Courses'|get_lang }}</a>
  7. </li>
  8. <li role="presentation">
  9. <a href="#sessions" aria-controls="sessions" role="tab" data-toggle="tab">{{ 'Sessions'|get_lang }}</a>
  10. </li>
  11. </ul>
  12. {% endif %}
  13. <div class="tab-content">
  14. <div role="tabpanel" class="tab-pane fade in active" id="courses">
  15. <div class="table-responsive">
  16. <table id="courses_table" class="table table-striped table-hover">
  17. <thead>
  18. <tr>
  19. <th>{{ 'Title'|get_lang }}</th>
  20. <th class="text-center">{{ 'OfficialCode'|get_lang }}</th>
  21. <th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  22. <th class="text-right" width="200">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  23. <th class="text-right">{{ 'Options'|get_lang }}</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. {% for item in courses %}
  28. <tr data-item="{{ item.course_id }}" data-type="course">
  29. <td>
  30. {% if item.course_visibility == 0 %}
  31. <img src="{{ 'bullet_red.gif'|icon() }}" alt="{{ 'CourseVisibilityClosed'|get_lang }}" title="{{ 'CourseVisibilityClosed'|get_lang }}">
  32. {% elseif item.course_visibility == 1 %}
  33. <img src="{{ 'bullet_orange.gif'|icon() }}" alt="{{ 'Private'|get_lang }}" title="{{ 'Private'|get_lang }}">
  34. {% elseif item.course_visibility == 2 %}
  35. <img src="{{ 'bullet_green.gif'|icon() }}" alt="{{ 'OpenToThePlatform'|get_lang }}" title="{{ 'OpenToThePlatform'|get_lang }}">
  36. {% elseif item.course_visibility == 3 %}
  37. <img src="{{ 'bullet_blue.gif'|icon() }}" alt="{{ 'OpenToTheWorld'|get_lang }}" title="{{ 'OpenToTheWorld'|get_lang }}">
  38. {% elseif item.course_visibility == 4 %}
  39. <img src="{{ 'bullet_gray.gif'|icon() }}" alt="{{ 'CourseVisibilityHidden'|get_lang }}" title="{{ 'CourseVisibilityHidden'|get_lang }}">
  40. {% endif %}
  41. <a href="{{ _p.web_course ~ item.course_code ~ '/index.php' }}">{{ item.course_title }}</a>
  42. <span class="label label-info">{{ item.course_visual_code }}</span>
  43. </td>
  44. <td class="text-center">
  45. {{ item.course_code }}
  46. </td>
  47. <td class="text-center">
  48. {% if item.visible %}
  49. <em class="fa fa-fw fa-check-square-o"></em>
  50. {% else %}
  51. <em class="fa fa-fw fa-square-o"></em>
  52. {% endif %}
  53. </td>
  54. <td width="200" class="text-right">
  55. {{ "#{item.price} #{tem.currency ?: item.currency}" }}
  56. </td>
  57. <td class="text-right">
  58. <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">
  59. <em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
  60. </a>
  61. </td>
  62. </tr>
  63. {% endfor %}
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. {% if sessions_are_included %}
  69. <div role="tabpanel" class="tab-pane" id="sessions">
  70. <div class="table-responsive">
  71. <table id="courses_table" class="table">
  72. <thead>
  73. <tr>
  74. <th>{{ 'Title'|get_lang }}</th>
  75. <th class="text-center">{{ 'StartDate'|get_lang }}</th>
  76. <th class="text-center">{{ 'EndDate'|get_lang }}</th>
  77. <th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  78. <th class="text-right">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
  79. <th class="text-right">{{ 'Options'|get_lang }}</th>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. {% for item in sessions %}
  84. <tr data-item="{{ item.session_id }}" data-type="session">
  85. <td>
  86. {% if item.session_visibility == 0 %}
  87. <img src="{{ 'bullet_red.gif'|icon() }}" alt="{{ 'CourseVisibilityClosed'|get_lang }}" title="{{ 'CourseVisibilityClosed'|get_lang }}">
  88. {% elseif item.session_visibility == 1 %}
  89. <img src="{{ 'bullet_orange.gif'|icon() }}" alt="{{ 'Private'|get_lang }}" title="{{ 'Private'|get_lang }}">
  90. {% elseif item.session_visibility == 2 %}
  91. <img src="{{ 'bullet_green.gif'|icon() }}" alt="{{ 'OpenToThePlatform'|get_lang }}" title="{{ 'OpenToThePlatform'|get_lang }}">
  92. {% elseif item.session_visibility == 3 %}
  93. <img src="{{ 'bullet_blue.gif'|icon() }}" alt="{{ 'OpenToTheWorld'|get_lang }}" title="{{ 'OpenToTheWorld'|get_lang }}">
  94. {% elseif item.session_visibility == 4 %}
  95. <img src="{{ 'bullet_gray.gif'|icon() }}" alt="{{ 'CourseVisibilityHidden'|get_lang }}" title="{{ 'CourseVisibilityHidden'|get_lang }}">
  96. {% endif %}
  97. <a href="{{ _p.web_main ~ 'session/index.php?' ~ {'session_id': item.session_id}|url_encode() }}">{{ item.session_name }}</a>
  98. </td>
  99. <td class="text-center">
  100. {{ item.session_display_start_date }}
  101. </td>
  102. <td class="text-center">
  103. {{ item.session_display_end_date }}
  104. </td>
  105. <td class="text-center">
  106. {% if item.visible %}
  107. <em class="fa fa-fw fa-check-square-o"></em>
  108. {% else %}
  109. <em class="fa fa-fw fa-square-o"></em>
  110. {% endif %}
  111. </td>
  112. <td class="text-right" width="200">
  113. {{ "#{item.price} #{tem.currency ?: item.currency}" }}
  114. </td>
  115. <td class="text-right">
  116. <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">
  117. <em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
  118. </a>
  119. </td>
  120. </tr>
  121. {% endfor %}
  122. </tbody>
  123. </table>
  124. </div>
  125. </div>
  126. {% endif %}
  127. </div>