hot_courses.tpl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {% if hot_courses is not null and hot_courses is not empty %}
  2. <script>
  3. $(document).ready( function() {
  4. $('.star-rating li a').on('click', function(event) {
  5. var id = $(this).parents('ul').attr('id');
  6. $('#vote_label2_' + id).html("{{'Loading'|get_lang}}");
  7. $.ajax({
  8. url: $(this).attr('data-link'),
  9. success: function(data) {
  10. $("#rating_wrapper_"+id).html(data);
  11. if (data == 'added') {
  12. //$('#vote_label2_' + id).html("{{'Saved'|get_lang}}");
  13. }
  14. if (data == 'updated') {
  15. //$('#vote_label2_' + id).html("{{'Saved'|get_lang}}");
  16. }
  17. }
  18. });
  19. });
  20. });
  21. </script>
  22. <section class="hot-courses container">
  23. <div class="hot-course-head">
  24. <h2 class="section-title">
  25. {{ "HottestCourses"|get_lang}}
  26. {% if _u.is_admin %}
  27. <span class="pull-right">
  28. <a title="{{ "Hide"|get_lang }}" alt="{{ "Hide"|get_lang }}" href="{{ _p.web_main }}admin/settings.php?search_field=show_hot_courses&submit_button=&_qf__search_settings=&category=search_setting">
  29. <img src="{{ "eyes.png"|icon(22) }}" width="22" height="22">
  30. </a>
  31. </span>
  32. {% endif %}
  33. </h2>
  34. </div>
  35. <div class="grid-courses">
  36. <div class="row">
  37. {% include template ~ '/layout/hot_course_item.tpl' %}
  38. </div>
  39. </div>
  40. </section>
  41. {% endif %}