Tweaks to history display
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Jul 2009 05:36:43 +0000 (23:36 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Jul 2009 05:36:43 +0000 (23:36 -0600)
chora/history.php
chora/templates/history/blank.inc
chora/templates/history/branch_cell.inc
chora/templates/history/rev.inc
chora/themes/screen.css

index 1571a03..d2ace39 100644 (file)
@@ -20,13 +20,6 @@ if (!$VC->hasFeature('branches')) {
     exit;
 }
 
-/* Spawn the file object. */
-try {
-    $fl = $VC->getFileObject($where);
-} catch (Horde_Vcs_Exception $e) {
-    Chora::fatal($e);
-}
-
 $colset = array('#ccdeff', '#ecf', '#fec', '#efc', '#cfd', '#dcdba0');
 $branch_colors = $colStack = array();
 foreach ($branches as $brrev => $brcont) {
@@ -105,6 +98,15 @@ function _populateGrid($row, $col)
     }
 }
 
+/* Spawn the file object. */
+try {
+    $fl = $VC->getFileObject($where);
+} catch (Horde_Vcs_Exception $e) {
+    Chora::fatal($e);
+}
+
+$revlist = $fl->getBranchList();
+
 /* Start row at the bottom trunk revision.  Since branches always go
  * down, there can never be one above 1.1, and so this is a safe
  * location to start.  We will then work our way up, recursively
index a5b0e25..d92265b 100644 (file)
@@ -1 +1 @@
-<td<?php echo $bg ? " style=\"background:$bg\"":'' ?>>&nbsp;</td>
\ No newline at end of file
+<td class="historybg<?php echo $bg ?>">&nbsp;</td>
index d8e2d69..7633a6e 100644 (file)
@@ -1,4 +1,4 @@
-<td style="background:<?php echo $bg ?>; text-align:center">
+<td class="historybg<?php echo $bg ?>">
 <?php echo _("Branching to") ?>:<br />
 <a href="<?php echo Chora::url('browsefile', $where, array('onb' => $rev)); ?>">
  <?php echo $symname ?></a>
index 3146f03..3f4535f 100644 (file)
@@ -1,4 +1,4 @@
-<td id="rev<?php echo $rev ?>" style="background:<?php echo $bg ?>">
+<td id="rev<?php echo $rev ?>" class="historybg<?php echo $bg ?>">
  <a href="<?php echo Chora::url('browsefile', $where, array('r' => $rev), 'rev' . $rev) ?>">
  <?php echo $rev ?></a> <?php printf(_("by %s"), $author) ?>
  <br />
index 31f8be1..4bbab1c 100644 (file)
@@ -290,3 +290,26 @@ div.diffclear {
 td.browseLocation em {
     display: block;
 }
+
+.historybg {
+    background: #e9e9e9;
+    text-align: center;
+}
+.historybg1 {
+    background: #ccdeff;
+}
+.historybg2 {
+    background: #ecf;
+}
+.historybg3 {
+    background: #fec;
+}
+.historybg4 {
+    background: #efc;
+}
+.historybg5 {
+    background: #cfd;
+}
+.historybg6 {
+    background: #dcdba0;
+}