Skip to content

Commit 5e99fe5

Browse files
authored
Fix participant photo in the review system and grant nationality (#4310)
1 parent f2bfe76 commit 5e99fe5

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

backend/reviews/templates/grant-review.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h2 class="grant-header">
114114

115115
<div class="review-row">
116116
<strong>Nationality</strong>
117-
<div>{{grant.get_nationality_display}}</div>
117+
<div>{{grant.nationality}}</div>
118118
</div>
119119

120120
<div class="review-row">

backend/reviews/templates/proposal-review.html

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -191,24 +191,6 @@ <h2>Speaker</h2>
191191
<strong>Name</strong>
192192
<div>{{speaker.fullname}}</div>
193193
</div>
194-
<div class="review-row">
195-
<strong>Country</strong>
196-
<div>{{speaker.country | countryname}}</div>
197-
</div>
198-
<div class="review-row">
199-
<strong>Speaker Experience</strong>
200-
<div>{{participant.get_speaker_level_display}}</div>
201-
</div>
202-
<div class="review-row">
203-
<strong>Previous Talk Video</strong>
204-
<div>
205-
{% if participant.previous_talk_video %}
206-
<a target="_blank" rel="noreferrer noopener" href="{{participant.previous_talk_video}}">
207-
{{participant.previous_talk_video}}
208-
</a>
209-
{% endif %}
210-
</div>
211-
</div>
212194
<div class="review-row">
213195
<strong>Requested a grant?</strong>
214196
{% if grant %}
@@ -230,13 +212,21 @@ <h2>Speaker</h2>
230212
</div>
231213
{% endif %}
232214
<div class="review-row">
233-
<strong>Bio</strong>
234-
<div>{{participant.bio|linebreaksbr}}</div>
215+
<strong>Country</strong>
216+
<div>{{speaker.country | countryname}}</div>
235217
</div>
236218
<div class="review-row">
237-
<strong>Participant Info</strong>
219+
<strong>Speaker Experience</strong>
220+
<div>{{participant.get_speaker_level_display}}</div>
221+
</div>
222+
<div class="review-row">
223+
<strong>Previous Talk Video</strong>
238224
<div>
239-
<a href="{% url 'admin:participants_participant_change' participant.id %}" target="_blank">Open Participant in admin</a>
225+
{% if participant.previous_talk_video %}
226+
<a target="_blank" rel="noreferrer noopener" href="{{participant.previous_talk_video}}">
227+
{{participant.previous_talk_video}}
228+
</a>
229+
{% endif %}
240230
</div>
241231
</div>
242232
</fieldset>

backend/schedule/templates/includes/participant/view_info.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22

33
{% block extrastyle %}
44
<link rel="stylesheet" href="{% static "admin/css/forms.css" %}">
5+
<style>
6+
.participant-info .form-row {
7+
display: grid;
8+
grid-template-columns: auto 1fr;
9+
}
10+
.participant-info .form-row a {
11+
display: flex;
12+
gap: 5px;
13+
}
14+
</style>
515
{% endblock %}
616

717
{% if participant %}
8-
<fieldset class="module aligned ">
18+
<fieldset class="module aligned participant-info">
919
<h2>{{ title }}</h2>
1020

1121
<div class="form-row">
@@ -16,10 +26,12 @@ <h2>{{ title }}</h2>
1626
</a>
1727
</div>
1828

29+
{% if participant.photo_file_id %}
1930
<div class="form-row">
2031
<label>Avatar</label>
21-
<img src="{{participant.photo}}" style="object-fit: contain;" width="200" height="200" />
32+
<img src="{{participant.photo_file.url}}" style="object-fit: contain;" width="200" height="200" />
2233
</div>
34+
{% endif %}
2335

2436
<div class="form-row">
2537
<label>Bio</label>

0 commit comments

Comments
 (0)