Mercurial > public > src > rhodecode
changeset 259:dee1913f7f5a
added message short names for longer descriptions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 06 Jun 2010 10:57:49 +0200 |
parents | 00892f5cf504 |
children | 6ada8c223374 |
files | pylons_app/templates/base/base.html pylons_app/templates/index.html pylons_app/templates/shortlog/shortlog_data.html |
diffstat | 3 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ </span> %endif %endif +</%def> + +<!-- SHORTER LONGER STRINGS --> +<%def name="message_slug(msg)"> + <% + limit = 60 + if len(msg) > limit: + return msg[:limit]+'...' + else: + return msg + %> </%def> \ No newline at end of file
--- 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): <tr class="parity${cnt%2}"> <td>${h.link(repo['name'],h.url('summary_home',repo_name=repo['name']))}</td> - <td>${repo['description']}</td> + <td title="${repo['description']}">${self.message_slug(repo['description'])}</td> <td>${repo['last_change']|n,filters.age}</td> <td>${h.link_to('r%s:%s' % (repo['rev'],repo['tip']),h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']))}</td> <td title="${repo['contact']}">${repo['contact']|n,filters.person}</td>
--- 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 %> <table> -<%def name="message_slug(msg)"> - <% - limit = 60 - if len(msg) > limit: - return msg[:limit]+'...' - else: - return msg - %> -</%def> %for cnt,cs in enumerate(c.repo_changesets): <tr class="parity${cnt%2}"> <td>${cs._ctx.date()|n,filters.age}</td> <td title="${cs.author}">${cs.author|n,filters.person}</td> <td>r${cs.revision}</td> <td> - ${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)} </td>