fix: course home, course cards and course outline cleanup
This commit is contained in:
@@ -17,10 +17,33 @@
|
||||
<div class="course-card-content">
|
||||
<div class="course-card-meta">
|
||||
{% if get_lessons(course.name) | length %}
|
||||
<span>
|
||||
<div class="vertically-center">
|
||||
<svg class="icon icon-md">
|
||||
<use href="#icon-education"></use>
|
||||
</svg>
|
||||
{{ get_lessons(course.name) | length }} {{ _("Lessons") }}
|
||||
</span>
|
||||
</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>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="course-card-title">{{ course.title }}</div>
|
||||
|
||||
@@ -59,22 +82,6 @@
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
{% set student_count = get_students(course.name) | length %}
|
||||
<span class="course-student-count">
|
||||
{% if student_count %}
|
||||
<span class="vertically-center mr-3">
|
||||
<img class="icon-background" src="/assets/school/icons/user.svg" />
|
||||
{{ student_count }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% set avg_rating = get_average_rating(course.name) %}
|
||||
{% if avg_rating %}
|
||||
<span class="vertically-center">
|
||||
<img class="icon-background" src="/assets/school/icons/rating.svg" />
|
||||
{{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if read_only %}
|
||||
|
||||
Reference in New Issue
Block a user