Unify heads template
Unify heads template

--- a/include/display.git_heads.php
+++ b/include/display.git_heads.php
@@ -17,26 +17,9 @@
 	$tpl->clear_all_assign();
 	$tpl->assign("project",$project);
 	$tpl->assign("head",$head);
-	$tpl->display("heads_nav.tpl");
-	$tpl->display("heads_header.tpl");
-	$taglist = git_read_refs($projectroot, $project, "refs/heads");
-	if (isset($taglist) && (count($taglist) > 0)) {
-		$alternate = FALSE;
-		foreach ($taglist as $i => $entry) {
-			$tpl->clear_all_assign();
-			if ($alternate)
-				$tpl->assign("class","dark");
-			else
-				$tpl->assign("class","light");
-			$alternate = !$alternate;
-			$tpl->assign("project",$project);
-			$tpl->assign("age",$entry['age']);
-			$tpl->assign("name",$entry['name']);
-			$tpl->display("heads_item.tpl");
-		}
-	}
-	$tpl->clear_all_assign();
-	$tpl->display("heads_footer.tpl");
+	$headlist = git_read_refs($projectroot, $project, "refs/heads");
+	$tpl->assign("headlist",$headlist);
+	$tpl->display("heads.tpl");
 }
 
 ?>

--- a/templates/heads_footer.tpl
+++ /dev/null
@@ -1,9 +1,1 @@
-{*
- *  heads_footer.tpl
- *  gitphp: A PHP git repository browser
- *  Component: Head view footer template
- *
- *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
- *}
- </table>
 

--- a/templates/heads_header.tpl
+++ /dev/null
@@ -1,10 +1,1 @@
-{*
- *  heads_header.tpl
- *  gitphp: A PHP git repository browser
- *  Component: Head view header template
- *
- *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
- *}
- <div><a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="title">&nbsp;</a></div>
- <table cellspacing="0">
 

--- a/templates/heads_item.tpl
+++ /dev/null
@@ -1,13 +1,1 @@
-{*
- *  heads_item.tpl
- *  gitphp: A PHP git repository browser
- *  Component: Head view item template
- *
- *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
- *}
- <tr class="{$class}">
- <td><i>{$age}</i></td>
- <td><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$name}" class="list"><b>{$name}</b></a></td>
- <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=shortlog&h=refs/heads/{$name}">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log&h=refs/heads/{$name}">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&h=refs/heads/{$name}&hb={$name}">tree</a></td>
- </tr>
 

file:a/templates/heads_nav.tpl (deleted)
--- a/templates/heads_nav.tpl
+++ /dev/null
@@ -1,12 +1,1 @@
-{*
- *  heads_nav.tpl
- *  gitphp: A PHP git repository browser
- *  Component: Head view nav template
- *
- *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
- *}
- <div class="page_nav">
- <a href="{$SCRIPT_NAME}?p={$project}&a=summary">summary</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=shortlog">shortlog</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=log">log</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$head}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$head}">commitdiff</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=tree&hb={$head}">tree</a>
- <br /><br />
- </div>
 

comments