aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2013-01-02 17:09:36 +0000
committerGervase Markham <gerv@mozilla.org>2013-01-02 17:09:36 +0000
commit21b50cba4e08e723f8c2d8e8b5800d0a13e2c180 (patch)
tree504bae35d3f49fbbc951567fe07068294a949393 /template
parentdb29480b097468be60ff0ffbc4344166443ae525 (diff)
downloadbugs-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.tar
bugs-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.tar.gz
bugs-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.tar.bz2
bugs-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.tar.xz
bugs-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.zip
Bug 413851 - add CSV output option to request lists. r=LpSolit.
Diffstat (limited to 'template')
-rw-r--r--template/en/default/request/queue.csv.tmpl46
-rw-r--r--template/en/default/request/queue.html.tmpl6
2 files changed, 50 insertions, 2 deletions
diff --git a/template/en/default/request/queue.csv.tmpl b/template/en/default/request/queue.csv.tmpl
new file mode 100644
index 000000000..c6d962b4f
--- /dev/null
+++ b/template/en/default/request/queue.csv.tmpl
@@ -0,0 +1,46 @@
+[%# 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/field-descs.none.tmpl" %]
+
+[% column_headers = {
+ "type" => "Flag",
+ "status" => field_descs.bug_status,
+ "bug_summary" => field_descs.short_desc,
+ "bug_id" => field_descs.bug_id,
+ "attach_summary" => "Attachment Description",
+ "attach_id" => "Attachment ID",
+ "requester" => "Requester",
+ "requestee" => "Requestee",
+ "created" => "Created",
+ "category" => field_descs.product _ ": " _ field_descs.component,
+} %]
+
+[% display_columns = ["requester", "requestee", "type", "status",
+ "bug_id", "bug_summary", "attach_id",
+ "attach_summary", "created", "category"] %]
+
+[% IF requests.size == 0 %]
+No requests.
+[% ELSE %]
+ [% FOREACH column = display_columns %]
+ [% column_headers.$column FILTER csv %][% ',' IF NOT loop.last() %]
+ [% END %]
+
+ [% FOREACH request = requests %]
+ [% FOREACH column = display_columns %]
+ [% IF column == 'created' %]
+ [% request.$column FILTER time FILTER csv %]
+ [% ELSIF column.match('^requeste') %]
+ [% request.$column FILTER email FILTER csv %]
+ [% ELSE %]
+ [% request.$column FILTER csv %]
+ [% END %][% ',' IF NOT loop.last() %]
+ [% END %]
+
+ [% END %]
+[% END %]
diff --git a/template/en/default/request/queue.html.tmpl b/template/en/default/request/queue.html.tmpl
index c2dc9809a..676e89264 100644
--- a/template/en/default/request/queue.html.tmpl
+++ b/template/en/default/request/queue.html.tmpl
@@ -207,6 +207,8 @@ to some group are shown by default.
</tr>
[% END %]
[% PROCESS display_buglist %]
+ <br><br>
+ <a href="request.cgi?[% urlquerypart FILTER html %]&amp;ctype=csv">View entire list as CSV</a>
[% END %]
[% PROCESS global/footer.html.tmpl %]
@@ -264,6 +266,6 @@ to some group are shown by default.
</table>
[% NEXT UNLESS buglist.keys.size %]
<a href="buglist.cgi?bug_id=
- [%- buglist.keys.nsort.join(",") FILTER html %]">(view as
- [%+ terms.bug %] list)</a>
+ [%- buglist.keys.nsort.join(",") FILTER html %]">View as
+ [%+ terms.bug %] list</a>
[% END %]