hot_courses.tpl 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {if !(empty($hot_courses)) }
  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. <h3>{"HottestCourses"|get_lang}</h3>
  26. </div>
  27. {foreach $hot_courses as $hot_course}
  28. <div class="span9">
  29. <div class="categories-block-course ">
  30. <div class="categories-content-course">
  31. <div class="categories-course-picture">
  32. <img src="{$hot_course.extra_info.course_image}" />
  33. {* html_image file=$hot_course.extra_info.course_image *}
  34. </div>
  35. <div class="categories-course-description">
  36. <div class="course-block-title">{$hot_course.extra_info.name|truncate:60}</div>
  37. {$hot_course.extra_info.rating_html}
  38. </div>
  39. </div>
  40. <div class="categories-course-links">
  41. <div class="course-link-desc right">
  42. {if ($hot_course.extra_info.visibility == 3)}
  43. <a class="ajax a_button white small" title="" href="{$_p.web_ajax}course_home.ajax.php?a=show_course_information&code={$hot_course.course_code}">
  44. {"Description"|get_lang}
  45. </a>
  46. {/if}
  47. </div>
  48. {* World *}
  49. {if ($hot_course.extra_info.visibility == 3)}
  50. <div class="course-link-desc right">
  51. <a class="a_button gray small" title="" href="{$_p.web_course}{$hot_course.extra_info.path}/index.php">
  52. {"GoToCourse"|get_lang}
  53. </a>
  54. </div>
  55. {/if}
  56. </div>
  57. </div>
  58. </div>
  59. {/foreach}
  60. </div>
  61. </section>
  62. {/if}