From 36aca1e664d6f76f0f0e6f7e215894276bfd3635 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Mon, 5 Sep 2022 18:05:16 +0530 Subject: [PATCH 1/2] fix: ui for review, instructors and profile --- lms/lms/widgets/CourseCard.html | 8 +++++--- lms/lms/widgets/Reviews.html | 2 +- lms/public/css/style.css | 10 ++++++++++ lms/www/batch/learn.html | 14 ++++++++------ lms/www/profiles/profile.html | 2 +- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/lms/lms/widgets/CourseCard.html b/lms/lms/widgets/CourseCard.html index e601811a..6c3b4599 100644 --- a/lms/lms/widgets/CourseCard.html +++ b/lms/lms/widgets/CourseCard.html @@ -90,10 +90,12 @@ {% if ins_len == 1 %} - {{ instructors[0].full_name }} + {{ instructors[0].full_name }} + {% elif ins_len == 2 %} + {{ instructors[0].full_name.split(" ")[0] }} and {{ instructors[1].full_name.split(" ")[0] }} {% else %} - {% set suffix = "other" if ins_len - 1 == 1 else "others" %} - {{ instructors[0].full_name.split(" ")[0] }} and {{ ins_len - 1 }} {{ suffix }} + {% set suffix = "other" if ins_len - 2 == 1 else "others" %} + {{ instructors[0].full_name.split(" ")[0] }}, {{ instructors[1].full_name.split(" ")[0] }} and {{ ins_len - 2 }} {{ suffix }} {% endif %} diff --git a/lms/lms/widgets/Reviews.html b/lms/lms/widgets/Reviews.html index b91ce99f..29015da1 100644 --- a/lms/lms/widgets/Reviews.html +++ b/lms/lms/widgets/Reviews.html @@ -4,7 +4,7 @@
{{ _("Reviews") }} {% if is_eligible_to_review(course.name, membership) and reviews | length %} - + {{ _("Write a review") }} {% endif %} diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 5a4c85ed..2fe71a33 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -1677,3 +1677,13 @@ li { margin-bottom: 1rem; } } + +.indicator-pill::before { + width: 0; + height: 0; + margin-right: 0; +} + +.review-link { + float: right +} diff --git a/lms/www/batch/learn.html b/lms/www/batch/learn.html index b8cfc684..5929946a 100644 --- a/lms/www/batch/learn.html +++ b/lms/www/batch/learn.html @@ -90,12 +90,14 @@ {% endfor %} - {% if ins_len == 1 %} - {{ instructors[0].full_name }} - {% else %} - {% set suffix = _("other") if ins_len - 1 == 1 else _("others") %} - {{ instructors[0].full_name.split(" ")[0] }} and {{ ins_len - 1 }} {{ suffix }} - {% endif %} + {% if ins_len == 1 %} + {{ instructors[0].full_name }} + {% elif ins_len == 2 %} + {{ instructors[0].full_name.split(" ")[0] }} and {{ instructors[1].full_name.split(" ")[0] }} + {% else %} + {% set suffix = "other" if ins_len - 2 == 1 else "others" %} + {{ instructors[0].full_name.split(" ")[0] }}, {{ instructors[1].full_name.split(" ")[0] }} and {{ ins_len - 2 }} {{ suffix }} + {% endif %}
{{ frappe.utils.format_date(lesson.creation, "medium") }}
diff --git a/lms/www/profiles/profile.html b/lms/www/profiles/profile.html index 962f4cea..3a4a6560 100644 --- a/lms/www/profiles/profile.html +++ b/lms/www/profiles/profile.html @@ -58,7 +58,7 @@ {% if frappe.session.user == member.email %} {% endif %}
From ce7f3ffca9da5f729f21a25644ed6da8452c707e Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 6 Sep 2022 11:38:40 +0530 Subject: [PATCH 2/2] fix: no preview message --- lms/lms/widgets/CourseCard.html | 4 ++-- lms/www/batch/learn.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lms/lms/widgets/CourseCard.html b/lms/lms/widgets/CourseCard.html index 6c3b4599..a7555a65 100644 --- a/lms/lms/widgets/CourseCard.html +++ b/lms/lms/widgets/CourseCard.html @@ -94,8 +94,8 @@ {% elif ins_len == 2 %} {{ instructors[0].full_name.split(" ")[0] }} and {{ instructors[1].full_name.split(" ")[0] }} {% else %} - {% set suffix = "other" if ins_len - 2 == 1 else "others" %} - {{ instructors[0].full_name.split(" ")[0] }}, {{ instructors[1].full_name.split(" ")[0] }} and {{ ins_len - 2 }} {{ suffix }} + {% set suffix = "other" if ins_len - 1 == 1 else "others" %} + {{ instructors[0].full_name.split(" ")[0] }} and {{ ins_len - 1 }} {{ suffix }} {% endif %} diff --git a/lms/www/batch/learn.html b/lms/www/batch/learn.html index 5929946a..78896567 100644 --- a/lms/www/batch/learn.html +++ b/lms/www/batch/learn.html @@ -95,8 +95,8 @@ {% elif ins_len == 2 %} {{ instructors[0].full_name.split(" ")[0] }} and {{ instructors[1].full_name.split(" ")[0] }} {% else %} - {% set suffix = "other" if ins_len - 2 == 1 else "others" %} - {{ instructors[0].full_name.split(" ")[0] }}, {{ instructors[1].full_name.split(" ")[0] }} and {{ ins_len - 2 }} {{ suffix }} + {% set suffix = "other" if ins_len - 1 == 1 else "others" %} + {{ instructors[0].full_name.split(" ")[0] }} and {{ ins_len - 1 }} {{ suffix }} {% endif %} @@ -124,9 +124,9 @@ {% set course_link = "" + _('here') + "" %}
- {{ _("This lesson is not available for preview. + {{ _("There is no preview available for this lesson. Please join the course to access it. - Click {0} to join the course.").format(course_link) }} + Click {0} to enroll.").format(course_link) }}
{% endif %}