From: Dan Brook Date: Sun, 6 Mar 2011 20:15:36 +0000 (+0000) Subject: Respect paging.log config settings. X-Git-Tag: 0.003001~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ee4b079d7a6a94d79ef6808ca1018bbc9227846;p=catagits%2FGitalist.git Respect paging.log config settings. Also try to render commit messages faithfully. --- diff --git a/gitalist.conf b/gitalist.conf index a238ab0..3b70911 100644 --- a/gitalist.conf +++ b/gitalist.conf @@ -9,7 +9,7 @@ name Gitalist sitename "A Gitalist" - log = 50 + log = 20 summary = 17 diff --git a/lib/Gitalist/URIStructure/Fragment/WithLog.pm b/lib/Gitalist/URIStructure/Fragment/WithLog.pm index ea3ae2a..9d6d4ad 100644 --- a/lib/Gitalist/URIStructure/Fragment/WithLog.pm +++ b/lib/Gitalist/URIStructure/Fragment/WithLog.pm @@ -10,7 +10,7 @@ after log => sub { my %logargs = ( sha1 => $c->stash->{Commit}->sha1, # $commit->sha1 - count => 25, #Gitalist->config->{paging}{log} || 25, + count => Gitalist->config->{paging}{log} || 25, ); my $page = $c->req->param('pg') || 0; diff --git a/root/fragment/ref/commit.tt2 b/root/fragment/ref/commit.tt2 index 9719b1b..29cae88 100755 --- a/root/fragment/ref/commit.tt2 +++ b/root/fragment/ref/commit.tt2 @@ -12,10 +12,10 @@ [% INCLUDE 'inc/chroma_hash.tt2' sha1 = Commit.sha1.substr(0, 7) %] [% time_since(Commit.authored_time) %] - [% - message = Commit.comment | html; message.replace("\n", "
"); - INCLUDE '_refs.tt2' object = commit; - %] + +

[% Commit.comment | html %]

+ [% INCLUDE '_refs.tt2' object = commit %] + [% Commit.author.name | html %] Author diff --git a/root/fragment/repository/shortlog.tt2 b/root/fragment/repository/shortlog.tt2 index 70ca25e..4394d76 100755 --- a/root/fragment/repository/shortlog.tt2 +++ b/root/fragment/repository/shortlog.tt2 @@ -20,14 +20,14 @@ [% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %] [% time_since(line.authored_time) %] - - [% IF longlogformat %] - [% message = line.comment | html; message.replace("\n", "
") %] - [% ELSE %] - [% short_cmt(line.comment) | html %] - [% INCLUDE '_refs.tt2' object = line %] - [% END %] - +

[%- + IF longlogformat; + line.comment | html; + ELSE; + short_cmt(line.comment) | html; + + END; + -%]

[% INCLUDE '_refs.tt2' object = line %] [% line.author.name | html %] commit diff --git a/root/inc/log_pager.tt2 b/root/inc/log_pager.tt2 index e58aaab..bc2af4b 100755 --- a/root/inc/log_pager.tt2 +++ b/root/inc/log_pager.tt2 @@ -1,11 +1,9 @@ diff --git a/root/repository/search.tt2 b/root/repository/search.tt2 index 901d4d6..318d5a1 100755 --- a/root/repository/search.tt2 +++ b/root/repository/search.tt2 @@ -16,7 +16,7 @@ [% INCLUDE 'inc/chroma_hash.tt2' sha1 = result.sha1.substr(0, 7) %] [% time_since(result.authored_time) %] - [% + [% # XXX This is fragile at best. html_comment = result.comment | html; html_comment.replace( diff --git a/root/static/css/core.css b/root/static/css/core.css index 033f614..e34a12b 100755 --- a/root/static/css/core.css +++ b/root/static/css/core.css @@ -536,6 +536,14 @@ div.blob { /* /blobdiff etc */ +.commit-message { + white-space: pre-wrap; + width: 400px; +} +p.commit-message { + margin: 0; +} + /* Hidden spans that contain bits of data to be used by JS */ .js-data { display: none;