##// END OF EJS Templates
Files: expose downloads onto files view
dan -
r3374:6550d332 default
parent child Browse files
Show More
@@ -84,6 +84,7 b' class RepoFilesView(RepoAppView):'
84 def load_default_context(self):
84 def load_default_context(self):
85 c = self._get_local_tmpl_context(include_app_defaults=True)
85 c = self._get_local_tmpl_context(include_app_defaults=True)
86 c.rhodecode_repo = self.rhodecode_vcs_repo
86 c.rhodecode_repo = self.rhodecode_vcs_repo
87 c.enable_downloads = self.db_repo.enable_downloads
87 return c
88 return c
88
89
89 def _ensure_not_locked(self):
90 def _ensure_not_locked(self):
@@ -27,6 +27,14 b''
27 ${_('Add File')}</a>
27 ${_('Add File')}</a>
28 </div>
28 </div>
29 % endif
29 % endif
30 % if c.enable_downloads:
31 <% at_path = '{}.zip'.format(request.GET.get('at') or c.commit.raw_id[:6]) %>
32 <div title="${_('Download tree at {}').format(at_path)}" class="btn btn-default new-file">
33 <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname=c.commit.raw_id)}">
34 ${_('Download tree at {}').format(at_path)}
35 </a>
36 </div>
37 % endif
30 </div>
38 </div>
31
39
32 <div class="browser-search">
40 <div class="browser-search">
General Comments 0
You need to be logged in to leave comments. Login now