diff --git a/pylons_app/templates/base/base.html b/pylons_app/templates/base/base.html --- a/pylons_app/templates/base/base.html +++ b/pylons_app/templates/base/base.html @@ -151,4 +151,15 @@ def is_current(selected): %endif %endif +%def> + + +<%def name="message_slug(msg)"> + <% + limit = 60 + if len(msg) > limit: + return msg[:limit]+'...' + else: + return msg + %> %def> \ No newline at end of file diff --git a/pylons_app/templates/index.html b/pylons_app/templates/index.html --- a/pylons_app/templates/index.html +++ b/pylons_app/templates/index.html @@ -37,7 +37,7 @@ from pylons_app.lib import filters %for cnt,repo in enumerate(c.repos_list):
${cs._ctx.date()|n,filters.age} | ${cs.author|n,filters.person} | r${cs.revision} | - ${h.link_to(message_slug(cs.message), + ${h.link_to(self.message_slug(cs.message), h.url('changeset_home',repo_name=c.repo_name,revision=cs._short), title=cs.message)} |