forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchange_reviewer_settings.html
More file actions
168 lines (168 loc) · 6.85 KB
/
change_reviewer_settings.html
File metadata and controls
168 lines (168 loc) · 6.85 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% origin %}
{% load ietf_filters static django_bootstrap5 person_filters %}
{% block pagehead %}
<link rel="stylesheet" href="{% static 'ietf/css/datepicker.css' %}">
<link rel="stylesheet" href="{% static 'ietf/css/list.css' %}">
{% endblock %}
{% block title %}Change {{ group.acronym }} reviewer settings for {{ reviewer_email }}{% endblock %}
{% block content %}
{% origin %}
<h1>
Change {{ group.acronym }} reviewer settings
<br>
<small class="text-body-secondary">{{ reviewer_email }}</small>
</h1>
<h2 class="mt-5">Settings</h2>
<form class="my-3 change-reviewer-settings" method="post">
{% csrf_token %}
{% bootstrap_form settings_form %}
<a href="{{ back_url }}" class="btn btn-secondary float-end">Back</a>
<button class="btn btn-primary"
type="submit"
name="action"
value="change_settings">Save</button>
</form>
<h2 class="mt-5">Unavailable periods</h2>
<p>
You can register periods where reviews should not be assigned.
</p>
{% if unavailable_periods %}
<table class="table table-sm tablesorter">
<thead>
<tr>
<th scope="col" data-sort="date">Period</th>
<th scope="col" data-sort="availability">Availability</th>
<th scope="col" data-sort="reason">Reason</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
{% for o in unavailable_periods %}
<tr class="unavailable-period-{{ o.state }}">
<td>{{ o.start_date|default:"indefinite" }} - {{ o.end_date|default:"indefinite" }}</td>
<td>{{ o.get_availability_display }}</td>
<td>{{ o.reason }}</td>
<td>
{% if not o.end_date %}
<form class="row row-cols-sm-auto g-3 align-items-center" method="post">
{% csrf_token %}
<input type="hidden" name="period_id" value="{{ o.pk }}">
{% bootstrap_form o.end_form layout="inline" size="sm" %}
<button type="submit"
class="btn btn-primary btn-sm"
name="action"
value="end_period">End period</button>
</form>
{% endif %}
</td>
<td class="text-end">
<form method="post">
{% csrf_token %}
<input type="hidden" name="period_id" value="{{ o.pk }}">
<button type="submit"
class="btn btn-danger btn-sm"
name="action"
value="delete_period">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</table>
{% else %}
<p class="alert alert-info my-3">
No periods found.
</p>
{% endif %}
<div class="my-3">
<a class="btn btn-primary"
data-bs-toggle="collapse"
data-bs-target="#add-new-period">Add a new period</a>
</div>
<div id="add-new-period"
{% if not period_form.errors %}class="collapse"{% endif %}>
<form method="post">
{% csrf_token %}
{% bootstrap_form period_form %}
<button type="submit"
class="btn btn-primary"
name="action"
value="add_period">Save new period</button>
</form>
</div>
<h2 class="mt-5">History of settings</h2>
<div id="history-settings">
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="date">Date</th>
<th scope="col" data-sort="by">By</th>
<th scope="col" data-sort="description">Description</th>
</tr>
</thead>
{% if reviewersettings.history.all %}
<tbody>
{% for h in reviewersettings.history.all %}
{% if h|simple_history_delta_change_cnt > 0 or h.history_change_reason != "skipped" and h.history_change_reason %}
<tr>
<td>{{ h.history_date|date }}</td>
<td>{% person_link h.history_user.person %}</td>
<td>{% if h.history_change_reason != "skipped" and h.history_change_reason %} {{ h.history_change_reason }}<br> {% endif %}
{% for change in h|simple_history_delta_changes %}
{{ change.field }} changed from "{{change.old}}" to "{{change.new}}"<br>
{% endfor %}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
<h2 class="mt-5">History of unavailable periods</h2>
<div id="history-unavail">
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="date">Date</th>
<th scope="col" data-sort="by">
By
</th>
<th scope="col" data-sort="description">
Description
</th>
</tr>
</thead>
{% if unavailable_periods_history.all %}
<tbody>
{% for h in unavailable_periods_history.all %}
<tr>
<td>
{{ h.history_date|date }}
</td>
<td>
{% person_link h.history_user.person %}
</td>
<td>
{{ h.history_change_reason }}
</td>
</tr>
{% endfor %}
</tbody>
{% endif %}
</table>
</div>
<p class="mt-3">
<a href="{{ back_url }}" class="btn btn-primary">
Back
</a>
</p>
{% endblock %}
{% block js %}
<script src="{% static 'ietf/js/datepicker.js' %}">
</script>
<script src="{% static 'ietf/js/list.js' %}">
</script>
{% endblock %}