From: Frank Lichtenheld Date: Fri, 14 Sep 2007 19:31:51 +0000 (+0200) Subject: html/search*.tmpl: Improve tags X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=43b89ddd54b60021713101a0c61e58608e032014;p=deb%2Fpackages.git html/search*.tmpl: Improve <title> tags - Remove $organisation (in case of search.tmpl even hardcoded to Debian) since that gets added in head.tmpl anyway - Add keywords --- diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl index faf582c..78b4786 100644 --- a/templates/html/search.tmpl +++ b/templates/html/search.tmpl @@ -1,18 +1,5 @@ [%- PROCESS 'config/archive_layout.tmpl' -%] -[%- PROCESS 'html/head.tmpl' - title_tag = 'Debian Package Search Results' - print_search_field = 'packages' - search_field_values = { - keywords => search_keywords.join(' '), - searchon => opts.searchon_form, - suite => params.values.suite.no_replace.join(','), - architectures => params.values.arch.no_replace.join(','), - sections => params.values.section.no_replace.join(','), - } - navigation = [ { name => 'Package Search Results' } ] --%] - -[% keyword_str = search_keywords.join(' '); +[%- keyword_str = search_keywords.join(' '); keyword_esc = uri_escape(keyword_str); keyword_enc = html_encode(keyword_str); @@ -27,7 +14,19 @@ architectures_str = params.values.arch.no_replace.join(', '); architectures_esc = uri_escape(architectures_str); architectures_enc = html_encode(architectures_str); -%] +-%] +[%- PROCESS 'html/head.tmpl' + title_tag = "Package Search Results -- $keyword_enc" + print_search_field = 'packages' + search_field_values = { + keywords => search_keywords.join(' '), + searchon => opts.searchon_form, + suite => params.values.suite.no_replace.join(','), + architectures => params.values.arch.no_replace.join(','), + sections => params.values.section.no_replace.join(','), + } + navigation = [ { name => 'Package Search Results' } ] +-%] <div id="psearchsug"> [% UNLESS results %] diff --git a/templates/html/search_contents.tmpl b/templates/html/search_contents.tmpl index 7cfc54f..71a0019 100644 --- a/templates/html/search_contents.tmpl +++ b/templates/html/search_contents.tmpl @@ -1,8 +1,20 @@ +[%- keyword_str = search_keywords.join(' '); + keyword_esc = uri_escape(keyword_str); + keyword_enc = html_encode(keyword_str); + + section_str = params.values.section.no_replace.join(', '); + section_esc = uri_escape(section_str); + section_enc = html_encode(section_str); + + architectures_str = params.values.arch.no_replace.join(', '); + architectures_esc = uri_escape(architectures_str); + architectures_enc = html_encode(architectures_str); +-%] [%- PROCESS 'html/head.tmpl' - title_tag = "$organisation Package Contents Search Results" + title_tag = "Package Contents Search Results -- $keyword_enc" keywords = "$suite" print_search_field = 'packages' - navigation = [ { title => '', name => 'Packages Contents Search Results', url => '' } ] + navigation = [ { title => '', name => 'Package Contents Search Results', url => '' } ] search_field_values = { keywords => search_keywords.join(' '), searchon => 'contents', @@ -14,18 +26,6 @@ } -%] -[% keyword_str = search_keywords.join(' '); - keyword_esc = uri_escape(keyword_str); - keyword_enc = html_encode(keyword_str); - - section_str = params.values.section.no_replace.join(', '); - section_esc = uri_escape(section_str); - section_enc = html_encode(section_str); - - architectures_str = params.values.arch.no_replace.join(', '); - architectures_esc = uri_escape(architectures_str); - architectures_enc = html_encode(architectures_str); -%] <div id="psearchsug"> <ul class="linklist">