Starting to streamline and generally rejig the layout.
[catagits/Gitalist.git] / root / search.tt2
1 [% INCLUDE 'nav/actions.tt2' object = commit %]
2 <div class='content'>
3   [%# INCLUDE '_log_pager.tt2' %]
4
5   [%# XXX Nabbed the HTML below from gitweb's log action. %]
6   [% FOREACH result IN results %]
7   <div class="header">
8    <a class="title" href="[% c.uri_for('commit', {h=result.sha1}) %]">
9     <span class="age">[% result.authored_time %]</span>
10     [% short_cmt(result.comment) | html %]
11    </a>
12   </div>
13
14   <div class="title_text">
15    <div class="log_link">
16      <a href="[% c.uri_for("", {h=result.sha1}) %]">commit</a>
17    | <a href="[% c.uri_for("", {h=result.sha1}) %]">commitdiff</a>
18    | <a href="[% c.uri_for("", {h=result.tree_sha1, hb=line.sha1}) %]">tree</a>
19    </div>
20    <i>[% result.author.name | html %] [% line.authored_time %]</i>
21   </div>
22
23   <div class="log_body">
24    [%
25      # XXX This is fragile at best.
26      html_comment = result.comment | html;
27      html_comment.replace(
28        c.req.param('text'), '<span class="match">' _ c.req.param('text') _ '</span>'
29      );
30    %]
31   </div>
32   [% END %]
33
34   [%# INCLUDE '_log_pager.tt2' %]
35 </div>