-
Notifications
You must be signed in to change notification settings - Fork 0
/
nomination_detail.html
85 lines (71 loc) · 3.72 KB
/
nomination_detail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{% extends "site_base.html" %}
{% load uni_form_tags %}
{% load humanize i18n %}
{% load pagination_tags %}
{% load timezone_filters %}
{% load avatar_tags %}
{% load badge_tags %}
{% block head_title %}{% trans "Nomination details" %}{% endblock %}
{% block body %}
{% url profile_detail username=nomination.nominator.username as nominator_url %}
{% url profile_detail username=nomination.approved_by.username as approved_by_url %}
<div class="badge_nomination">
<div class="crumbs">
<a href="{% url badge_index %}">Badges</a>
>
<a href="{{ nomination.badge.get_absolute_url }}">{{ nomination.badge.title }}</a>
>
<b>Nomination
for {{ nomination.nominee }}
from {{ nomination.nominator }}
</b>
</div>
{% with nomination.badge as badge %}
{% include "badges/elements/badge_display_full.html" %}
{% endwith %}
<div class="sections">
<div class="section">
<p>
<a href="{{ nominator_url }}" class="avatar"><img src="{% avatar_url nomination.nominator 32 %}" alt="Photo of {{ nomination.nominator }}" class="photo" /></a>
{{ nomination.created_at|naturalday:_("MONTH_DAY_FORMAT")|capfirst }} at {{ nomination.created_at|localtime:account.timezone|time:"P" }},
<a href="{{ nominator_url }}">{{ nomination.nominator }}</a>
nominated
<a href="{{ nomination.nominee.get_absolute_url }}">{{ nomination.nominee }}</a>
for the badge
"<a href="{{ nomination.badge.get_absolute_url }}">{{ nomination.badge.title }}</a>"
because
"{{ nomination.reason_why }}"
</p>
{% if not nomination.approved %}
{% if permissions.approval or permissions.rejection %}
<form action="" method="POST" id="nomination-form" class="uniForm">
{% csrf_token %}
<fieldset class="inlineLabels">
{{ decision_form|as_uni_form }}
<div class="form_block">
{% if permissions.approval %}
<button type="submit" name="action_approve">Approve</button>
{% endif %}
{% if permissions.rejection %}
<button type="submit" name="action_reject">Reject</button>
{% endif %}
</div>
</fieldset>
</form>
{% else %}
<p>This nomination has not yet been approved.</p>
{% endif %}
{% else %}
<p>
<a href="{{ approved_by_url }}" class="avatar"><img src="{% avatar_url nomination.approved_by 32 %}" alt="Photo of {{ nomination.approved_by }}" class="photo" /></a>
{{ nomination.updated_at|naturalday:_("MONTH_DAY_FORMAT")|capfirst }} at {{ nomination.updated_at|localtime:account.timezone|time:"P" }},
<a href="{{ approved_by_url }}">{{ nomination.approved_by }}</a> approved this nomination
{% if nomination.approved_why %}
because "{{ nomination.approved_why }}"
{% endif %}
</p>
{% endif %}
</div>
</div>
</div>
{% endblock %}