hot_courses.tpl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {% if hot_courses is not null and hot_courses is not empty %}
  2. <script>
  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. {% if _u.is_admin %}
  26. <span class="pull-right">
  27. <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">
  28. <img src="{{ "visible.png"|icon(32) }}">
  29. </a>
  30. </span>
  31. {% endif %}
  32. {{ "HottestCourses"|display_page_subheader }}
  33. </div>
  34. {% include app.template_style ~ '/layout/hot_course_item.tpl' %}
  35. </div>
  36. </section>
  37. {% endif %}