Mercurial > kallithea
diff rhodecode/templates/files/files_annotate.html @ 1232:0dc8d578ff49
merges for stable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 09 Apr 2011 18:38:18 +0200 |
parents | e8b5be26fb78 |
children | bf263968da47 |
line wrap: on
line diff
--- a/rhodecode/templates/files/files_annotate.html Sat Apr 09 17:13:15 2011 +0200 +++ b/rhodecode/templates/files/files_annotate.html Sat Apr 09 18:38:18 2011 +0200 @@ -51,8 +51,8 @@ ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} ${h.hidden('diff2',c.file.last_changeset.raw_id)} ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} - ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} - ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} + ${h.submit('diff','diff to revision',class_="ui-button")} + ${h.submit('show_rev','show at revision',class_="ui-button")} ${h.end_form()} </div> </dd> @@ -63,24 +63,28 @@ <div class="commit">"${c.file.message}"</div> </div> <div class="code-body"> + %if c.file.is_binary: + ${_('Binary file')} + %else: % if c.file.size < c.cut_off_limit: - ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} + ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} %else: ${_('File is to big to display')} ${h.link_to(_('show as raw'), h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} - %endif + %endif + <script type="text/javascript"> + YAHOO.util.Event.onDOMReady(function(){ + YAHOO.util.Event.addListener('show_rev','click',function(e){ + YAHOO.util.Event.preventDefault(e); + var cs = YAHOO.util.Dom.get('diff1').value; + var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); + window.location = url; + }); + }); + </script> + %endif </div> </div> - <script type="text/javascript"> - YAHOO.util.Event.onDOMReady(function(){ - YAHOO.util.Event.addListener('show_rev','click',function(e){ - YAHOO.util.Event.preventDefault(e); - var cs = YAHOO.util.Dom.get('diff1').value; - var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); - window.location = url; - }); - }); - </script> </div> </div> </div>