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
|
[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
#%]
[% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl
title = 'Administer Flag Types'
style = "
table#flag_types tr th { text-align: left; }
.inactive { color: #787878; }
.multiplicable { display: block; }
"
%]
<p>
Flags are markers that identify whether [% terms.abug %] or attachment has been granted
or denied some status. Flags appear in the UI as a name and a status symbol
("+" for granted, "-" for denied, and "?" for statuses requested by users).
</p>
<p>
For example, you might define a "review" status for users to request review
for their patches. When a patch writer requests review, the string "review?"
will appear in the attachment. When a patch reviewer reviews the patch,
either the string "review+" or the string "review-" will appear in the patch,
depending on whether the patch passed or failed review.
</p>
<h3>Flag Types for [% terms.Bugs %]</h3>
[% PROCESS display_flag_types types=bug_types %]
<p>
<a href="editflagtypes.cgi?action=enter&target_type=bug">Create Flag Type for [% terms.Bugs %]</a>
</p>
<h3>Flag Types for Attachments</h3>
[% PROCESS display_flag_types types=attachment_types %]
<p>
<a href="editflagtypes.cgi?action=enter&target_type=attachment">Create Flag Type For Attachments</a>
</p>
<script type="text/javascript">
<!--
function confirmDelete(id, name, count)
{
if (count > 0) {
var msg = 'There are ' + count + ' flags of type ' + name + '. ' +
'If you delete this type, those flags will also be ' +
'deleted.\n\nNote: to deactivate the type instead ' +
'of deleting it, edit it and uncheck its "is active" ' +
'flag.\n\nDo you really want to delete this flag type?';
if (!confirm(msg)) return false;
}
location.href = "editflagtypes.cgi?action=delete&id=" + id;
return false; // prevent strict JavaScript warning that this function
// does not always return a value
}
//-->
</script>
[% PROCESS global/footer.html.tmpl %]
[% BLOCK display_flag_types %]
<table id="flag_types" cellspacing="0" cellpadding="4" border="1">
<tr>
<th>Edit name ...</th>
<th>Description</th>
<th>Sortkey</th>
<th>Properties</th>
<th>Grant group</th>
<th>Request group</th>
<th>Actions</th>
</tr>
[% FOREACH type = types %]
<tr class="[% IF type.is_active %]active[% ELSE %]inactive[% END %]">
<td><a href="editflagtypes.cgi?action=edit&id=[% type.id %]">[% type.name FILTER html FILTER no_break %]</a></td>
<td>[% type.description FILTER html %]</td>
<td align="right">[% type.sortkey FILTER html %]</td>
<td>
[% IF type.is_requestable %]
<span class="requestable">requestable</span>
[% END %]
[% IF type.is_requestable && type.is_requesteeble %]
<span class="requesteeble">(specifically)</span>
[% END %]
[% IF type.is_multiplicable %]
<span class="multiplicable">multiplicable</span>
[% END %]
</td>
<td>[% type.grant_group_name FILTER html %]</td>
<td>[% type.request_group_name FILTER html %]</td>
<td>
<a href="editflagtypes.cgi?action=copy&id=[% type.id %]">Copy</a>
| <a href="editflagtypes.cgi?action=confirmdelete&id=[% type.id %]"
onclick="return confirmDelete([% type.id %], '[% type.name FILTER js FILTER html %]',
[% type.flag_count %]);">Delete</a>
</td>
</tr>
[% END %]
</table>
[% END %]
|