Mercurial > kallithea
changeset 1688:82e604d3fc46 beta
changeset ranges use new fileid method.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 15 Nov 2011 00:15:19 +0200 |
parents | e21ec97aca1f |
children | cc302c98bb8e |
files | rhodecode/templates/changeset/changeset_range.html |
diffstat | 1 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/templates/changeset/changeset_range.html Tue Nov 15 00:08:03 2011 +0200 +++ b/rhodecode/templates/changeset/changeset_range.html Tue Nov 15 00:15:19 2011 +0200 @@ -16,6 +16,12 @@ ${self.menu('changelog')} </%def> +<%def name="fid(raw_id,path)" filter="strip"> + <% + return 'C-%s-%s' % (h.short_id(raw_id),h.safeid(h.safe_unicode(path))) + %> +</%def> + <%def name="main()"> <div class="box"> <!-- box / title --> @@ -25,13 +31,9 @@ <div class="table"> <div id="body" class="diffblock"> <div class="code-header"> - <div> + <h3>${_('Compare View')}</h3> + <div> ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} - <h3>${_('Compare View')}</h3> - ##» <span>${h.link_to(_('raw diff'), - ##h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))}</span> - ##» <span>${h.link_to(_('download diff'), - ##h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</span> </div> </div> </div> @@ -54,7 +56,7 @@ %for cs in c.cs_ranges: <div class="cur_cs">r${cs}</div> %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: - <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.repo_name_slug('C%s-%s' % (cs.short_id,h.safe_unicode(filenode.path)))))}</div> + <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid(cs.raw_id,filenode.path)))}</div> %endfor %endfor </div> @@ -65,8 +67,8 @@ %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: %if change !='removed': <div style="clear:both;height:10px"></div> - <div class="diffblock"> - <div id="${h.repo_name_slug('C%s-%s' % (cs.short_id,h.safe_unicode(filenode.path)))}" class="code-header"> + <div class="diffblock margined"> + <div id="${self.fid(cs.raw_id,filenode.path)}" class="code-header"> <div class="changeset_header"> <span class="changeset_file"> ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,