]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1494645 - Allow customizing HTML <title> of search results
authorKohei Yoshino <kohei.yoshino@gmail.com>
Mon, 1 Oct 2018 15:43:11 +0000 (11:43 -0400)
committerDylan William Hardison <dylan@hardison.net>
Mon, 1 Oct 2018 15:43:11 +0000 (11:43 -0400)
buglist.cgi
template/en/default/list/list.html.tmpl

index 019bf0d4e31d34aa4f0455c935e802cb2ebcdda1..8de38599f8ec8e13098adf31fefea3ae65ef340d 100755 (executable)
@@ -590,9 +590,6 @@ if ($format->{'extension'} eq 'ics') {
 }
 
 if ($format->{'extension'} eq 'atom') {
-    # The title of the Atom feed will be the same one as for the bug list.
-    $vars->{'title'} = $cgi->param('title');
-
     # This is the list of fields that are needed by the Atom filter.
     my @required_atom_columns = (
       'short_desc',
@@ -1060,6 +1057,10 @@ $vars->{'defaultsavename'} = $cgi->param('query_based_on');
 # string in the text field.
 $vars->{'quicksearch'} = $searchstring;
 
+# Allow to custimize the title of HTML page and Atom feed. Also allow to pass
+# the title from HTML page to Atom feed through a link.
+$vars->{'title'} = $cgi->param('title');
+
 ################################################################################
 # HTTP Header Generation
 ################################################################################
@@ -1103,4 +1104,4 @@ $cgi->close_standby_message($contenttype, $disposition, $disp_prefix, $format->{
 
 # Generate and return the UI (HTML page) from the appropriate template.
 $template->process($format->{'template'}, $vars)
-  || ThrowTemplateError($template->error());
\ No newline at end of file
+  || ThrowTemplateError($template->error());
index 8831bcb7d7125d5a310745b882c7be1c44d5d9db..fe4354a6104462832ee14a0570cceb8751c25686 100644 (file)
 
 [% PROCESS "global/field-descs.none.tmpl" %]
 
-[% title = "$terms.Bug List" %]
-[% IF searchname || defaultsavename %]
-  [% title = title _ ": " _ (searchname OR defaultsavename) FILTER html %]
-[% ELSIF quicksearch %]
-  [% title = title _ ": " _ quicksearch FILTER html %]
+[% DEFAULT title = "$terms.Bug List" %]
+[% IF searchname || defaultsavename || quicksearch %]
+  [% title = title _ ": " _ (searchname || defaultsavename || quicksearch) FILTER html %]
+[% ELSE %]
+  [% title = title FILTER html %]
 [% END %]
 
 [% qorder = order FILTER uri IF order %]