Changeset - e86191684f4b
[Not reviewed]
beta
0 4 0
Marcin Kuzminski - 14 years ago 2011-11-12 19:24:07
marcin@python-works.com
fixed some anchor id problems for changeset ranges
3 files changed with 5 insertions and 10 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -30,13 +30,13 @@ from webhelpers.pylonslib.secure_form im
 
from webhelpers.text import chop_at, collapse, convert_accented_entities, \
 
    convert_misc_entities, lchop, plural, rchop, remove_formatting, \
 
    replace_whitespace, urlify, truncate, wrap_paragraphs
 
from webhelpers.date import time_ago_in_words
 
from webhelpers.paginate import Page
 
from webhelpers.html.tags import _set_input_attrs, _set_id_attr, \
 
    convert_boolean_attrs, NotGiven
 
    convert_boolean_attrs, NotGiven, _make_safe_id_component
 

	
 
from vcs.utils.annotate import annotate_highlight
 
from rhodecode.lib.utils import repo_name_slug
 
from rhodecode.lib import str2bool, safe_unicode, safe_str, get_changeset_safe
 

	
 
from rhodecode.lib.markup_renderer import MarkupRenderer
 
@@ -48,13 +48,13 @@ def _reset(name, value=None, id=NotGiven
 
    _set_input_attrs(attrs, type, name, value)
 
    _set_id_attr(attrs, id, name)
 
    convert_boolean_attrs(attrs, ["disabled"])
 
    return HTML.input(**attrs)
 

	
 
reset = _reset
 

	
 
safeid = _make_safe_id_component
 

	
 
def get_token():
 
    """Return the current authentication token, creating one if one doesn't
 
    already exist.
 
    """
 
    token_key = "_authentication_token"
rhodecode/public/css/diff.css
Show inline comments
 
@@ -31,16 +31,12 @@ div.diffblock pre.raw{
 
}
 

	
 
table.code-difftable{
 
	border-collapse: collapse;
 
	width: 99%;
 
}
 
table.code-difftable td:target *{
 
	background:  repeat scroll 0 0 #FFFFBE !important;
 
	text-decoration: underline;
 
}
 

	
 
table.code-difftable td {
 
    padding: 0 !important; 
 
    background: none !important; 
 
    border:0 !important;    
 
}
rhodecode/templates/changeset/changeset.html
Show inline comments
 
@@ -60,13 +60,13 @@
 
                         <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
 
                         <span class="added"   title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>	                    
 
	                    % endif		                 
 
		             </div>                  
 
		                 %if len(c.changeset.parents)>1:
 
		                 <div class="merge">
 
		                     ${_('merge')}<img alt="merge" src="${h.url("/images/icons/arrow_join.png")}"/>
 
		                     ${_('merge')}<img alt="merge" src="${h.url('/images/icons/arrow_join.png')}"/>
 
		                 </div>
 
		                 %endif
 
		                 
 
		            %if c.changeset.parents:
 
		             %for p_cs in reversed(c.changeset.parents):
 
		                 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(h.short_id(p_cs.raw_id),
 
@@ -89,14 +89,13 @@
 
	        <span style="font-size:1.1em;font-weight: bold">
 
	        ${_('%s files affected with %s additions and %s deletions.') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
 
	        </span>
 
	        <div class="cs_files">
 
	                %for change,filenode,diff,cs1,cs2,stat in c.changes:
 
	                    <div class="cs_${change}">
 
		                    <div class="node">${h.link_to(h.safe_unicode(filenode.path),
 
		                                        h.url.current(anchor=h.repo_name_slug('C%s' % h.safe_unicode(filenode.path))))}</div>
 
		                    <div class="node">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor='C-%s-%s' % (h.short_id(filenode.changeset.raw_id),h.safeid(h.safe_unicode(filenode.path)))))}</div>
 
		                    <div class="changes">${h.fancy_file_stats(stat)}</div>
 
	                    </div>
 
	                %endfor
 
	                % if c.cut_off:
 
	                  ${_('Changeset was too big and was cut off...')}
 
	                % endif
 
@@ -106,13 +105,13 @@
 
    </div>
 
    	
 
	%for change,filenode,diff,cs1,cs2,stat in c.changes:
 
		%if change !='removed':
 
		<div style="clear:both;height:10px"></div>
 
		<div class="diffblock  margined">
 
			<div id="${h.repo_name_slug('C%s' % h.safe_unicode(filenode.path))}" class="code-header">
 
			<div id="${'C-%s-%s' % (h.short_id(filenode.changeset.raw_id),h.safeid(h.safe_unicode(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,
 
						revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
 
					</span>
 
					%if 1:
0 comments (0 inline, 0 general)