aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2007-12-04 08:45:41 +0100
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2007-12-04 08:45:41 +0100
commit15f50e9ba5f64594ac610ad42ac75e484147f8a2 (patch)
tree7de2a7e6bcee6dd6b369c4cb3b6a6aaf512eff35 /tmpl
parent8c290c3b917b1683a8f4355019366d45d5ddb42f (diff)
Add file search caps, some tuning.
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/search_result.tt2117
1 files changed, 68 insertions, 49 deletions
diff --git a/tmpl/search_result.tt2 b/tmpl/search_result.tt2
index d093968..cc2af1c 100644
--- a/tmpl/search_result.tt2
+++ b/tmpl/search_result.tt2
@@ -4,63 +4,82 @@
</span>
[% IF search_type == "code" or (code_res and code_res.idents.0) %]
-<div class="query_desc">Code search: [% code_res.query %]</div>
-<ul>
-[% FOREACH ident = code_res.idents %]
-<li><a class="iref"
- href="+ident=[% ident.0 %][% IF navtarget %]?nav[% navtarget %][% END %]"
- onclick="return ajax_lookup_anchor(null, this);">
-[% ident.1 %]</a> at [% INCLUDE line_reference.tt2, file = ident.2, line = ident.3 %]
-</li>
-[% END %]
-</ul>
+ <div class="query_desc">Code search: [% code_res.query %]</div>
+ [% ptype = '' %]
+ [% FOREACH ident = code_res.idents %]
+ [% IF ptype != ident.1 %]
+ <span class="identtype">[% ident.1 %]</span>
+ [% ptype = ident.1 %]
+ [% END %]
+ <span class="resultline">
+ [% INCLUDE line_reference.tt2, file = ident.2, line = ident.3 %]
+ <span class="resultdetails">[<a class="iref"
+ href="+ident=[% ident.0 %][% IF navtarget %]?nav[% navtarget %][% END %]"
+ onclick="return ajax_lookup_anchor(null, this);">usage...</a>]</span>
+ </span>
+ [% END %]
[% END %]
[% IF ident_res %]
-<div class="query_desc">Identifier:
-[% ident_res.ident.1 %]
-<a class="sref"
- href="+code=[% ident_res.query %][% IF navtarget %]?nav[% navtarget %][% END %]"
- onclick="return ajax_lookup_anchor(null, this);">
-[% ident_res.query %]</a>, from
-[% INCLUDE line_reference.tt2,
- file = ident_res.ident.2, line = ident_res.ident.3 %]
-</div>
-<em>References:</em>
-<ul>
-[% FOREACH file = ident_res.refs.keys %]
-[% FOREACH line = ident_res.refs.$file %]
-<li>
-[% INCLUDE line_reference.tt2,
- file = file, line = line %]
-</li>
-[% END %]
-[% END %]
-</ul>
-[% END %]
+ <div class="query_desc">Identifier:
+ <a class="sref"
+ href="+code=[% ident_res.query %][% IF navtarget %]?nav[% navtarget %][% END %]"
+ onclick="return ajax_lookup_anchor(null, this);">
+ [% ident_res.query %]
+ </a>
+ </div>
+ <span class="identdesc">
+ [% ident_res.ident.1 %]
+ [% IF ident_res.ident.4 %]
+ in [% ident_res.ident.5 %]
+ <a class="iref"
+ href="+ident=[% ident_res.ident.6 %][% IF navtarget %]?nav[% navtarget %][% END %]"
+ onclick="return ajax_lookup_anchor(null, this);">
+ [% ident_res.ident.4 %]
+ </a>
+ [% END %]
+ at
+ </span>
+ [% INCLUDE line_reference.tt2,
+ file = ident_res.ident.2, line = ident_res.ident.3 %]
-[% IF text_res %]
-<div class="query_desc">Freetext search: [% text_res.query %]
-([% text_res.total %] estimated hits)</div>
-<ul>
-[% FOREACH file = text_res.files %]
-<li>[% file.0 %]%
-at [% INCLUDE line_reference.tt2, file = file.1, line = file.2 %]
-</li>
-[% END %]
-</ul>
+ [% FOREACH file = ident_res.refs.keys.sort %]
+ [% IF loop.first %]
+ <span class="identtype">References:</span>
+ [% END %]
+
+ [% FOREACH line = ident_res.refs.$file %]
+ <span class="resultline">
+ [% INCLUDE line_reference.tt2,
+ file = file, line = line %]
+ </span>
+ [% END %]
+ [% END %]
[% END %]
[% IF file_res %]
-<div class="query_desc">Filename search: [% file_res.query %]</div>
-<ul>
-[% FOREACH file = file_res.files %]
-<li><a href="[% file %]" onclick="return load_file('[% context.tree %]',
- '[% file %][% context.args_url %]', '[% context.release %]', '');"
- [% navtarget %]>[% file %]</a>
-</li>
+ [% FOREACH file = file_res.files %]
+ [% IF loop.first %]
+ <div class="query_desc">Filename search: [% file_res.query %]</div>
+ [% END %]
+ <span class="resultline">
+ <a href="[% file %]" onclick="return load_file('[% context.tree %]',
+ '[% file %][% context.args_url %]', '[% context.release %]', '');"
+ [% navtarget %]>[% file %]</a>
+ </span>
+ [% END %]
[% END %]
-</ul>
+
+[% IF text_res %]
+ <div class="query_desc">Freetext search: [% text_res.query %]
+ ([% text_res.total %] estimated hits)</div>
+
+ [% FOREACH file = text_res.files %]
+ <span class="resultline">
+ [% INCLUDE line_reference.tt2, file = file.1, line = file.2 %]
+ <span class="resultdetails">([% file.0 %]%)</span>
+ </span>
+ [% END %]
[% END %]
[% IF ambig_res %]