Mercurial > kallithea
comparison 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 |
comparison
equal
deleted
inserted
replaced
1231:9f6560667743 | 1232:0dc8d578ff49 |
---|---|
49 <dd> | 49 <dd> |
50 <div> | 50 <div> |
51 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} | 51 ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} |
52 ${h.hidden('diff2',c.file.last_changeset.raw_id)} | 52 ${h.hidden('diff2',c.file.last_changeset.raw_id)} |
53 ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} | 53 ${h.select('diff1',c.file.last_changeset.raw_id,c.file_history)} |
54 ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} | 54 ${h.submit('diff','diff to revision',class_="ui-button")} |
55 ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} | 55 ${h.submit('show_rev','show at revision',class_="ui-button")} |
56 ${h.end_form()} | 56 ${h.end_form()} |
57 </div> | 57 </div> |
58 </dd> | 58 </dd> |
59 </dl> | 59 </dl> |
60 <div id="body" class="codeblock"> | 60 <div id="body" class="codeblock"> |
61 <div class="code-header"> | 61 <div class="code-header"> |
62 <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${h.short_id(c.file.last_changeset.raw_id)}</div> | 62 <div class="revision">${c.file.name}@r${c.file.last_changeset.revision}:${h.short_id(c.file.last_changeset.raw_id)}</div> |
63 <div class="commit">"${c.file.message}"</div> | 63 <div class="commit">"${c.file.message}"</div> |
64 </div> | 64 </div> |
65 <div class="code-body"> | 65 <div class="code-body"> |
66 %if c.file.is_binary: | |
67 ${_('Binary file')} | |
68 %else: | |
66 % if c.file.size < c.cut_off_limit: | 69 % if c.file.size < c.cut_off_limit: |
67 ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} | 70 ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} |
68 %else: | 71 %else: |
69 ${_('File is to big to display')} ${h.link_to(_('show as raw'), | 72 ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
70 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} | 73 h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} |
71 %endif | 74 %endif |
75 <script type="text/javascript"> | |
76 YAHOO.util.Event.onDOMReady(function(){ | |
77 YAHOO.util.Event.addListener('show_rev','click',function(e){ | |
78 YAHOO.util.Event.preventDefault(e); | |
79 var cs = YAHOO.util.Dom.get('diff1').value; | |
80 var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); | |
81 window.location = url; | |
82 }); | |
83 }); | |
84 </script> | |
85 %endif | |
72 </div> | 86 </div> |
73 </div> | 87 </div> |
74 <script type="text/javascript"> | |
75 YAHOO.util.Event.onDOMReady(function(){ | |
76 YAHOO.util.Event.addListener('show_rev','click',function(e){ | |
77 YAHOO.util.Event.preventDefault(e); | |
78 var cs = YAHOO.util.Dom.get('diff1').value; | |
79 var url = "${h.url('files_annotate_home',repo_name=c.repo_name,revision='__CS__',f_path=c.f_path)}".replace('__CS__',cs); | |
80 window.location = url; | |
81 }); | |
82 }); | |
83 </script> | |
84 </div> | 88 </div> |
85 </div> | 89 </div> |
86 </div> | 90 </div> |
87 </%def> | 91 </%def> |