Make display of heads work
Tomas Doran [Sun, 17 Jan 2010 19:05:41 +0000 (19:05 +0000)]
lib/Gitalist/Controller/Repository.pm
root/heads.tt2
root/repository/heads.tt2 [moved from root/_heads.tt2 with 100% similarity]
root/summary.tt2
root/tags.tt2

index 5015ae2..2560a98 100644 (file)
@@ -30,6 +30,14 @@ sub shortlog : Chained('find') Args(0) {
     $c->forward('/shortlog');
 }
 
+sub heads : Chained('find') Args(0) {
+    my ($self, $c) = @_;
+    $c->stash(
+        no_wrapper => 1,
+        heads => $c->stash->{Repository}->heads,
+    );
+}
+
 sub log : Chained('find') Args(0) {
     my ($self, $c) = @_;
     $c->stash(template => 'log.tt2');
index baa8e4b..14f3b90 100644 (file)
@@ -5,5 +5,5 @@
   [% Repository.name %]
   </div>
 
-  [% INCLUDE '_heads.tt2' %]
+  [% INCLUDE 'repository/heads.tt2' %]
 </div>
similarity index 100%
rename from root/_heads.tt2
rename to root/repository/heads.tt2
index be4b3e1..2b318c5 100644 (file)
@@ -18,5 +18,5 @@
   [% INCLUDE '_shortlog.tt2' %]
 
   <h2><a href='[% c.uri_for("heads") %]'>branches</a></h2>
-  [% INCLUDE '_heads.tt2' %]
+  [% INCLUDE 'repository/heads.tt2' %]
 </div>
index 6f47285..3f888d3 100644 (file)
@@ -4,5 +4,5 @@
   [% Repository.name %]
   </div>
 
-  [% INCLUDE '_heads.tt2' heads = tags %]
+  [% INCLUDE 'repository/heads.tt2' heads = tags %]
 </div>