Limit the number of branches/tags listed by default.
[catagits/Gitalist.git] / root / fragment / repository / heads.tt2
old mode 100644 (file)
new mode 100755 (executable)
index d5ea26a..be7b04d
@@ -1,19 +1,15 @@
 [% BLOCK repository_heads_headfoot %]
-<tr>
-   <th>HEAD</th>
-   <th>age</th>
-   <th>branch</th>
-   <th>actions</th>
+[% SET cell = type == 'head' ? 'th' : 'td' %]
+<tr class="header">
+   <[% cell %]>HEAD</[% cell %]>
+   <[% cell %]>Last change</[% cell %]>
+   <[% cell %]>Branch</[% cell %]>
+   <[% cell %]>Actions</[% cell %]>
 </tr>
 [% END %]
-<table class='[% action %] listing'>
- <thead>
-  [% PROCESS repository_heads_headfoot %]
- </thead>
- <tfoot>
-  [% PROCESS repository_heads_headfoot %]
- </tfoot>
 
+<table class='[% action %] listing'>
+ <thead>[% PROCESS repository_heads_headfoot type = 'head' %]</thead>
  <tbody>
  [% FOREACH head IN heads %]
   <tr>
    <td class='time-since' title='[% head.last_change %]'>[% time_since(head.last_change) %]</td>
    <td class='head[% head.sha1 == HEAD ? ' current' : '' %]'>[% head.name %]</td>
    <td class='action-list'>[%# FIXME %]
-     <a href="[% c.uri_for_action('/repository/shortlog', [Repository.name]) %]">shortlog</a>
-     <a href="[% c.uri_for_action('/repository/log', [Repository.name]) %]">log</a>
-     <a href="[% c.uri_for_action('/commit/tree', [Repository.name, head.name]) %]">tree</a>
+     <a href="[% c.uri_for_action('/ref/shortlog', [Repository.name, head.name]) %]" title="Short log" class="button shortlog">shortlog</a>
+     <a href="[% c.uri_for_action('/ref/longlog', [Repository.name, head.name]) %]" title="Long log" class="button longlog">log</a>
+     <a href="[% c.uri_for_action('/ref/tree', [Repository.name, head.name]) %]" title="Tree" class="button tree">tree</a>
    </td>
   </tr>
+  [% LAST IF c.req.args.0 AND c.req.args.0 == loop.count %]
  [% END %]
  </tbody>
 </table>