This repository has been archived by the owner on Mar 19, 2020. It is now read-only.
forked from mozilla/elmo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
signoff-rows.html
97 lines (97 loc) · 4.71 KB
/
signoff-rows.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
86
87
88
89
90
91
92
93
94
95
96
97
<!-- {% comment %}
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
{% endcomment %} -->
{% load run_filters %}
{% load commons_filters %}
{% for push in pushes %}
{% if push.new_forest %}
<tr class="tree-change-spacer"></tr>
{% else %}
<tr class="push-spacer"></tr>
{% endif %}
<tr class="pushrow {% if forloop.first %}pushrow-first{% endif %}" id="{{push.id}}" data-push="{{push.push_id}}" data-push_date="{{push.push_date.isoformat}}">
<td class="push{% if forloop.first %} top{% endif %}{% if forloop.last %} bottom {% endif %}" rowspan="{{push.rows}}">{{push.when|date}}<br><span class="csuser">{{push.who}}</span></td>
<td rowspan="{{push.changerows}}">{{push.run|showrun}}<br>
<span class="csuser">{{push.run.build.starttime|date}}</span></td>
{% for cs in push.changes %}
<td class="rev_td">
{% if forloop.first %}
{% if not push.signoffs|length %}
<div class="do_signoff">
<input type="button" data-push="{{push.push_id}}" value="sign off…" onclick="return false;"
{% if push.run %}
data-run="{{push.run.id}}"
{% endif %}
class="do_signoff {% ifequal suggested_signoff push.id %}suggested{% else %}hidden{% endifequal %}"
{%if not perms.shipping.add_signoff or not appver.accepts_signoffs %} disabled {%endif%}>
</div>
{% endif %}
{% endif %}
<div class="rev">{{cs.description}}<br>
<span class="csuser">{{cs.user}}</span>
<a href="{{push.url}}/rev/{{cs.shortrev}}" class="csuser">rev
<span class="shortrev" data-repo="{{push.repo}}">{{cs.shortrev}}</span></a>
</div>
</td>
<td class="diff {% if forloop.first %}diff-first{% endif %}">{% for _i in cs.diffbases %}<div class="diffanchor"></div>{% endfor %}</td></tr>
{% if not forloop.last %}
<tr class="pushrow pushrow-inner" data-push="{{push.push_id}}" data-push_date="{{push.push_date.isoformat}}">
{% endif %}
{% endfor %}
{% if push.signoffs|length %}
{% for so in push.signoffs %}
{% with so.action.get_flag_display as flag %}
<tr class="signoffrow" data-push="{{push.id}}">
<td class="run {{flag}}">{{so.run|showrun}}</td>
<td class="signoff {{flag}}">
{% ifequal flag "canceled" %}
<input class="reopen_signoff" data-signoff="{{so.signoff.id}}"
data-state="{{flag}}"
type="button" value="re-open…"
{% if not perms.shipping.add_signoff %}disabled{% endif %}>
{% else %}
<input class="review_action" data-signoff="{{so.signoff.id}}"
data-state="{{flag}}"
type="button" value="review…"
{% if not perms.shipping.review_signoff %}disabled{% endif %}>
<input class="cancel_signoff" data-signoff="{{so.signoff.id}}"
data-state="{{flag}}"
type="button" value="cancel…"
{% if not perms.shipping.add_signoff %}disabled{% endif %}>
{% endifequal %}
<div class="so_what">
{% ifequal flag "rejected" %}
{{so.action.author.get_full_name}}
rejected sign-off by {{so.signoff.author.get_full_name}} on
{{so.action.when|date}}:</div>
<div class="so_msg">{{so.action.comment|bleach_safe}}
{% endifequal %}
{% ifequal flag "pending" %}
{{so.signoff.author.get_full_name}} signed off on
{{so.signoff.when|date}}; review pending
{% endifequal %}
{% ifequal flag "canceled" %}
{{so.action.author.get_full_name}}
canceled sign-off by {{so.signoff.author.get_full_name}} on
{{so.action.when|date}}
{% endifequal %}
{% ifequal flag "accepted" %}
{{so.action.author.get_full_name}}
accepted sign-off by {{so.signoff.author.get_full_name}} on
{{so.action.when|date}}
{% endifequal %}
<span class="shortrev hidden" data-repo="{{push.repo}}">{{push.changes.0.shortrev}}</span>
</div>
</td>
<td class="diff {{flag}}">{% if so.diffbases %}<div class="diffanchor"></div>{% endif %}</td>
</tr>
{% endwith %}
{% endfor %}
{% else %}
<tr class="signoffrow hidden" data-push="{{push.push_id}}">
<td class="push"></td><td class="run"></td><td class="signoff"></td><td class="diff"></td>
</tr>
{% endif %}
{% endfor %}