# HG changeset patch # User Marcin Kuzminski # Date 1275814669 -7200 # Node ID dee1913f7f5a638a36df1959b140da93c54b9761 # Parent 00892f5cf504cba3cc18a9b209ca5eb199a17129 added message short names for longer descriptions diff -r 00892f5cf504 -r dee1913f7f5a pylons_app/templates/base/base.html --- a/pylons_app/templates/base/base.html Sat Jun 05 21:35:01 2010 +0200 +++ b/pylons_app/templates/base/base.html Sun Jun 06 10:57:49 2010 +0200 @@ -151,4 +151,15 @@ %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 -r 00892f5cf504 -r dee1913f7f5a pylons_app/templates/index.html --- a/pylons_app/templates/index.html Sat Jun 05 21:35:01 2010 +0200 +++ b/pylons_app/templates/index.html Sun Jun 06 10:57:49 2010 +0200 @@ -37,7 +37,7 @@ %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 -r 00892f5cf504 -r dee1913f7f5a pylons_app/templates/shortlog/shortlog_data.html --- a/pylons_app/templates/shortlog/shortlog_data.html Sat Jun 05 21:35:01 2010 +0200 +++ b/pylons_app/templates/shortlog/shortlog_data.html Sun Jun 06 10:57:49 2010 +0200 @@ -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)}