forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchange_reviewer_settings.html
More file actions
128 lines (110 loc) · 4.02 KB
/
change_reviewer_settings.html
File metadata and controls
128 lines (110 loc) · 4.02 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
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}{% origin %}
{% load ietf_filters static bootstrap3 %}
{% block pagehead %}
<link rel="stylesheet" href="{% static 'bootstrap-datepicker/css/bootstrap-datepicker3.min.css' %}">
{% endblock %}
{% block title %}Change reviewer settings for {{ group.acronym }} for {{ reviewer_email }}{% endblock %}
{% block content %}
{% origin %}
<h1>Change reviewer settings for {{ group.acronym }} for {{ reviewer_email }}</h1>
<h3>Settings</h3>
<form class="change-reviewer-settings" method="post">{% csrf_token %}
{% bootstrap_form settings_form %}
{% buttons %}
<a href="{{ back_url }}" class="btn btn-default pull-right">Cancel</a>
<button class="btn btn-primary" type="submit" name="action" value="change_settings">Save</button>
{% endbuttons %}
</form>
<h3>Unavailable periods</h3>
<p>You can register periods where reviews should not be assigned.</p>
{% if unavailable_periods %}
<table class="table">
<th>Period</th>
<th>Availability</th>
<th>Reason</th>
<th> </th>
<th> </th>
{% 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 method="post" class="form-inline" style="display:inline-block">
{% csrf_token %}
<input type="hidden" name="period_id" value="{{ o.pk }}">
{% bootstrap_form o.end_form layout="inline" %}
<button type="submit" class="btn btn-default btn-sm" name="action" value="end_period">End period</button>
</form>
{% endif %}
</td>
<td>
<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>No periods found.</p>
{% endif %}
<div><a class="btn btn-default" data-toggle="collapse" data-target="#add-new-period">Add a new period</a></div>
<div id="add-new-period" {% if not period_form.errors %}class="collapse"{% endif %}>
<h4>Add a new period</h4>
<form method="post">
{% csrf_token %}
{% bootstrap_form period_form %}
{% buttons %}
<button type="submit" class="btn btn-primary" name="action" value="add_period">Add period</button>
{% endbuttons %}
</form>
</div>
<h3>History of settings</h3>
<div id="history">
<table class="table table-condensed table-striped">
<tr>
<th class="col-md-1">Date</th>
<th class="col-md-1">By</th>
<th class="col-md-10">Description</th>
</tr>
{% for h in reviewersettings.history.all %}
<tr>
<td>{{h.history_date|date}}</td>
<td>{{h.history_user.person}}</td>
<td>{{h.history_change_reason}}</td>
</tr>
{% endfor %}
</table>
</div>
<h3>History of unavailable periods</h3>
<div id="history">
<table class="table table-condensed table-striped">
<tr>
<th class="col-md-1">Date</th>
<th class="col-md-1">By</th>
<th class="col-md-10">Description</th>
</tr>
{% for h in unavailable_periods_history.all %}
<tr>
<td>{{h.history_date|date}}</td>
<td>{{h.history_user.person}}</td>
<td>{{h.history_change_reason}}</td>
</tr>
{% endfor %}
</table>
</div>
<p style="padding-top: 2em;">
<a href="{{ back_url }}" class="btn btn-default">Back</a>
</p>
{% endblock %}
{% block js %}
<script src="{% static 'bootstrap-datepicker/js/bootstrap-datepicker.min.js' %}"></script>
{% endblock %}