[PATCH] repository 'latest changes': truncate first line to avoid table bleed

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu Feb 19 07:36:50 EST 2015


For commit messages with the first line being very long, the 'latest changes'
table on the repository overview page can 'bleed', so that the commit number
overlaps with the commit status.

Commit 15cb8156b10d732cf39b37a88c656894621c0f54 changed the initial truncate
on 50 characters to a chop at the first newline characters.
In this commit, re-add a truncation of the first line, at 120 characters.

diff --git a/kallithea/templates/changelog/changelog_summary_data.html b/kallithea/templates/changelog/changelog_summary_data.html
--- a/kallithea/templates/changelog/changelog_summary_data.html
+++ b/kallithea/templates/changelog/changelog_summary_data.html
@@ -38,7 +38,7 @@
          </div>
         </td>
         <td>
-            ${h.urlify_commit(h.chop_at(cs.message,'\n'),c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
+            ${h.urlify_commit(h.truncate(h.chop_at(cs.message,'\n'), 120), c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
         </td>
         <td><span class="tooltip" title="${h.tooltip(h.fmt_date(cs.date))}">
                       ${h.age(cs.date)}</span>


More information about the kallithea-general mailing list