fix: icon position on course card

This commit is contained in:
Jannat Patel
2022-03-17 15:17:21 +05:30
parent 9351edebe0
commit 984054f00f

View File

@@ -25,25 +25,27 @@
</div>
{% endif %}
{% set student_count = get_students(course.name) | length %}
{% if student_count %}
<div class="vertically-center">
<svg class="icon icon-md">
<use class="" href="#icon-users">
</svg>
{{ student_count }}
</div>
{% endif %}
{% set avg_rating = get_average_rating(course.name) %}
{% if avg_rating %}
<div class="vertically-center">
<svg class="icon icon-md">
<use href="#icon-star"></use>
</svg>
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
</div>
<div class="vertically-center">
{% set student_count = get_students(course.name) | length %}
{% if student_count %}
<div class="vertically-center">
<svg class="icon icon-md">
<use class="" href="#icon-users">
</svg>
{{ student_count }}
</div>
{% endif %}
{% set avg_rating = get_average_rating(course.name) %}
{% if avg_rating %}
<div class="vertically-center ml-3">
<svg class="icon icon-md">
<use href="#icon-star"></use>
</svg>
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
</div>
{% endif %}
</div>
</div>
<div class="course-card-title">{{ course.title }}</div>