Navigation links are still broken in this commit.
__PACKAGE__->config->{namespace} = '';
+use Moose::Autobox;
use Sys::Hostname ();
use XML::Atom::Feed;
use XML::Atom::Entry;
# For legacy support.
sub history : Local {
- $_[1]->forward('shortlog');
+ my ( $self, $c ) = @_;
+ $self->shortlog($c);
+ my $project = $c->stash->{Project};
+ my $file = $project->get_object(
+ $project->hash_by_path(
+ $project->head_hash,
+ $c->stash->{filename}
+ )
+ );
+ $c->stash( action => 'history',
+ filetype => $file->type,
+ );
}
=head2 tree
--- /dev/null
+<table class='history listing'>
+ <thead>
+ <tr>
+ <th>sha1</th>
+ <th>time</th>
+ <th>author</th>
+ <th>message</th>
+ <th>actions</th>
+ </tr>
+ </thead>
+
+ <tfoot>
+ <tr>
+ <td>sha1</td>
+ <td>time</td>
+ <td>author</td>
+ <td>message</td>
+ <td>actions</td>
+ </tr>
+ </tfoot>
+
+ <tbody>
+ [% FOREACH line IN log_lines %]
+ <tr>
+ <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
+ <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
+ <td class='author'>[% line.author.name | html %]</td>
+ <td>
+ [% short_cmt(line.comment) | html %]
+ [% INCLUDE '_refs.tt2' object = line.0 %]
+ </td>
+ <td class='action-list'>
+ [% IF filetype == 'tree' %]
+ <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
+ [% ELSIF filetype == 'blob' %]
+ <a href="[% c.uri_for("blob", {hb=line.sha1, f=filename}) %]">blob</a>
+ [% END %]
+ <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
+ [% IF filetype == 'blob' %]
+ <a href="[% c.uri_for("blobdiff", {hb="HEAD", hpb=line.sha1, f=filename}) %]">diff to current</a>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
+</table>
</td>
<td class='action-list'>
<a href="[% c.uri_for(theact, {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">[% theact %]</a>
- <a href="[% c.uri_for('shortlog', {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">history</a>
+ <a href="[% c.uri_for('history', {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">history</a>
[% IF item.type == 'blob' %]
<a href="[% c.uri_for('raw', {hb=commit.sha1, f=fullpath}) %]">raw</a>
[% END %]
--- /dev/null
+[% INCLUDE 'nav/actions.tt2' object = commit %]
+
+[%
+ INCLUDE '_log_pager.tt2';
+ INCLUDE '_history.tt2';
+ INCLUDE '_log_pager.tt2';
+%]
-[% PROCESS 'nav/actions.tt2' object = head %]
+[% PROCESS 'nav/actions.tt2' object = commit %]
<div class='summary'>
<!-- <div id='stats'>