summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-02-21 09:21:49 +0100
committerByron Jones <bjones@mozilla.com>2012-02-21 09:21:49 +0100
commitd2b251615f42ecda6eb10871b57329ed11b0e57b (patch)
treeff132998fb9a51cbc9bff318a0f23124ac30843d /extensions/BMO/template/en
parenta636e89b6851367fa4e59e1bb646d1ad8d3456a6 (diff)
downloadbugzilla-d2b251615f42ecda6eb10871b57329ed11b0e57b.tar.gz
bugzilla-d2b251615f42ecda6eb10871b57329ed11b0e57b.tar.xz
bug 728811: add a report showing group membership
Diffstat (limited to 'extensions/BMO/template/en')
-rw-r--r--extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl59
-rw-r--r--extensions/BMO/template/en/default/pages/group_membership.html.tmpl75
-rw-r--r--extensions/BMO/template/en/default/pages/group_membership.txt.tmpl16
3 files changed, 120 insertions, 30 deletions
diff --git a/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl b/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl
index 7c2b2d753..852ed6cc4 100644
--- a/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/reports/menu-end.html.tmpl
@@ -1,49 +1,48 @@
-[%# 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/
+[%# 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/.
#
- # 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 BMO Extension
- #
- # The Initial Developer of the Original Code is the Mozilla Foundation
- # Portions created by the Initial Developers are Copyright (C) 2011 the
- # Initial Developer. All Rights Reserved.
- #
- # Contributor(s):
- # Byron Jones <bjones@mozilla.com>
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
#%]
<h2>Other Reports</h2>
<ul>
<li>
- <strong><a href="[% urlbase FILTER none
- %]page.cgi?id=user_activity.html">User Changes</a></strong> - Show changes
- made by an individual user.
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=user_activity.html">User Changes</a>
+ </strong> - Show changes made by an individual user.
</li>
<li>
- <strong><a href="[% urlbase FILTER none
- %]page.cgi?id=triage_reports.html">Triage Report</a></strong> - Report
- on UNCONFIRMED [% terms.bugs %] to assist triage.
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=triage_reports.html">Triage Report</a>
+ </strong> - Report on UNCONFIRMED [% terms.bugs %] to assist triage.
</li>
<li>
- <strong><a href="[% urlbase FILTER none
- %]page.cgi?id=release_tracking_report.html">Release Tracking Report</a></strong> -
- For triaging release-train flag information.
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=release_tracking_report.html">Release Tracking Report</a>
+ </strong> - For triaging release-train flag information.
</li>
[% IF user.in_group('editusers') %]
<li>
- <strong><a href="[% urlbase FILTER none
- %]page.cgi?id=group_admins.html">Group Admins</a></strong> - Group Admins Report
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=group_admins.html">Group Admins</a>
+ </strong> - Group Admins Report
</li>
+ [% END %]
+ [% IF user.in_group('editusers') || user.in_group('infrasec') %]
+ <li>
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=group_membership.html">Group Membership Report</a>
+ </strong> - Lists the groups a user is a member of.
+ </li>
+ [% END %]
+ [% IF user.in_group('admin') %]
<li>
- <strong><a href="[% urlbase FILTER none
- %]page.cgi?id=email_queue.html">Email Queue</a></strong> - TheSchwartz queue
+ <strong>
+ <a href="[% urlbase FILTER none %]page.cgi?id=email_queue.html">Email Queue</a>
+ </strong> - TheSchwartz queue
</li>
[% END %]
</ul>
diff --git a/extensions/BMO/template/en/default/pages/group_membership.html.tmpl b/extensions/BMO/template/en/default/pages/group_membership.html.tmpl
new file mode 100644
index 000000000..2680c7da2
--- /dev/null
+++ b/extensions/BMO/template/en/default/pages/group_membership.html.tmpl
@@ -0,0 +1,75 @@
+[%# 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.
+ #%]
+
+[% PROCESS global/header.html.tmpl
+ title = "Group Membership Report"
+ yui = [ 'autocomplete' ]
+ style_urls = [ "extensions/BMO/web/styles/reports.css" ]
+ javascript_urls = [ "js/field.js" ]
+%]
+
+<form method="GET" action="page.cgi">
+<input type="hidden" name="id" id="id" value="group_membership.html">
+
+<table id="parameters">
+<tr>
+ <th>User(s):</th>
+ <td>
+ [% INCLUDE global/userselect.html.tmpl
+ id => "who"
+ name => "who"
+ value => who.join(', ')
+ size => 40
+ classes => ["bz_userfield"]
+ multiple => 5
+ field_title => "One or more email address (comma delimited)"
+ %]
+ </td>
+ <td>&nbsp;</td>
+ <td>
+ <select name="output"
+ onchange="document.getElementById('id').value = 'group_membership.' + this.value">
+ <option value="html" [% 'selected' IF output == 'html' %]>HTML</option>
+ <option value="txt" [% 'selected' IF output == 'txt' %]>Text</option>
+ </select>
+ </td>
+ <td>
+ <input type="submit" value="Generate">
+ </td>
+</tr>
+</table>
+
+</form>
+
+[% IF users.size %]
+
+ <table border="0" cellspacing="0" id="report" width="100%">
+ [% FOREACH u = users %]
+ <tr>
+ <th colspan="3">[% u.user.identity FILTER html %]</th>
+ </tr>
+ [% FOREACH g = u.groups %]
+ <tr>
+ <td>&nbsp;</td>
+ <td>[% g.name FILTER html %]</td>
+ <td>[% g.desc FILTER html %]</td>
+ <td>
+ [% IF g.via == '' %]
+ direct
+ [% ELSE %]
+ <i>[% g.via FILTER html %]</i>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ [% END %]
+ </table>
+
+[% END %]
+
+[% INCLUDE global/footer.html.tmpl %]
diff --git a/extensions/BMO/template/en/default/pages/group_membership.txt.tmpl b/extensions/BMO/template/en/default/pages/group_membership.txt.tmpl
new file mode 100644
index 000000000..9958f0877
--- /dev/null
+++ b/extensions/BMO/template/en/default/pages/group_membership.txt.tmpl
@@ -0,0 +1,16 @@
+[%# 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.
+ #%]
+
+[% FOREACH u = users %]
+[% u.user.login FILTER none%]:
+ [% FOREACH g = u.groups %]
+ [% g.name FILTER none %]
+ [% ',' UNLESS loop.last %]
+ [% END %]
+ [% "\n" %]
+[% END %]