Added paging to the /shortlog action.
[catagits/Gitalist.git] / templates / _shortlog.tt2
1 [% BLOCK pager %]
2 <div class='pager'>
3  [% IF log_lines.size == 50 %]
4  <a href='/[% action %]?p=[% project %];h=[% commit.sha1 %];pg=[% page %]'>next</a>
5  [% END %]
6  [% IF log_lines.first.sha1 != HEAD %]
7  <a href='/[% action %]?p=[% project %];h=[% commit.sha1 %];pg=[% page - 1 %]'>prev</a>
8  [% END %]
9 </div>
10 [% END %]
11
12 [% INCLUDE pager %]
13 <table>
14  <thead>
15   <tr>
16    <td>sha1</td>
17    <td>time</td>
18    <td>author</td>
19    <td>message</td>
20    <td>actions</td>
21   </tr>
22  </thead>
23
24  <tbody>
25  [% FOREACH line IN log_lines %]
26   <tr>
27    <td>[% line.sha1.substr(0, 6) %]</td>
28    <td>[% line.authored_time %]</td>
29    <td>[% line.author.name | html %]</td>
30    <td>
31     [% line.comment.substr(0, 50) | html %]
32     <span class='refs'>
33      [% FOREACH ref IN refs.${line.sha1} %]
34      <span class='[% ref.search('^remotes/') ? 'remote' : 'head' %]'>
35       <a href='/shortlog?p=[% project %];h=refs/[% ref %]'>[% ref.replace('^(remote|head)s/', '') %]</a>
36      </span>
37      [% END %]
38     </span>
39    </td>
40    <td class='action-list'>
41      <a href="/commit?p=[% project %];h=[% line.sha1 %]">commit</a>
42      <a href="/commitdiff?p=[% project %];h=[% line.sha1 %]">commitdiff</a>
43      <a href="/tree?p=[% project %];h=[% line.sha1 %];hb=[% line.tree_sha1 %]">tree</a>
44    </td>
45   </tr>
46  [% END %]
47  </tbody>
48
49  <tfoot>
50   <tr>
51    <td>sha1</td>
52    <td>time</td>
53    <td>author</td>
54    <td>message</td>
55    <td>actions</td>
56   </tr>
57  </tfoot>
58 </table>
59 [% INCLUDE pager %]