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