list.tpl 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <script type='text/javascript' src="../js/buycourses.js"></script>
  2. <link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
  3. <script>
  4. $(function() {
  5. /* Binds a tab id in the url */
  6. $("#tabs").bind('tabsselect', function(event, ui) {
  7. window.location.href=ui.tab;
  8. });
  9. // Generate tabs with jquery-ui
  10. $('#tabs').tabs();
  11. $( "#sub_tab" ).tabs();
  12. });
  13. </script>
  14. {% if sessionsAreIncluded == "YES" %}
  15. <div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs"> <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"> <a href="#tabs-1">{{ 'Courses'|get_lang }}</a></li><li class="ui-state-default ui-corner-top"> <a href="#tabs-2">{{ 'Sessions'|get_lang }}</a></li></ul>
  16. {% endif %}
  17. <div id="tabs-1">
  18. <div class="row">
  19. <div class="span3">
  20. <div class="category_well well">
  21. <div class="form-content">
  22. <h4>{{ 'SearchFilter'|get_plugin_lang('BuyCoursesPlugin') }}:</h4>
  23. <label class="control-label">{{ 'CourseName'|get_lang }}:</label>
  24. <input type="text" class="name" />
  25. <label class="control-label">{{ 'MinimumPrice'|get_plugin_lang('BuyCoursesPlugin') }}:</label>
  26. <input type="text" class="pricemin span1"/>
  27. <label class="control-label">{{ 'MaximumPrice'|get_plugin_lang('BuyCoursesPlugin') }}:</label>
  28. <input type="text" class="pricemax span1"/>
  29. {% for category in categories %}
  30. <label class="control-label">{{ 'Categories'|get_lang }}:</label>
  31. <select id="courses_category">
  32. <option value="" selected="selected"></option>
  33. <option value="{{ category.code }}">{{ category.name }}</option>
  34. </select>
  35. {% endfor %}
  36. <br>
  37. <input type="button" class="filter btn btn-primary" value="{{ 'Search'|get_lang }}" id="courses_filter" />
  38. </div>
  39. </div>
  40. </div>
  41. <div class="span8" id="course_results">
  42. {% if rmessage == "YES" %}
  43. <div class="{{ class }}">
  44. {{ responseMessage }}
  45. </div>
  46. {% endif %}
  47. {% for course in courses %}
  48. <div class="span8">
  49. <div class="row well-course">
  50. <div class="span1 icon-course">
  51. <div class="thumbnail">
  52. <a class="ajax" rel="gb_page_center[778]" title="" href="{{ server }}plugin/buycourses/src/ajax.php?code={{ course.code }}">
  53. <img alt="" src="{{ server }}{{ course.course_img }}">
  54. </a>
  55. </div>
  56. </div>
  57. <div class="span3">
  58. <div class="categories-course-description">
  59. <h3>{{ course.title }}</h3>
  60. <h5>{{ 'Teacher'|get_lang }}: {{ course.teacher }}</h5>
  61. </div>
  62. {% if course.enrolled == "YES" %}
  63. <span class="label label-info">{{ 'TheUserIsAlreadyRegisteredInTheCourse'|get_plugin_lang('BuyCoursesPlugin') }}</span>
  64. {% endif %}
  65. {% if course.enrolled == "TMP" %}
  66. <span class="label label-warning">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</span>
  67. {% endif %}
  68. </div>
  69. <div class="span3 right">
  70. <div class="sprice right">
  71. {{ course.price }} {{ currency }}
  72. </div>
  73. <div class="cleared"></div>
  74. <div class="btn-group right">
  75. <a class="ajax btn btn-primary" title="" href="{{ server }}plugin/buycourses/src/ajax.php?code={{ course.code }}">
  76. {{ 'Description'|get_lang }}
  77. </a>
  78. {% if course.enrolled == "NO" %}
  79. <a class="btn btn-success" title="" href="{{ server }}plugin/buycourses/src/process.php?code={{ course.id }}">
  80. {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  81. </a>
  82. {% endif %}
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. {% endfor %}
  88. </div>
  89. </div>
  90. </div>
  91. {% if sessionsAreIncluded == "YES" %}
  92. <div id="tabs-2" class="row">
  93. <div class="span3">
  94. <div class="category_well well">
  95. <div class="form-content">
  96. <h4>{{ 'SearchFilter'|get_plugin_lang('BuyCoursesPlugin') }}:</h4>
  97. <label class="control-label">{{ 'SessionName'|get_lang }}:</label>
  98. <input type="text" class="name" />
  99. <label class="control-label">{{ 'MinimumPrice'|get_plugin_lang('BuyCoursesPlugin') }}:</label>
  100. <input type="text" class="pricemin span1"/>
  101. <label class="control-label">{{ 'MaximumPrice'|get_plugin_lang('BuyCoursesPlugin') }}:</label>
  102. <input type="text" class="pricemax span1"/>
  103. {% for category in categories %}
  104. <label class="control-label">{{ 'Categories'|get_lang }}:</label>
  105. <select id="sessions_category">
  106. <option value="" selected="selected"></option>
  107. <option value="{{ category.code }}">{{ category.name }}</option>
  108. </select>
  109. {% endfor %}
  110. <br>
  111. <input type="button" class="filter btn btn-primary" value="{{ 'Search'|get_lang }}" id="sessions_filter" />
  112. </div>
  113. </div>
  114. </div>
  115. <div class="span8" id="session_results">
  116. {% if rmessage == "YES" %}
  117. <div class="{{ class }}">
  118. {{ responseMessage }}
  119. </div>
  120. {% endif %}
  121. {% for session in sessions %}
  122. <div class="span8 well-course">
  123. <div class="row">
  124. <div class="span4 ">
  125. <div class="categories-course-description">
  126. <h3>{{ session.name }}</h3>
  127. <h5>{{ 'From'|get_lang }} {{ session.access_start_date }} {{ 'Until'|get_lang }} {{ session.access_end_date }}</h5>
  128. {% if session.enrolled == "YES" %}
  129. <span class="label label-info">{{ 'TheUserIsAlreadyRegisteredInTheSession'|get_plugin_lang('BuyCoursesPlugin') }}</span>
  130. {% endif %}
  131. {% if session.enrolled == "TMP" %}
  132. <span class="label label-warning">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</span>
  133. {% endif %}
  134. </div>
  135. </div>
  136. <div class="span right">
  137. <div class="sprice right">
  138. {{ session.price }} {{ currency }}
  139. </div>
  140. <div class="cleared"></div>
  141. <div class="btn-group right">
  142. {% if session.enrolled == "NO" %}
  143. <a class="btn btn-success" title="" href="{{ server }}plugin/buycourses/src/process.php?scode={{ session.session_id }}">
  144. {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  145. </a>
  146. {% endif %}
  147. </div>
  148. </div>
  149. </div>
  150. {% for course in session.courses %}
  151. <div class="row">
  152. <div class="span">
  153. <div class="thumbnail">
  154. <a class="ajax" rel="gb_page_center[778]" title="" href="{{ server }}plugin/buycourses/src/ajax.php?code={{ course.code }}">
  155. <img alt="" src="{{ server }}{{ course.course_img }}">
  156. </a>
  157. </div>
  158. </div>
  159. <div class="span4">
  160. <div class="categories-course-description">
  161. <h3>{{ course.title }}</h3>
  162. <h5>{{ 'Teacher'|get_lang }}: {{ course.teacher }}</h5>
  163. </div>
  164. {% if course.enrolled == "YES" %}
  165. <span class="label label-info">{{ 'TheUserIsAlreadyRegisteredInTheCourse'|get_plugin_lang('BuyCoursesPlugin') }}</span>
  166. {% endif %}
  167. {% if course.enrolled == "TMP" %}
  168. <span class="label label-warning">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</span>
  169. {% endif %}
  170. </div>
  171. <div class="span right">
  172. <div class="cleared"></div>
  173. <div class="btn-group right">
  174. <a class="ajax btn btn-primary" title="" href="{{ server }}plugin/buycourses/src/ajax.php?code={{ course.code }}">
  175. {{ 'Description'|get_lang }}
  176. </a>
  177. </div>
  178. </div>
  179. </div>
  180. {% endfor %}
  181. </div>
  182. {% endfor %}
  183. </div>
  184. </div>
  185. </div>
  186. {% endif %}