Started on making everything a bit less bleh.
[catagits/Gitalist.git] / templates / tree.tt2
index 82580b1..da82c74 100644 (file)
@@ -1,40 +1,18 @@
-[% INCLUDE 'commit-nav.tt2' object = commit %]
+[% INCLUDE 'nav/actions.tt2' object = commit %]
 
 <div class='commit-message'>
 [% commit.comment.substr(0, 85) %] ...
 </div>
 
-<table>
- <thead>
-  <tr>
-   <td>mode</td>
-   <td>file</td>
-   <td>actions</td>
-  </tr>
- </thead>
-
- <tbody>
-  [% FOREACH item IN c.model('Git').list_tree(commit.sha1) %]
-  <tr>
-   <td>[% item.modestr %]</td>
-   [% theact = item.type == 'tree' ? 'tree' : 'blob' -%]
-   <td>
-    <a href="/[% theact %]?h=[% item.object %];hb=[% commit.sha1 %];f=[% item.file %]">[% item.file %]</a>
-   </td>
-   <td class='action-list'>
-     <a href="/[% theact %]?p=[% project %];h=[% item.object %]">[% theact %]</a>
-     <a href="/history?p=[% project %];h=[% item.object %]">history</a>
-     <a href="/raw?p=[% project %];h=[% item.object %]">raw</a>
-   </td>
-  </tr>
-  [% END %]
- </tbody>
+[% IF path -%]
+<div>
+ <a href='[% c.uri_for("tree", {hb=commit.sha1}) %]'>[% project %]</a>
+ [% fullpath = ''-%]
+ [% FOREACH part IN path.split('/') -%]
+ / <a href='[% c.uri_for("tree", {h=tree.sha1, hb=commit.sha1, f=fullpath _ part}) %]'>[% part %]</a>
+ [% fullpath = fullpath _ part _ '/'; %]
+ [% END -%]
+</div>
+[% END -%]
 
- <tfoot>
-  <tr>
-   <td>mode</td>
-   <td>file</td>
-   <td>actions</td>
-  </tr>
- </tfoot>
-</table>
+[% INCLUDE '_tree.tt2' %]