[bugzilla-gnome-org-extensions] template overrides: Add override of choose classification page for Browse extension



commit 1507b1d448b8aa85f5004558e913c61d533e0c6a
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Nov 11 21:49:44 2014 +0100

    template overrides: Add override of choose classification page for Browse extension
    
    The format of target variable is not suitable for us - we want to pass
    "page.cgi?id=browse.html" as target, but there is then a string like
    "?classification..." appended, which will create invalid URI.

 TemplateOverrides/lib/Util.pm                      |    1 +
 .../default/global/choose-classification.html.tmpl |   54 ++++++++++++++++++++
 2 files changed, 55 insertions(+), 0 deletions(-)
---
diff --git a/TemplateOverrides/lib/Util.pm b/TemplateOverrides/lib/Util.pm
index 0fedbc4..1391ca0 100644
--- a/TemplateOverrides/lib/Util.pm
+++ b/TemplateOverrides/lib/Util.pm
@@ -102,6 +102,7 @@ sub check_overridden_templates {
         'attachment/list.html.tmpl' => 'b0c5edd84b8cc31666d0d0b4bf36cdb981ee322995dad891cf05f0f40b2d0392',
         'bug/comments.html.tmpl' => 'd68e98b67eac9cd74ec7b0b663734f7a14953788864135be076a8cb03d648f09',
         'global/user.html.tmpl' => 'ca16e2a988436109612b7b249e536f49669d4c5a9161911e3c14906a5f6d041d',
+        'global/choose-classification.html.tmpl' => 
'da8b876b1a79fb40b5ec2e46e6706b63aa0d6ec15a6a41c80ebc1ad889e6e0d4',
     );
 
     print "Checking overridden templates...\n" unless $silent;
diff --git a/TemplateOverrides/template/en/default/global/choose-classification.html.tmpl 
b/TemplateOverrides/template/en/default/global/choose-classification.html.tmpl
new file mode 100644
index 0000000..76789a2
--- /dev/null
+++ b/TemplateOverrides/template/en/default/global/choose-classification.html.tmpl
@@ -0,0 +1,54 @@
+[%# 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.
+  #%]
+
+[%# INTERFACE:
+  # classifications: an array of classification objects containing
+  #                  at least one product accessible by the user.
+  #%]
+
+[% IF target == "enter_bug.cgi" %]
+  [% title = "Select Classification" %]
+  [% subheader = "Please select the classification." %]
+[% END %]
+
+[% DEFAULT title = "Choose the classification" %]
+[% PROCESS global/header.html.tmpl %]
+
+<table>
+  <tr>
+    <th align="right">
+      <a href="[% target FILTER uri %]?classification=__all
+            [% IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] 
+            [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
+      All</a>:
+    </th>
+
+    <td valign="top">&nbsp;Show all products</td>
+  </tr>
+  <tr>
+    <th colspan="2">&nbsp;</th>
+  </tr>
+
+[% FOREACH class = classifications %]
+  <tr>
+    <th align="right">
+      <a href="[% target FILTER uri %]?classification=[% class.name FILTER uri -%]
+            [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] 
+            [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
+      [% class.name FILTER html %]</a>:
+    </th>
+
+    [% IF class.description %]
+      <td valign="top">&nbsp;[% class.description FILTER html_light %]</td>
+    [% END %]
+  </tr>
+[% END %]
+
+</table>
+
+[% PROCESS global/footer.html.tmpl %]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]