Merge branch 'less_fugly_uris' of github.com:broquaint/Gitalist into less_fugly_uris
[catagits/Gitalist.git] / root / index.tt2
index 9d1544d..c985037 100644 (file)
@@ -1,5 +1,15 @@
+[% BLOCK repos_table_headfoot %]
+<tr>
+    <th>Repository</th>
+    <!-- XXX These do nothing presently -->
+    <th><a class="header" href="/?o=descr">Description</a></th>
+    <th><a class="header" href="/?o=owner">Owner</a></th>
+    <th><a class="header" href="/?o=age">Last Change</a></th>
+    <th></th>
+</tr>
+[% END %]
 <div class='content'>
-  <form method="get" action="/" enctype="application/x-www-form-urlencoded">
+  <form method="get" action="[% c.uri_for_action('/search') %]" enctype="application/x-www-form-urlencoded">
    <p class="projsearch">Search:
     <input type="text" name="s" value="[% search_text %]" />
    </p>
 
   <table class="repository_list">
     <thead>
-       <tr>
-           <th>Repository</th>
-           <!-- XXX These do nothing presently -->
-           <th><a class="header" href="/?o=descr">Description</a></th>
-           <th><a class="header" href="/?o=owner">Owner</a></th>
-           <th><a class="header" href="/?o=age">Last Change</a></th>
-           <th></th>
-       </tr>
+               [% INCLUDE repos_table_headfoot %]
     </thead>
     <tfoot>
-       <tr>
-           <td>Repository</td>
-           <!-- XXX These do nothing presently -->
-           <td><a href="/?o=descr">Description</a></td>
-           <td><a href="/?o=owner">Owner</a></td>
-           <td><a href="/?o=age">Last Change</a></td>
-           <td></td>
-       </tr>
+               [% INCLUDE repos_table_headfoot %]
     </tfoot>
 
-    <tbody class='listing'>
-      [% FOR p IN repositories %]
-       <tr>
-           <td><a class="list" href="[% c.uri_for('/summary', {p=p.name}) %]">[% p.name %]</a></td>
-           <td><a class="list" title="[% p.description %]" href="[% c.uri_for('/summary', {p=p.name} ) %]">[% abridged_description(p.description)  %]</a></td>
-           <td>[% p.owner %]</td>
-           <td class="time-since">[% time_since(p.last_change) %]</td>
-           <td class="link"><a href="[% c.uri_for("summary", {p=p.name}) %]">summary</a>
-               | <a href="[% c.uri_for("shortlog", {p=p.name}) %]">shortlog</a>
-               | <a href="[% c.uri_for("log", {p=p.name}) %]">log</a>
-               | <a href="[% c.uri_for("tree", {p=p.name}) %]">tree</a></td>
-       </tr>
-      [% END %]
-    </tbody>
+       [% subinclude('/fragment/collectionofrepositories') %]
   </table>
 </div>