diff --git a/rhodecode/apps/repository/views/repo_files.py b/rhodecode/apps/repository/views/repo_files.py --- a/rhodecode/apps/repository/views/repo_files.py +++ b/rhodecode/apps/repository/views/repo_files.py @@ -84,6 +84,7 @@ class RepoFilesView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) c.rhodecode_repo = self.rhodecode_vcs_repo + c.enable_downloads = self.db_repo.enable_downloads return c def _ensure_not_locked(self): diff --git a/rhodecode/templates/files/files_browser.mako b/rhodecode/templates/files/files_browser.mako --- a/rhodecode/templates/files/files_browser.mako +++ b/rhodecode/templates/files/files_browser.mako @@ -27,6 +27,14 @@ ${_('Add File')} % endif + % if c.enable_downloads: + <% at_path = '{}.zip'.format(request.GET.get('at') or c.commit.raw_id[:6]) %> +
+ + ${_('Download tree at {}').format(at_path)} + +
+ % endif