X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=templates%2Fhtml%2Fsearch_contents.tmpl;fp=templates%2Fhtml%2Fsearch_contents.tmpl;h=7b794ac18d80c850b25b2c9d14b8db6464609b3c;hb=2ec757bb58907b15c43548be5601d4f2b8c7caac;hp=0000000000000000000000000000000000000000;hpb=411dd86a5f305fcce69912b47f84dc16914d2da1;p=deb%2Fpackages.git diff --git a/templates/html/search_contents.tmpl b/templates/html/search_contents.tmpl new file mode 100644 index 0000000..7b794ac --- /dev/null +++ b/templates/html/search_contents.tmpl @@ -0,0 +1,123 @@ +[%- PROCESS 'html/head.tmpl' + title_tag = "$organisation Package Contents Search Results" + keywords = "$suite" + print_search_field = 'packages' + navigation = [ { title => '', name => 'Packages Contents Search Results', url => '' } ] + search_field_values = { + keywords => search_keywords.join(' '), + searchon => 'contents', + mode => mode, + sort_by => sort_by, + suite => suite, + architectures => params.values.arch.no_replace.join(','), + sections => params.values.section.no_replace.join(','), + } +-%] + +[% 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); +%] +
+ + + +

Search in other suite: +[% FOREACH s IN all_suites %] +[[% s %]] +[% END %] + +[% UNLESS search_architectures.size == 1 || all_architectures.size == 1 %] +

Limit search to a specific architecture: +[% FOREACH a IN all_architectures %] [[% a %]][% END %] +[% END %] + +[% IF search_architectures.size == 1 %] +

Search in all architectures +[% END %] + +

+ +[%- PROCESS 'html/messages.tmpl' -%] +
+ +[% suite_wording = "suite $suite"; + section_wording = ( section_enc == 'all' ? "all sections" : "section(s) $section_enc" ); + arch_wording = ( architectures_enc == 'any' ? "all architectures" : "architecture(s) $architectures_enc" ); + wording = "paths that end with"; + IF mode == 'filename'; + wording = "files named"; + ELSIF mode == 'exactfilename'; + wording = "filenames that contain"; + END %] +

You have searched for [% wording %] [% keyword_enc %] in [% suite_wording %], [% section_wording %], and [% arch_wording %]. + +[% IF results %] +Found [% results.size %] results. + +[% IF too_many_hits %] +

Note: Your search was too wide so we will only display only the first about 100 matches. +Please consider using a longer keyword or more keywords.

+[% END %] + + + + + + + + + + +[% FOREACH results %] +[% file = html_encode(file); + FOREACH k IN search_keywords; + k_enc = html_encode(k); + k_quo = quotemeta(k); + file = file.replace(k_quo, "$k_enc"); + END %] + + + + +[% END %] + +[% IF results.size > 20 %] + +[% END %] +
FilePackages
[% file %] + [% FOREACH packages %] + [% arch_str = architectures.join(', '); + SET arch_str = "not $arch_str" IF ( arch_str && architectures_are_rev ); + SET arch_str = " [$arch_str]" IF arch_str; + pkg_esc = uri_escape(pkg) %] + [% pkg | html %][% arch_str %][% ', ' UNLESS loop.last %] + [% END %] +
FilePackages
+
+ +[% ELSE %] + +

Sorry, your search gave no results

+ +[% END %]