diff options
author | bbaetz%student.usyd.edu.au <> | 2002-12-20 16:21:24 +0100 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-12-20 16:21:24 +0100 |
commit | a40d927bfd9a9b3012be9e0f85da84aa4dd58344 (patch) | |
tree | f93d920e99a9739e831f24d94a3ab10127ecd952 /template/en/default | |
parent | 1a3c26e61fa709824d63fce85c41d89bd90774fd (diff) | |
download | bugzilla-a40d927bfd9a9b3012be9e0f85da84aa4dd58344.tar.gz bugzilla-a40d927bfd9a9b3012be9e0f85da84aa4dd58344.tar.xz |
Bug 173622 - Move template handling into a module. r=justdave, joel, a=justdave
Diffstat (limited to 'template/en/default')
6 files changed, 37 insertions, 18 deletions
diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 48a00e609..a4cdff9e5 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -23,7 +23,10 @@ [%# INTERFACE: # This template has the same interface as create.html.tmpl #%] - + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + [% PROCESS global/header.html.tmpl title = "Enter A Bug" onload = "PutDescription()" @@ -62,7 +65,7 @@ function PutDescription() { [%# Browser sniff to try and reduce the incidence of 4.x and NS 6/7 bugs %] -[% IF user_agent.search("Mozilla/4") AND NOT user_agent.search("compatible") %] +[% IF cgi.user_agent("Mozilla/4") AND NOT cgi.user_agent("compatible") %] <div style="background-color: lightgrey; border: 1px solid black; padding: 2px"> @@ -79,7 +82,8 @@ function PutDescription() { </div> [% END %] -[% IF (matches = user_agent.match('Netscape(\d)')) %] +[% IF cgi.user_agent('Netscape(\d)') %] + [% matches = cgi.user_agent().match('Netscape(\d)') %] <div style="background-color: lightgrey; border: 1px solid black; padding: 2px"> @@ -123,9 +127,9 @@ function PutDescription() { </p> [%# Stop NS 4.x and all v.3 browsers from getting <iframe> code %] -[% IF (user_agent.search("Mozilla/4") - AND NOT user_agent.search("compatible")) - OR (user_agent.search("Mozilla/[123]")) %] +[% IF (cgi.user_agent("Mozilla/4") + AND NOT cgi.user_agent("compatible")) + OR (cgi.user_agent("Mozilla/[123]")) %] <p> Visit the <a href="duplicates.cgi">most-frequently-reported bugs page</a> and see if your bug is there. If not, go to the @@ -245,7 +249,7 @@ function PutDescription() { </select> </td> <td valign="top" width="100%"> - [% IF user_agent.search("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] <div id="description" style="color: green; margin-left: 10px; height: 5em; overflow: auto;"> Select a component to see its description here. @@ -283,8 +287,8 @@ function PutDescription() { </td> </tr> - [% matches = user_agent.match('Gecko/(\d+)') %] - [% buildid = user_agent IF matches %] + [% matches = cgi.user_agent('Gecko/(\d+)') %] + [% buildid = cgi.user_agent() IF matches %] <tr bgcolor="[% tablecolour %]"> <td align="right" valign="middle"> diff --git a/template/en/default/global/help-header.html.tmpl b/template/en/default/global/help-header.html.tmpl index 3cbb4e371..e26405634 100644 --- a/template/en/default/global/help-header.html.tmpl +++ b/template/en/default/global/help-header.html.tmpl @@ -19,8 +19,11 @@ # Contributor(s): Gervase Markham <gerv@gerv.net> #%] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + [% IF help %] - [% IF user_agent.search("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] <style type="text/css"> .help { border-style: solid; diff --git a/template/en/default/global/help.html.tmpl b/template/en/default/global/help.html.tmpl index 2e43bcee6..e2201c547 100644 --- a/template/en/default/global/help.html.tmpl +++ b/template/en/default/global/help.html.tmpl @@ -18,9 +18,12 @@ # # Contributor(s): Gervase Markham <gerv@gerv.net> #%] - + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + [% IF help %] - [% IF user_agent.search("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] [% FOREACH h = help_html %] <div id="[% h.id %]_help" class="help" style="display: none;"> [%- h.html -%] diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl index e0fb49a6a..178a99167 100644 --- a/template/en/default/global/site-navigation.html.tmpl +++ b/template/en/default/global/site-navigation.html.tmpl @@ -24,8 +24,11 @@ # bug_list: list of integers. List of bug numbers of current query (if any). # bug.bug_id: integer. Number of current bug (for navigation purposes) #%] - -[% IF NOT (user_agent.match("MSIE [1-6]") OR user_agent.match("Mozilla/4")) %] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% IF NOT (cgi.user_agent("MSIE [1-6]") OR cgi.user_agent("Mozilla/4")) %] <link rel="Top" href="[% Param('urlbase') %]"> [%# *** Bug List Navigation *** %] diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl index 6390741e3..765f08e25 100644 --- a/template/en/default/search/search-advanced.html.tmpl +++ b/template/en/default/search/search-advanced.html.tmpl @@ -25,6 +25,9 @@ # search/boolean-charts.html.tmpl. #%] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + [% PROCESS global/header.html.tmpl title = "Search for bugs" onload = "selectProduct(document.forms['queryform']);initHelp();" @@ -35,7 +38,7 @@ [%# The decent help requires Javascript %] [% IF NOT help %] <p> - [% IF user_agent.search("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] <script> <!-- document.write("<a href='query.cgi?help=1'>Give me some help</a> (reloads page.)"); // --> @@ -51,7 +54,7 @@ <p> For help, mouse over the page elements. <font color="red"> - [% IF user_agent.match("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] Note that if the help popups are hidden by form element scroll bars, this is a bug in your browser, not in Bugzilla. [% END %] diff --git a/template/en/default/search/search.html.tmpl b/template/en/default/search/search.html.tmpl index 6390741e3..765f08e25 100644 --- a/template/en/default/search/search.html.tmpl +++ b/template/en/default/search/search.html.tmpl @@ -25,6 +25,9 @@ # search/boolean-charts.html.tmpl. #%] +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + [% PROCESS global/header.html.tmpl title = "Search for bugs" onload = "selectProduct(document.forms['queryform']);initHelp();" @@ -35,7 +38,7 @@ [%# The decent help requires Javascript %] [% IF NOT help %] <p> - [% IF user_agent.search("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] <script> <!-- document.write("<a href='query.cgi?help=1'>Give me some help</a> (reloads page.)"); // --> @@ -51,7 +54,7 @@ <p> For help, mouse over the page elements. <font color="red"> - [% IF user_agent.match("Mozilla/5") %] + [% IF cgi.user_agent("Mozilla/5") %] Note that if the help popups are hidden by form element scroll bars, this is a bug in your browser, not in Bugzilla. [% END %] |