|
1 | | -{% load i18n review_tags %} |
| 1 | +{% load i18n review_tags heroicons %} |
2 | 2 |
|
3 | | -<div class="flex justify-around items-center px-2 bg-base-200"> |
4 | | - {% with recommendation|traffic_light as traffic_light_html %} |
5 | | - {% if traffic_light_html %} |
6 | | - <span class="py-1"> |
7 | | - {{ recommendation|traffic_light }} |
8 | | - </span> |
9 | | - {% endif %} |
10 | | - {% endwith %} |
| 3 | +{% with recommendation|traffic_light as traffic_light_html %} |
11 | 4 | {% with assigned_reviewers|average_review_score as average %} |
12 | | - {% if average %} |
13 | | - <span class="py-1 font-medium"> |
14 | | - {{ average }} |
15 | | - </span> |
| 5 | + {% if traffic_light_html or average %} |
| 6 | + <div class="flex justify-around items-center p-2 mb-2 bg-base-200"> |
| 7 | + {% if traffic_light_html %} |
| 8 | + <span>{{ recommendation|traffic_light }}</span> |
| 9 | + {% endif %} |
| 10 | + {% if average %} |
| 11 | + <span class="font-medium">{{ average }}</span> |
| 12 | + {% endif %} |
| 13 | + </div> |
16 | 14 | {% endif %} |
17 | 15 | {% endwith %} |
18 | | -</div> |
| 16 | +{% endwith %} |
19 | 17 |
|
20 | | -<ul class="mt-4 reviews-sidebar" id="id_reviewers" x-data='{showHiddenReviewers: false}'> |
21 | | - {% if not staff_reviewers_exist %} |
| 18 | +{% if not staff_reviewers_exist %} |
| 19 | + <p class="p-2 mb-2 alert alert-info alert-soft"> |
| 20 | + {% heroicon_outline "information-circle" aria_hidden="true" %} |
22 | 21 | {% if request.user.is_org_faculty %} |
23 | | - <li class="reviews-sidebar__no-reviews">{% trans "No staff reviewers yet" %}</li> |
24 | | - <hr class="reviews-sidebar__split"> |
| 22 | + {% trans "No staff reviewers yet" %} |
25 | 23 | {% else %} |
26 | | - <li class="reviews-sidebar__no-reviews">{% trans "No public reviews yet" %}</li> |
27 | | - <hr class="reviews-sidebar__split"> |
| 24 | + {% trans "No public reviews yet" %} |
28 | 25 | {% endif %} |
29 | | - {% endif %} |
| 26 | + </p> |
| 27 | +{% endif %} |
| 28 | + |
| 29 | +<ul class="reviews-sidebar list" id="id_reviewers" x-data='{showHiddenReviewers: false}'> |
30 | 30 |
|
31 | 31 | {% regroup assigned_reviewers by type as reviewers_list %} |
32 | 32 |
|
33 | 33 | {% for reviewer_type, reviewers in reviewers_list %} |
34 | | - {% if not forloop.first %} |
35 | | - {% ifchanged reviewer_type %} |
36 | | - <hr class="reviews-sidebar__split"> |
37 | | - {% endifchanged %} |
38 | | - {% endif %} |
39 | | - |
40 | 34 | {% for reviewer in reviewers %} |
41 | 35 | {% if reviewer_type.name in hidden_types %} |
42 | 36 | {% include 'funds/includes/review_sidebar_item.html' with reviewer=reviewer hidden=True %} |
|
45 | 39 | <li> |
46 | 40 | <a |
47 | 41 | role="button" |
48 | | - class="text-sm font-bold underline" |
| 42 | + class="mt-2 text-sm font-semibold link" |
49 | 43 | @click.prevent="showHiddenReviewers = !showHiddenReviewers" |
50 | 44 | href="#" |
51 | 45 | > |
52 | 46 | <span x-show="!showHiddenReviewers">{% trans "Show more..." %}</span> |
53 | 47 | <span x-cloak x-show="showHiddenReviewers">{% trans "Show less..." %}</span> |
54 | | - </a></li> |
| 48 | + </a> |
| 49 | + </li> |
55 | 50 | {% endif %} |
56 | 51 | {% else %} |
57 | 52 | {% include 'funds/includes/review_sidebar_item.html' with reviewer=reviewer %} |
|
0 commit comments