]> git.deb.at Git - deb/packages.git/blobdiff - templates/html/search.tmpl
html/newpkg.tmpl: Expose mode=byage in UI
[deb/packages.git] / templates / html / search.tmpl
index 6425cbfc76013d48682ff577dad561dca7d0bf68..0bc23e6e4dd71144d7a5bf4cbd47c0b1b4990c07 100644 (file)
@@ -8,8 +8,7 @@
        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' } ]
 -%]
 
@@ -66,10 +65,15 @@ Found <strong>[% results %]</strong> matching packages.</p>
 [% END %]
 
 [% IF too_many_hits %]
+[% IF opts.searchon != "names" %]
+<p id="psearchtoomanyhits">Note that this only shows the best matches, sorted by relevance.
+If the first few packages don't match what you searched for, try using more keywords or alternative
+keywords.</p>
+[% ELSE %]
 <p id="psearchtoomanyhits">Your search was too wide so we will only display exact matches.
 At least <em>[% too_many_hits %]</em> results have been omitted and will not be displayed.
 Please consider using a longer keyword or more keywords.</p>
-[% END %]
+[% END; END %]
 
 [% UNLESS results %]
 <p id="psearchnoresult">Sorry, your search gave no results</p>
@@ -82,7 +86,7 @@ Please consider using a longer keyword or more keywords.</p>
   <h3>Package [% pkg %]</h3>
   <ul>
   [% FOREACH s IN suites %]
-    <li><a class="resultlink" href="[% make_url(pkg,'','suite',s.suite,'arch','','section','') %]">[% s.suite %]</a>[% ' (' _ s.subsect _ ')' IF s.subsect %]: [% s.desc %]  [%- IF s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
+    <li class="[% s.suite %]"><a class="resultlink" href="[% make_url(pkg,'','suite',s.suite,'arch','','section','') %]">[% s.suite %]</a>[% ' (' _ s.subsection _ ')' IF s.subsection %]: [% s.desc %]  [%- IF s.section != main_section %] [<strong class="pmarker">[% s.section %]</strong>][% END %]
     [% FOREACH s.versions %]
       <br>[% version %] [%- IF archive != main_archive %] [<strong class="pmarker">[% archive %]</strong>][% END %]: [% architectures.join(' ') %]
     [% END %]
@@ -100,10 +104,10 @@ Please consider using a longer keyword or more keywords.</p>
   [% FOREACH origins %]
      [% origin = (archive == main_archive) ? suite : "$suite/$archive";
        js_id = string2id("$pkg$suite$archive")  %]
-    <li><a class="resultlink" href="[% make_url(pkg,'','source','source','suite',origin) %]">[% origin %]</a> ([% subsection %]): [% version %]
+    <li><a class="resultlink" href="[% make_url(pkg,'','source','source','suite',origin,'section','','arch','') %]">[% origin %]</a> ([% subsection %]): [% version %]
       [%- IF section %] [<strong class="pmarker">[% section %]</strong>][% END %]
       [%- IF real_archive %] [<strong class="pmarker">[% real_archive %]</strong>][% END %]
-    <br>Binary packages: <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]" class="binaries">[% FOREACH binary IN binaries %]<a href="[% make_url(binary,'','source','','suite',suite,'archive',archive) %]">[% binary %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
+    <br>Binary packages: <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]" class="binaries">[% FOREACH binary IN binaries %]<a href="[% make_url(binary,'','source','','suite',suite,'archive',archive,'arch','','archive','') %]">[% binary %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
        [% IF binaries.size > 10 %]
        <script type="text/javascript">init_toggle_elem("[% js_id %]","[% binaries.size %] binary packages")</script>
        [% END %]
@@ -115,7 +119,9 @@ Please consider using a longer keyword or more keywords.</p>
 [% END %]
 
 [% IF skipped %]
-  <p><a href="[% make_search_url('',"keywords=$keywords",'exact', 0) %]">[% skipped %]</a> results have not been displayed because you requested only exact matches.
+  <p><a href="[% make_search_url('',"keywords=$keyword_esc",'exact', 0) %]">[% skipped %]</a> results have not been displayed because you requested only exact matches.
 [% END %]
 
 </div>
+
+[%- PROCESS 'html/foot.tmpl' -%]