diff --git a/rhodecode/controllers/files.py b/rhodecode/controllers/files.py --- a/rhodecode/controllers/files.py +++ b/rhodecode/controllers/files.py @@ -223,9 +223,10 @@ class FilesController(BaseRepoController c.file_author = True c.file_tree = '' if c.file.is_file(): + c.file_source_page = 'true' c.file_last_commit = c.file.last_commit if c.file.size < self.cut_off_limit_file: - if c.annotate: # annotation has precedence over renderer + if c.annotate: # annotation has precedence over renderer c.annotated_lines = filenode_as_annotated_lines_tokens( c.file ) @@ -244,6 +245,7 @@ class FilesController(BaseRepoController c.authors = [(h.email(author), h.person(author, 'username_or_name_or_email'))] else: + c.file_source_page = 'false' c.authors = [] c.file_tree = self._get_tree_at_commit( repo_name, c.commit.raw_id, f_path) diff --git a/rhodecode/templates/files/files.html b/rhodecode/templates/files/files.html --- a/rhodecode/templates/files/files.html +++ b/rhodecode/templates/files/files.html @@ -88,7 +88,7 @@ if (metadataRequest && metadataRequest.readyState != 4) { metadataRequest.abort(); } - if (source_page) { + if (fileSourcePage) { return false; } @@ -143,8 +143,7 @@ $(this).hide(); }); - - if (source_page) { + if (fileSourcePage) { // variants for with source code, not tree view // select code link event diff --git a/rhodecode/templates/files/files_browser.html b/rhodecode/templates/files/files_browser.html --- a/rhodecode/templates/files/files_browser.html +++ b/rhodecode/templates/files/files_browser.html @@ -47,7 +47,3 @@ - - diff --git a/rhodecode/templates/files/files_pjax.html b/rhodecode/templates/files/files_pjax.html --- a/rhodecode/templates/files/files_pjax.html +++ b/rhodecode/templates/files/files_pjax.html @@ -34,7 +34,10 @@ % endif - + % if c.file.is_dir():
- - - + \ No newline at end of file