Started on making everything a bit less bleh.
[catagits/Gitalist.git] / templates / commit.tt2
index 97294f0..b298762 100644 (file)
@@ -1,9 +1,9 @@
-[% INCLUDE 'commit-nav.tt2' object = commit %]
+[% INCLUDE 'nav/actions.tt2' object = commit %]
 
 <div class='commit-message'>
 [% commit.comment.substr(0, 85) %] ...
 [% FOREACH ref IN branches_on %]
- <span class='refs'><a href='/shortlog?p=[% project %];h=[% commit.sha1 %];hb=[% ref %]'>[% ref %]</a></span>
+ <span class='refs'><a href='[% c.uri_for("shortlog", {h=commit.sha1, hb=ref}) %]'>[% ref %]</a></span>
 [% END %]
 </div>
 
  <dt>commit</dt>
   <dd>[% commit.sha1 %]</dd>
  <dt>tree</dt>
-  <dd>[% commit.tree_sha1 %] <a href="/tree?p=[% project %];h=[% commit.sha1 %];hb=[% commit.tree_sha1 %]">tree</a></dd>
+  <dd>[% commit.tree_sha1 %]
+      <span class='action-list'><a href="[% c.uri_for("tree", {h=commit.tree_sha1, hb=commit.sha1}) %]">tree</a></span>
+  </dd>
  [% FOREACH parent IN commit.parents %]
  <dt>parent</dt>
   <dd>[% parent %]
     <span class='action-list'>
-        <a href="/commit?p=[% project %];h=[% parent %]">commit</a>
-        <a href="/commitdiff?p=[% project %];h=[% commit.sha1 %];hp=[% parent %]">diff</a>
+        <a href="[% c.uri_for("commit", {h=parent}) %]">commit</a>
+        <a href="[% c.uri_for("commitdiff", {hp=parent, h=commit.sha1}) %]">diff</a>
        </span>
    </dd>
  [% END %]
@@ -37,140 +39,3 @@ IF diff_tree.size > 0;
        INCLUDE '_diff_tree.tt2';
 END;
 %]
-
-<!--
-
-$Git_PurePerl_Object_Commit1 = bless( {
-                                 author   => bless( {
-                                               email => 'broq@cpan.org',
-                                               name  => 'broquaint'
-                                             }, 'Git::PurePerl::Actor' ),
-                                 authored_time
-                                          => {
-                                               DateTime
-                                             },
-                                 comment  => 'The blob action now has simple (but functioning) syntax highlighting (thanks to jrockway\'s Angerwhale for the highlighting code).',
-                                 committed_time
-                                          => {
-                                               DateTime
-                                             },
-                                 committer
-                                          => bless( {
-                                               email => 'broq@cpan.org',
-                                               name  => 'broquaint'
-                                             }, 'Git::PurePerl::Actor' ),
-                                 content  => "tree 278387038d3a42dcc9b3b33d6809c71371caee90\nparent b222ff0a7260cc1777c".
-       "7e455dfcaf22551a512fc\nauthor broquaint <broq\@cpan.org> 1256204829 +0100\n".
-       "committer broquaint <broq\@cpan.org> 1256204829 +0100\n\nThe blob action no".
-       "w has simple (but functioning) syntax highlighting (thanks to jrockway's".
-       " Angerwhale for the highlighting code).\n",
-                                 git      => bless( {
-                                               directory => {
-                                                              dirs     => [ '.' ],
-                                                              file_spec_class
-                                                                       => undef,
-                                                              volume   => ''
-                                                            },
-                                               gitdir    => {
-                                                              dirs     => [ '.git' ],
-                                                              file_spec_class
-                                                                       => undef,
-                                                              volume   => ''
-                                                            },
-                                               loose     => bless( { directory => {
-                                                              dirs     => [
-                                                                            '.git',
-                                                                            'objects'
-                                                                          ],
-                                                              file_spec_class
-                                                                       => undef,
-                                                              volume   => ''
-                                                            } }, 'Git::PurePerl::Loose' ),
-                                               packs     => [ bless( {
-                                                              fh      => bless( do{ require Symbol; Symbol::gensym }, 'IO::File' ),
-                                                              filename
-                                                                      => {
-                                                                           dir     => {
-                                                                                        dirs     => [
-                                                                                                      '.git',
-                                                                                                      'objects',
-                                                                                                      'pack'
-                                                                                                    ],
-                                                                                        file_spec_class
-                                                                                                 => undef,
-                                                                                        volume   => ''
-                                                                                      },
-                                                                           file    => 'pack-76da0c32a0a4918d1828d110636caad32af6ec6c.pack',
-                                                                           file_spec_class
-                                                                                   => undef
-                                                                         },
-                                                              index   => bless( {
-                                                                           fh       => bless( Symbol::gensym, 'IO::File' ),
-                                                                           filename => {
-                                                                                         dir     => {
-                                                                                                      dirs     => [
-                                                                                                                    '.git',
-                                                                                                                    'objects',
-                                                                                                                    'pack'
-                                                                                                                  ],
-                                                                                                      file_spec_class
-                                                                                                               => undef,
-                                                                                                      volume   => ''
-                                                                                                    },
-                                                                                         file    => 'pack-76da0c32a0a4918d1828d110636caad32af6ec6c.idx',
-                                                                                         file_spec_class
-                                                                                                 => undef
-                                                                                       },
-                                                                           offsets  => [
-                                                                                         ( 0 ) x 23,
-                                                                                         ( 1 ) x 29,
-                                                                                         ( 2 ) x 11,
-                                                                                         ( 3 ) x 6,
-                                                                                         ( 4 ) x 22,
-                                                                                         ( 5 ) x 51,
-                                                                                         ( 6 ) x 78,
-                                                                                         ( 7 ) x 3,
-                                                                                         ( 8 ) x 34
-                                                                                       ],
-                                                                           size     => 8
-                                                                         }, 'Git::PurePerl::PackIndex::Version2' ),
-                                                              index_filename
-                                                                      => {
-                                                                           dir     => {
-                                                                                        dirs     => [
-                                                                                                      '.git',
-                                                                                                      'objects',
-                                                                                                      'pack'
-                                                                                                    ],
-                                                                                        file_spec_class
-                                                                                                 => undef,
-                                                                                        volume   => ''
-                                                                                      },
-                                                                           file    => 'pack-76da0c32a0a4918d1828d110636caad32af6ec6c.idx',
-                                                                           file_spec_class
-                                                                                   => undef
-                                                                         }
-                                                            }, 'Git::PurePerl::Pack::WithIndex' ) ]
-                                             }, 'Git::PurePerl' ),
-                                 kind     => 'commit',
-                                 parent_sha1
-                                          => 'b222ff0a7260cc1777c7e455dfcaf22551a512fc',
-                                 parents  => [ 'b222ff0a7260cc1777c7e455dfcaf22551a512fc' ],
-                                 sha1     => '7e54e579e196c6c545fee1030175f65a111039d4',
-                                 size     => 328,
-                                 tree_sha1
-                                          => '278387038d3a42dcc9b3b33d6809c71371caee90'
-                               }, 'Git::PurePerl::Object::Commit' );
-$Git_PurePerl_Object_Commit1->{committed_time}{locale} = $Git_PurePerl_Object_Commit1->{authored_time}{locale};
-bless( $Git_PurePerl_Object_Commit1->{authored_time}, 'DateTime' );
-bless( $Git_PurePerl_Object_Commit1->{committed_time}, 'DateTime' );
-bless( $Git_PurePerl_Object_Commit1->{git}{directory}, 'Path::Class::Dir' );
-bless( $Git_PurePerl_Object_Commit1->{git}{gitdir}, 'Path::Class::Dir' );
-bless( $Git_PurePerl_Object_Commit1->{git}{loose}{directory}, 'Path::Class::Dir' );
-bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{filename}{dir}, 'Path::Class::Dir' );
-bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{filename}, 'Path::Class::File' );
-bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index}{filename}{dir}, 'Path::Class::Dir' );
-bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index}{filename}, 'Path::Class::File' );
-bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index_filename}{dir}, 'Path::Class::Dir' );
-bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index_filename}, 'Path::Class::File' );
--->