From 125b8d61d9dfbc82303c64d3909ca127822f7bdb Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 1 Nov 2021 13:33:42 +0530 Subject: [PATCH 1/2] style: course cards, card dividers, breadcrumbs --- school/lms/widgets/CourseCard.html | 16 ++++++++-------- school/public/css/style.css | 12 ++++++++---- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/school/lms/widgets/CourseCard.html b/school/lms/widgets/CourseCard.html index 9ef7e1ac..669afd0c 100644 --- a/school/lms/widgets/CourseCard.html +++ b/school/lms/widgets/CourseCard.html @@ -51,13 +51,13 @@ {% if course.get_students() | length %} - + {{ course.get_students() | length }} {% endif %} {% set avg_rating = course.get_average_rating() %} {% if avg_rating %} - + {{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }} @@ -77,36 +77,36 @@ {% if certificate %} {% elif course.enable_certification and progress == 100 %} {% elif progress == 100 %} {% elif course.upcoming %} {% elif membership %} {% else %} diff --git a/school/public/css/style.css b/school/public/css/style.css index 3c78f8cc..a63db3b7 100644 --- a/school/public/css/style.css +++ b/school/public/css/style.css @@ -151,12 +151,12 @@ input[type=checkbox] { } .card-divider { - border: 1px solid #EEF0F2; + border-top: 1px solid #EEF0F2; margin-bottom: 1rem; } .card-divider-dark { - border: 1px solid #C8CFD5; + border-top: 1px solid #C8CFD5; margin-bottom: 16px; } @@ -168,8 +168,8 @@ input[type=checkbox] { } .course-student-count { + display: flex; font-size: 12px; - line-height: 135%; float: right; } @@ -907,7 +907,6 @@ input[type=checkbox] { } .breadcrumb { - padding: 0 1rem; display: flex; align-items: center; font-size: 12px; @@ -1376,3 +1375,8 @@ pre { border-radius: 8px; padding: 2.5rem; } + +.vertically-center { + display: flex; + align-items: center; +} From 43311dfb739b68fc82296976d41967c3faaa110c Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 1 Nov 2021 14:46:16 +0530 Subject: [PATCH 2/2] fix: made course filter mandatory for course progress summary report --- .../report/course_progress_summary/course_progress_summary.js | 3 ++- school/lms/widgets/CourseCard.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/school/lms/report/course_progress_summary/course_progress_summary.js b/school/lms/report/course_progress_summary/course_progress_summary.js index 668e5000..3d1150a8 100644 --- a/school/lms/report/course_progress_summary/course_progress_summary.js +++ b/school/lms/report/course_progress_summary/course_progress_summary.js @@ -8,7 +8,8 @@ frappe.query_reports["Course Progress Summary"] = { "fieldname": "course", "label": __("Course"), "fieldtype": "Link", - "options": "LMS Course" + "options": "LMS Course", + "reqd": 1, } ] }; diff --git a/school/lms/widgets/CourseCard.html b/school/lms/widgets/CourseCard.html index 669afd0c..f6bcd26d 100644 --- a/school/lms/widgets/CourseCard.html +++ b/school/lms/widgets/CourseCard.html @@ -51,13 +51,13 @@ {% if course.get_students() | length %} - + {{ course.get_students() | length }} {% endif %} {% set avg_rating = course.get_average_rating() %} {% if avg_rating %} - + {{ frappe.utils.flt(avg_rating, frappe.get_system_settings("float_precision") or 3) }}