Lot of fixes in the new Smarty templates + adding star average , user vote + improving hot courses block (new tpl file hot_courses.tpl)
parent
d444e1634e
commit
2bd6f4fd64
@ -0,0 +1,60 @@ |
||||
<script type="text/javascript"> |
||||
$(document).ready( function() { |
||||
$('.star-rating li a').click(function(){ |
||||
|
||||
var id = $(this).parents('ul').attr('id'); |
||||
|
||||
$('#vote_label2_' + id).html("{'Loading'|get_lang}"); |
||||
|
||||
$.ajax({ |
||||
url: $(this).attr('rel'), |
||||
success: function(data) { |
||||
if(data == 'added') { |
||||
$('#vote_label2_' + id).html("{'Saved'|get_lang}"); |
||||
} |
||||
if(data == 'updated') { |
||||
$('#vote_label2_' + id).html("{'Saved'|get_lang}"); |
||||
} |
||||
} |
||||
}) |
||||
}); |
||||
}); |
||||
</script> |
||||
|
||||
{if !(empty($hot_courses)) } |
||||
<h3>{"HottestCourses"|get_lang}</h3> |
||||
{foreach $hot_courses as $hot_course} |
||||
<div class="categories-block-course"> |
||||
<div class="categories-content-course"> |
||||
|
||||
<div class="categories-course-picture"> |
||||
{html_image file=$hot_course.extra_info.course_image} |
||||
</div> |
||||
|
||||
<div class="categories-course-description"> |
||||
<div class="course-block-title">{$hot_course.extra_info.name|truncate:60}</div> |
||||
{$hot_course.extra_info.rating_html} |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="categories-course-links"> |
||||
<div class="course-link-desc right"> |
||||
{if ($hot_course.extra_info.visibility == 3)} |
||||
<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}"> |
||||
{"Description"|get_lang} |
||||
</a> |
||||
{/if} |
||||
</div> |
||||
|
||||
{* World *} |
||||
{if ($hot_course.extra_info.visibility == 3)} |
||||
<div class="course-link-desc right"> |
||||
<a class="a_button gray small" title="" href="{$_p.web_course}{$hot_course.extra_info.path}/index.php"> |
||||
{"GoToCourse"|get_lang} |
||||
</a> |
||||
</div> |
||||
{/if} |
||||
</div> |
||||
</div> |
||||
{/foreach} |
||||
{/if} |
@ -1,25 +1,32 @@ |
||||
{extends file="default/layout/main.tpl"} |
||||
|
||||
{* Header *} |
||||
{block name=header} |
||||
{if $show_header == 1} |
||||
{include file="default/layout/header.tpl"} |
||||
{/if} |
||||
|
||||
{/block} |
||||
|
||||
|
||||
{* 1 column *} |
||||
{block name=body} |
||||
|
||||
{* Actions *} |
||||
{if (!empty($actions) ) } |
||||
<div class="actions"> |
||||
{$actions} |
||||
</div> |
||||
{/if} |
||||
|
||||
{* Notifications*} |
||||
{$message} |
||||
|
||||
{* Main content *} |
||||
{$content} |
||||
{/block} |
||||
|
||||
{* Footer *} |
||||
{block name=footer} |
||||
{if $show_header == 1} |
||||
{include file="default/layout/footer.tpl"} |
||||
{/if} |
||||
{/block} |
||||
{/block} |
Loading…
Reference in new issue