##// END OF EJS Templates
moved tooltip function from the for loop and from templates to helpers
marcink -
r990:7a1df013 beta
parent child Browse files
Show More
@@ -593,3 +593,13 b' def safe_unicode(str):'
593 593 u_str = unicode(str(str).encode('string_escape'))
594 594
595 595 return u_str
596
597 def changed_tooltip(nodes):
598 if nodes:
599 pref = ': <br/> '
600 suf = ''
601 if len(nodes) > 30:
602 suf = '<br/>' + _(' and %s more') % (len(nodes) - 30)
603 return literal(pref + '<br/> '.join([x.path for x in nodes[:30]]) + suf)
604 else:
605 return ': ' + _('No Files')
@@ -61,23 +61,10 b''
61 61 <div class="message">${h.link_to(h.wrap_paragraphs(cs.message),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
62 62 </div>
63 63 <div class="right">
64 <div class="changes">
65
66 <%
67 def changed_tooltip(cs):
68 if cs:
69 pref = ': '
70 suf = ''
71 if len(cs) > 30:
72 suf='<br/>'+_(' and %s more') % (len(cs) - 30)
73 return pref+'<br/> '.join([x.path for x in cs[:30]]) + suf
74 else:
75 return ': '+_('No Files')
76 %>
77
78 <span class="removed tooltip" title="${_('removed')}${h.literal(changed_tooltip(cs.removed))}">${len(cs.removed)}</span>
79 <span class="changed tooltip" title="${_('changed')}${h.literal(changed_tooltip(cs.changed))}">${len(cs.changed)}</span>
80 <span class="added tooltip" title="${_('added')}${h.literal(changed_tooltip(cs.added))}">${len(cs.added)}</span>
64 <div class="changes">
65 <span class="removed tooltip" title="<b>${_('removed')}</b>${h.changed_tooltip(cs.removed)}">${len(cs.removed)}</span>
66 <span class="changed tooltip" title="<b>${_('changed')}</b>${h.changed_tooltip(cs.changed)}">${len(cs.changed)}</span>
67 <span class="added tooltip" title="<b>${_('added')}</b>${h.changed_tooltip(cs.added)}">${len(cs.added)}</span>
81 68 </div>
82 69 %if len(cs.parents)>1:
83 70 <div class="merge">
General Comments 0
You need to be logged in to leave comments. Login now