Distinguish between CVS and SVN repos
authorJeremy Olexa <darkside@gentoo.org>
Wed, 24 Mar 2010 15:36:13 +0000 (10:36 -0500)
committerJeremy Olexa <darkside@gentoo.org>
Wed, 24 Mar 2010 15:36:13 +0000 (10:36 -0500)
roots.ezt

index 5d939ca..cf723c0 100644 (file)
--- a/roots.ezt
+++ b/roots.ezt
@@ -5,25 +5,65 @@
 
 [include "include/header.ezt" "directory"]
 
-<table cellspacing="1" cellpadding="2">
-<thead>
-<tr>
-  <th class="vc_header_sort">Name</th>
-</tr>
-</thead>
-
 <tbody>
+[define cvs_roots][end]
+[define svn_roots][end]
+[define cvs_line][end]
+[define svn_line][end]
+[define cvs_line]0[end]
+[define svn_line]0[end]
 [for roots]
-  <tr class="vc_row_[if-index roots even]even[else]odd[end]">
+    [is roots.type "cvs"]
+        [define cvs_roots]
+    [cvs_roots]
+  <tr class="vc_row_[is cvs_line "0"]even[else]odd[end]">
+    <td>
+        <a href="[roots.href]">
+        <img src="[docroot]/images/dir.png" alt="" class="vc_icon" />[roots.name]</a>
+    </td>
+  </tr>
+        [is cvs_line "0"][define cvs_line]1[end][else][define cvs_line]0[end][end]
+    [end]
+    [else]
+        [is roots.type "svn"]
+            [define svn_roots]
+    [svn_roots]
+  <tr class="vc_row_[is svn_line "0"]even[else]odd[end]">
     <td>
       <a href="[roots.href]">
       <img src="[docroot]/images/dir.png" alt="" class="vc_icon" />
       [roots.name]</a>
     </td>
   </tr>
+        [is svn_line "0"][define svn_line]1[end][else][define svn_line]0[end][end]
+            [end]
+        [end]
+    [end]
 [end]
+    [is cvs_roots ""][else]
+      <H3>CVS Repositories</H3>
+<table cellspacing="1" cellpadding="2">
+<thead>
+<tr>
+  <th class="vc_header_sort">Name</th>
+</tr>
+</thead>
+    [cvs_roots]
+</tbody>
+</table>
+    [end]
+    [is svn_roots ""][else]
+      <H3>Subversion Repositories</H3>
+<table cellspacing="1" cellpadding="2">
+<thead>
+<tr>
+  <th class="vc_header_sort">Name</th>
+</tr>
+</thead>
+    [svn_roots]
 </tbody>
 
 </table>
+    [end]
 
 [include "include/footer.ezt"]