Changeset - dee1913f7f5a
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-06-06 10:57:49
marcin@python-works.com
added message short names for longer descriptions
3 files changed with 13 insertions and 11 deletions:
0 comments (0 inline, 0 general)
pylons_app/templates/base/base.html
Show inline comments
 
@@ -151,4 +151,15 @@ def is_current(selected):
 
            </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
pylons_app/templates/index.html
Show inline comments
 
@@ -37,7 +37,7 @@ from pylons_app.lib import filters
 
	%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>
pylons_app/templates/shortlog/shortlog_data.html
Show inline comments
 
@@ -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>
0 comments (0 inline, 0 general)