diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py --- a/rhodecode/controllers/files.py +++ b/rhodecode/controllers/files.py @@ -52,6 +52,7 @@ class FilesController(BaseController): 'repository.admin') def __before__(self): super(FilesController, self).__before__() + c.cut_off_limit = self.cut_off_limit def index(self, repo_name, revision, f_path): hg_model = ScmModel() diff --git a/rhodecode/templates/files/files_annotate.html b/rhodecode/templates/files/files_annotate.html --- a/rhodecode/templates/files/files_annotate.html +++ b/rhodecode/templates/files/files_annotate.html @@ -63,7 +63,7 @@
"${c.file.message}"
- % if c.file.size < c.file_size_limit: + % if c.file.size < c.cut_off_limit: ${h.pygmentize_annotation(c.file,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} %else: ${_('File is to big to display')} ${h.link_to(_('show as raw'), diff --git a/rhodecode/templates/files/files_source.html b/rhodecode/templates/files/files_source.html --- a/rhodecode/templates/files/files_source.html +++ b/rhodecode/templates/files/files_source.html @@ -36,7 +36,7 @@
"${c.files_list.last_changeset.message}"
- % if c.files_list.size < c.file_size_limit: + % if c.files_list.size < c.cut_off_limit: ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} %else: ${_('File is to big to display')} ${h.link_to(_('show as raw'),