fix box card - refs #2681
parent
aa899b6dc0
commit
eff1c55d2e
@ -1,47 +1,43 @@ |
||||
{% autoescape false %} |
||||
{% if hot_courses is not null and hot_courses is not empty %} |
||||
<script> |
||||
$(document).ready( function() { |
||||
$('.star-rating li a').on('click', function(event) { |
||||
var id = $(this).parents('ul').attr('id'); |
||||
$('#vote_label2_' + id).html("{{'Loading'|get_lang}}"); |
||||
$.ajax({ |
||||
url: $(this).attr('data-link'), |
||||
success: function(data) { |
||||
$("#rating_wrapper_"+id).html(data); |
||||
if (data == 'added') { |
||||
//$('#vote_label2_' + id).html("{{'Saved'|get_lang}}"); |
||||
} |
||||
if (data == 'updated') { |
||||
//$('#vote_label2_' + id).html("{{'Saved'|get_lang}}"); |
||||
} |
||||
} |
||||
}); |
||||
}); |
||||
}); |
||||
</script> |
||||
|
||||
<div class="box-header"> |
||||
<h5> |
||||
{% if is_granted('ROLE_ADMIN') %} |
||||
<div class="float-right"> |
||||
<a title="{{ "Hide"|get_lang }}" |
||||
alt="{{ "Hide"|get_lang }}" |
||||
class="btn btn-light btn-sm" |
||||
href="{{ url('admin_settings') }}/search_settings?keyword=show_hot_courses&submit_button=&_qf__search_settings=&category=search_setting" |
||||
> |
||||
<i class="fas fa-pencil-alt"></i> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
{{ "HottestCourses"|get_lang}} |
||||
</h5> |
||||
</div> |
||||
<div class="grid-courses"> |
||||
<div class="row"> |
||||
{% include '@ChamiloCore/default/layout/hot_course_item.html.twig' %} |
||||
{% if hot_courses is not null and hot_courses is not empty %} |
||||
<script> |
||||
$(document).ready(function () { |
||||
$('.star-rating li a').on('click', function (event) { |
||||
var id = $(this).parents('ul').attr('id'); |
||||
$('#vote_label2_' + id).html("{{ 'Loading'|get_lang }}"); |
||||
$.ajax({ |
||||
url: $(this).attr('data-link'), |
||||
success: function (data) { |
||||
$("#rating_wrapper_" + id).html(data); |
||||
if (data == 'added') { |
||||
//$('#vote_label2_' + id).html("{{ 'Saved'|get_lang }}"); |
||||
} |
||||
if (data == 'updated') { |
||||
//$('#vote_label2_' + id).html("{{ 'Saved'|get_lang }}"); |
||||
} |
||||
} |
||||
}); |
||||
}); |
||||
}); |
||||
</script> |
||||
<div class="box-header"> |
||||
<h5> |
||||
{% if is_granted('ROLE_ADMIN') %} |
||||
<div class="float-right"> |
||||
<a title="{{ "Hide"|get_lang }}" class="btn btn-light btn-sm" |
||||
href="{{ url('admin_settings') }}/search_settings?keyword=show_hot_courses&submit_button=&_qf__search_settings=&category=search_setting" |
||||
> |
||||
<i class="fas fa-pencil-alt"></i> |
||||
</a> |
||||
</div> |
||||
{% endif %} |
||||
{{ "HottestCourses"|get_lang }} |
||||
</h5> |
||||
</div> |
||||
</div> |
||||
<div class="card-columns">- |
||||
|
||||
{% include '@ChamiloCore/default/layout/hot_course_item.html.twig' %} |
||||
|
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
{% endautoescape %} |
||||
Loading…
Reference in new issue