fix: ui for review, instructors and profile

This commit is contained in:
Jannat Patel
2022-09-05 18:05:16 +05:30
parent 3a08f57fb1
commit 36aca1e664
5 changed files with 25 additions and 11 deletions
+5 -3
View File
@@ -90,10 +90,12 @@
<a class="button-links" href="{{ get_profile_url(instructors[0].username) }}">
<span class="course-instructor">
{% 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 %}
</span>
</a>
+1 -1
View File
@@ -4,7 +4,7 @@
<div class="mb-5">
<span class="course-home-headings"> {{ _("Reviews") }} </span>
{% if is_eligible_to_review(course.name, membership) and reviews | length %}
<span class="review-link button is-secondary pull-right">
<span class="btn btn-secondary btn-sm review-link">
{{ _("Write a review") }}
</span>
{% endif %}