Show More
@@ -224,12 +224,16 class FilesController(BaseController): | |||
|
224 | 224 | elif c.action == 'diff': |
|
225 | 225 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: |
|
226 | 226 | c.cur_diff = _('Diff is to big to display') |
|
227 | elif node1.is_binary or node2.is_binary: | |
|
228 | c.cur_diff = _('Binary file') | |
|
227 | 229 | else: |
|
228 | 230 | c.cur_diff = diff.as_html() |
|
229 | 231 | else: |
|
230 | 232 | #default option |
|
231 | 233 | if node1.size > self.cut_off_limit or node2.size > self.cut_off_limit: |
|
232 | 234 | c.cur_diff = _('Diff is to big to display') |
|
235 | elif node1.is_binary or node2.is_binary: | |
|
236 | c.cur_diff = _('Binary file') | |
|
233 | 237 | else: |
|
234 | 238 | c.cur_diff = diff.as_html() |
|
235 | 239 |
@@ -63,14 +63,15 | |||
|
63 | 63 | <div class="commit">"${c.file.message}"</div> |
|
64 | 64 | </div> |
|
65 | 65 | <div class="code-body"> |
|
66 | %if c.file.is_binary: | |
|
67 | ${_('Binary file')} | |
|
68 | %else: | |
|
66 | 69 | % if c.file.size < c.cut_off_limit: |
|
67 | 70 | ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} |
|
68 | 71 | %else: |
|
69 | 72 | ${_('File is to big to display')} ${h.link_to(_('show as raw'), |
|
70 | 73 | h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.revision,f_path=c.f_path))} |
|
71 | 74 |
%endif |
|
72 | </div> | |
|
73 | </div> | |
|
74 | 75 |
|
|
75 | 76 |
|
|
76 | 77 |
|
@@ -81,6 +82,9 | |||
|
81 | 82 |
|
|
82 | 83 | }); |
|
83 | 84 |
|
|
85 | %endif | |
|
86 | </div> | |
|
87 | </div> | |
|
84 | 88 | </div> |
|
85 | 89 | </div> |
|
86 | 90 | </div> |
@@ -36,6 +36,9 | |||
|
36 | 36 | <div class="commit">"${c.files_list.last_changeset.message}"</div> |
|
37 | 37 | </div> |
|
38 | 38 | <div class="code-body"> |
|
39 | %if c.files_list.is_binary: | |
|
40 | ${_('Binary file')} | |
|
41 | %else: | |
|
39 | 42 | % if c.files_list.size < c.cut_off_limit: |
|
40 | 43 | ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} |
|
41 | 44 | %else: |
@@ -72,6 +75,7 | |||
|
72 | 75 | highlight_lines(h_lines); |
|
73 | 76 | } |
|
74 | 77 |
</script> |
|
78 | %endif | |
|
75 | 79 | </div> |
|
76 | 80 | </div> |
|
77 | 81 |
General Comments 0
You need to be logged in to leave comments.
Login now