1[%# This Source Code Form is subject to the terms of the Mozilla Public
2  # License, v. 2.0. If a copy of the MPL was not distributed with this
3  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4  #
5  # This Source Code Form is "Incompatible With Secondary Licenses", as
6  # defined by the Mozilla Public License, v. 2.0.
7  #%]
8
9[%# INTERFACE:
10  # group - A Bugzilla::Group representing the group being edited.
11  # *_current - Arrays of Bugzilla::Group objects that show the current
12  #             values for this group, as far as grants.
13  # *_available - Arrays of Bugzilla::Group objects that show the current
14  #               available values for each grant.
15  #%]
16
17[% title = BLOCK %]Изменение группы: [% group.name FILTER html %][% END %]
18
19[% PROCESS global/header.html.tmpl
20  title = title
21  doc_section = "groups.html#edit-groups"
22  style = "
23    .grant_table { border-collapse: collapse; }
24    .grant_table td, .grant_table th {
25        padding-left: .5em;
26    }
27    .grant_table td.one, .grant_table th.one {
28        border-right: 1px solid black;
29        padding-right: .5em;
30    }
31  "
32%]
33
34<form method="post" action="editgroups.cgi">
35  <input type="hidden" name="action" value="postchanges">
36  <input type="hidden" name="group_id" value="[% group.id FILTER html %]">
37
38  <table border="1" cellpadding="4">
39    <tr>
40      <th>Группа:</th>
41      <td>
42        [% IF group.is_bug_group %]
43          <input type="text" name="name" size="60"
44                 value="[% group.name FILTER html %]">
45        [% ELSE %]
46          [% group.name FILTER html %]
47        [% END %]
48      </td>
49    </tr>
50
51    <tr>
52      <th>Описание:</th>
53      <td>
54        [% IF group.is_bug_group %]
55          <input type="text" name="desc" size="70"
56                 value="[% group.description FILTER html %]">
57        [% ELSE %]
58          [% group.description FILTER html %]
59        [% END %]
60      </td>
61    </tr>
62
63    <tr>
64      <th>Шаблон пользователей:</th>
65      <td>
66        <input type="text" name="regexp" size="40"
67               value="[% group.user_regexp FILTER html %]">
68      </td>
69    </tr>
70
71    <tr>
72      <th>
73        Значок (URL):
74        [% IF group.icon_url %]
75          <img src="[% group.icon_url FILTER html %]" alt="[% group.name FILTER html %]">
76        [% END %]
77      </th>
78      <td>
79        <input type="text" name="icon_url" size="70" maxlength="255"
80               value="[% group.icon_url FILTER html %]">
81      </td>
82    </tr>
83
84    [% IF group.is_bug_group %]
85      <tr>
86        <th>Использовать для [% terms.bugs_gen %]:</th>
87        <td>
88          <input type="checkbox" name="isactive"
89                 value="1" [% 'checked="checked"' IF group.is_active %]>
90        </td>
91      </tr>
92    [% END %]
93    [% Hook.process('field') %]
94  </table>
95
96  <h4>Групповой доступ</h4>
97
98  <table class="grant_table">
99    <tr>
100      <th class="one">Группы, входящие в данную группу<br>
101        (&quot;Члены группы <var>X</var> автоматически включены в
102         [%+ group.name FILTER html %]&quot;)</th>
103      <th>Группы, включающие данную группу<br>
104        (&quot;Члены группы [% group.name FILTER html %] автоматически
105         включаются в ...&quot;)</th>
106    </tr>
107    <tr>
108      <td class="one">
109        [% PROCESS select_pair name = "members" size = 10
110                   items_available = members_available
111                     items_current = members_current %]
112      </td>
113
114      <td>[% PROCESS select_pair name = "member_of" size = 10
115                     items_available = member_of_available
116                       items_current = member_of_current %]</td>
117    </tr>
118  </table>
119
120  <table class="grant_table">
121    <tr>
122      <th class="one">
123        Группы, управляющие этой группой<br>
124        (&quot;Члены группы <var>X</var> имеют право добавлять пользователей в
125         [%+ group.name FILTER html %]&quot;)
126
127      </th>
128     <th>Группы, управляемые этой группой<br>
129       (&quot;Члены группы [% group.name FILTER html %] имеют право добавлять пользователей в ...&quot;)
130     </th>
131    </tr>
132    <tr>
133      <td class="one">
134        [% PROCESS select_pair name = "bless_from" size = 10
135                   items_available = bless_from_available
136                     items_current = bless_from_current %]
137      </td>
138      <td>[% PROCESS select_pair name = "bless_to" size = 10
139                     items_available = bless_to_available
140                       items_current = bless_to_current %]
141      </td>
142    </tr>
143  </table>
144
145  [% IF Param('usevisibilitygroups') %]
146    <table class="grant_table">
147      <tr>
148        <th class="one">
149          Группы, которым видна эта группа<br>
150          (&quot;Члены группы <var>X</var> видят пользователей, входящих в
151           [%+ group.name FILTER html %]&quot;)
152        </th>
153       <th>Группы, видимые этой группе<br>
154         (&quot;Члены группы [% group.name FILTER html %] видят пользователей из ...&quot;)
155       </th>
156      </tr>
157      <tr>
158        <td class="one">
159          [% PROCESS select_pair name = "visible_from" size = 10
160                     items_available = visible_from_available
161                       items_current = visible_from_current %]
162        </td>
163        <td>[% PROCESS select_pair name = "visible_to_me" size = 10
164                       items_available = visible_to_me_available
165                         items_current = visible_to_me_current %]
166        </td>
167      </tr>
168    </table>
169  [% END %]
170
171  <input type="submit" id="update-group" value="Сохранить">
172  <input type="hidden" name="token" value="[% token FILTER html %]">
173</form>
174
175<h4>Массовое удаление</h4>
176
177<p>Форма для массового удаления пользователей из групп.
178  Эта функция очень важна после перехода с версии [% terms.Bugzilla %]
179  2.16.</p>
180
181<table><tr><td>
182<form method="post" action="editgroups.cgi">
183  <fieldset>
184    <legend>Исключить из группы пользователей, учетные записи которых
185      сответствуют шаблону:</legend>
186    <input type="text" size="20" name="regexp">
187    <input type="submit" id="remove-membership" value="Исключить пользователей">
188
189    <p>Если шаблон не указан, из группы будут исключены все явно включенные
190      в нее пользователи.</p>
191
192    <input type="hidden" name="action" value="confirm_remove">
193    <input type="hidden" name="group_id" value="[% group.id FILTER html %]">
194  </fieldset>
195</form>
196</td></tr></table>
197
198<p>Вернуться к <a href="editgroups.cgi">списку групп</a>.</p>
199
200[% PROCESS global/footer.html.tmpl %]
201
202[% BLOCK select_pair %]
203  <table class="select_pair">
204    <tr>
205      <th><label for="[% "${name}_add" FILTER html %]">Добавить<br>
206        (выберите для добавления)</label></th>
207      <th><label for="[% "${name}_remove" FILTER html %]">Входит<br>
208        (выберите для исключения)</label></th>
209    </tr>
210    <tr>
211      <td>
212        <select multiple="multiple" size="[% size FILTER html %]"
213                name="[% "${name}_add" FILTER html %]"
214                id="[% "${name}_add" FILTER html %]">
215          [% FOREACH item = items_available %]
216            <option value="[% item.id FILTER html %]">
217              [% item.name FILTER html %]</option>
218          [% END %]
219        </select>
220      </td>
221      <td>
222        <select multiple="multiple" size="[% size FILTER html %]"
223                name="[% "${name}_remove" FILTER html %]"
224                id="[% "${name}_remove" FILTER html %]">
225          [% FOREACH item = items_current %]
226            <option value="[% item.id FILTER html %]">
227              [% item.name FILTER html %]</option>
228          [% END %]
229        </select>
230      </td>
231    </tr>
232  </table>
233[% END %]
234