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 name="message_slug(msg)"> + <% + limit = 60 + if len(msg) > limit: + return msg[:limit]+'...' + else: + return msg + %> \ 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): ${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))} - ${repo['description']} + ${self.message_slug(repo['description'])} ${repo['last_change']|n,filters.age} ${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']))} ${repo['contact']|n,filters.person} diff --git a/pylons_app/templates/shortlog/shortlog_data.html b/pylons_app/templates/shortlog/shortlog_data.html --- a/pylons_app/templates/shortlog/shortlog_data.html +++ b/pylons_app/templates/shortlog/shortlog_data.html @@ -3,22 +3,13 @@ from pylons_app.lib import filters %> -<%def name="message_slug(msg)"> - <% - limit = 60 - if len(msg) > limit: - return msg[:limit]+'...' - else: - return msg - %> - %for cnt,cs in enumerate(c.repo_changesets):
${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)}