responsibilities.html.tmpl 2.24 KB
Newer Older
1 2 3 4 5 6 7 8 9
[%# 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/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[% hidden_products = 0 %]
10
<table id="user_responsibilities">
11 12 13 14 15 16 17
  [% FOREACH item = otheruser.product_responsibilities %]
    [% IF !user.can_see_product(item.product.name) %]
      [% hidden_products = 1 %]
      [% NEXT %]
    [% END %]
    <tbody>
    <tr>
18
      <th colspan="4" class="product">Продукт: [% item.product.name FILTER html %]</th>
19 20 21 22 23
    </tr>
    <tr>
      <th>Компонент</th>
      <th>Ответственный исполнитель</th>
      <th>Ответственный за приемку</th>
24
      <th>Подписчики по умолчанию</th>
25
    </tr>
26
    [% FOREACH comp = item.components %]
27 28
      <tr>
        <td>
29
          [% IF user.in_group("editcomponents", comp.product_id) %]
30 31
            <a href="editcomponents.cgi?action=edit&amp;product=
                     [% item.product.name FILTER uri %]&amp;component=
32
                     [% comp.name FILTER uri %]">
33
          [% END %]
34 35
          [% comp.name FILTER html %]
          [% IF user.in_group("editcomponents", comp.product_id) %]
36 37 38 39 40
            </a>
          [% END %]
        </td>
        [% FOREACH responsibility = ['default_assignee', 'default_qa_contact'] %]
          <td class="center">
41
            [% comp.$responsibility.id == otheruser.id ? "X" : "&nbsp;" %]
42 43 44
          </td>
        [% END %]
        <td class="center">
45
          [% comp.initial_cc.contains(otheruser) ? "X" : "&nbsp;" %]
46 47 48 49 50 51 52 53 54 55 56 57
        </td>
      </tr>
    [% END %]
    </tbody>
  [% END %]
</table>

[% IF hidden_products %]
  <p class="criticalmessages">Пользователь имеет роли в продуктах, к которым Вы
  не имеете доступа.  Эти продукты не перечислены здесь.  Обратитесь к администратору
  с достаточными правами для корректировки ролей пользователя для этих продуктов.</p>
[% END %]