Mercurial > kallithea
comparison rhodecode/templates/files/files_source.html @ 1043:6ec53c16c744 beta
fixed binary file issues
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 14 Feb 2011 15:29:53 +0100 |
parents | 59b7131c15b1 |
children | ed5270522724 |
comparison
equal
deleted
inserted
replaced
1042:ab0a2b69d082 | 1043:6ec53c16c744 |
---|---|
34 <div class="code-header"> | 34 <div class="code-header"> |
35 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${h.short_id(c.files_list.last_changeset.raw_id)}</div> | 35 <div class="revision">${c.files_list.name}@r${c.files_list.last_changeset.revision}:${h.short_id(c.files_list.last_changeset.raw_id)}</div> |
36 <div class="commit">"${c.files_list.last_changeset.message}"</div> | 36 <div class="commit">"${c.files_list.last_changeset.message}"</div> |
37 </div> | 37 </div> |
38 <div class="code-body"> | 38 <div class="code-body"> |
39 %if c.files_list.is_binary: | |
40 ${_('Binary file')} | |
41 %else: | |
39 % if c.files_list.size < c.cut_off_limit: | 42 % if c.files_list.size < c.cut_off_limit: |
40 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | 43 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} |
41 %else: | 44 %else: |
42 ${_('File is to big to display')} ${h.link_to(_('show as raw'), | 45 ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
43 h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} | 46 h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))} |
69 h_lines.push(parseInt(highlight_ranges[pos])); | 72 h_lines.push(parseInt(highlight_ranges[pos])); |
70 } | 73 } |
71 } | 74 } |
72 highlight_lines(h_lines); | 75 highlight_lines(h_lines); |
73 } | 76 } |
74 </script> | 77 </script> |
78 %endif | |
75 </div> | 79 </div> |
76 </div> | 80 </div> |
77 | 81 |
78 <script type="text/javascript"> | 82 <script type="text/javascript"> |
79 YAHOO.util.Event.onDOMReady(function(){ | 83 YAHOO.util.Event.onDOMReady(function(){ |