hot_courses.tpl 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {% if hot_courses is not null and hot_courses is not empty %}
  2. <script type="text/javascript">
  3. $(document).ready( function() {
  4. $('.star-rating li a').live('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 id="hot_courses">
  23. <div class="row">
  24. <div class="span9">
  25. {{"HottestCourses"|display_page_header}}
  26. </div>
  27. {% for hot_course in hot_courses %}
  28. <div class="span9">
  29. <div class="well_border">
  30. <div class="row">
  31. <div class="span2">
  32. <div class="thumbnail">
  33. <img src="{{ hot_course.extra_info.course_image }}" />
  34. {# html_image file=$hot_course.extra_info.course_image #}
  35. </div>
  36. </div>
  37. <div class="span6">
  38. <div class="categories-course-description">
  39. <h3>{{ hot_course.extra_info.name }}</h3>
  40. {{ hot_course.extra_info.rating_html }}
  41. </div>
  42. <p>
  43. {# World #}
  44. {% if hot_course.extra_info.visibility == 3 or (hot_course.extra_info.visibility == 2 and _u.logged == 1 ) %}
  45. <a class="btn btn-primary" title="" href="{{_p.web_course}}{{hot_course.extra_info.path}}/index.php">
  46. {{ "GoToCourse"|get_lang }}
  47. </a>
  48. {% endif %}
  49. {# Description #}
  50. {% if hot_course.extra_info.visibility == 3 %}
  51. <a class="ajax btn" title="" href="{{ _p.web_ajax}}course_home.ajax.php?a=show_course_information&code={{hot_course.course_code}}">
  52. {{"Description"|get_lang}}
  53. </a>
  54. {% endif %}
  55. </p>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. {% endfor %}
  61. </div>
  62. </section>
  63. {% endif %}