Provide option to disable gravatars.
[catagits/Gitalist.git] / root / repository / search.tt2
1 [% BLOCK shortlog_table_headfoot %]
2 [% SET cell = type == 'head' ? 'th' : 'td' %]
3 <tr>
4         <[% cell %]>ID (sha1)</[% cell %]>
5         <[% cell %]>Last change</[% cell %]>
6         <[% cell %]>Message</[% cell %]>
7         <[% cell %]>By</[% cell %]>
8         <[% cell %]>Actions</[% cell %]>
9 </tr>
10 [% END %]
11
12 [% IF results.size == 0 %]
13 <div class="copy">
14 No results found for <q>[% c.req.param('text') | html %]</q>.
15 </div>
16 [% ELSE %]
17
18 <table class='listing'>
19 <thead>[% PROCESS shortlog_table_headfoot type = 'head' %]</thead>
20 <tbody>
21 [% FOREACH result IN results %]
22  <tr [% "class='invert'" IF loop.count % 2 %]>
23         <td class='sha1' title='[% result.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = result.sha1.substr(0, 7) %]</td>
24         <td class='time-since' title='[% result.authored_time %]'>[% time_since(result.authored_time) %]</td>
25         <td class='commit-message'>[%
26      # XXX This is fragile at best.
27      html_comment = result.comment | html;
28      html_comment.replace(
29        c.req.param('text'), '<span class="match">' _ c.req.param('text') _ '</span>'
30      );
31    %]</td>
32         <td class='author'>[% INCLUDE 'inc/gravatar.tt2' email = result.author.email %][% result.author.name | html %]</td>
33         <td class='action-list'>
34                 <a href="[% c.uri_for_action("/ref/commit", [Repository.name, result.sha1]) %]" title="Commit details" class="button commit">commit</a>
35                 <a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, result.sha1]) %]" title="Commit difference" class="button diff">commitdiff</a>
36                 <a href="[% c.uri_for_action("/ref/tree", [Repository.name, result.sha1]) %]" title="Tree" class="button tree">tree</a>
37         </td>
38 </tr>
39 [% END %]
40 </tbody>
41 </table>
42
43 [% END %]