Show More
@@ -331,6 +331,10 b' def includeme(config):' | |||||
331 | name='edit_repo_advanced_fork', |
|
331 | name='edit_repo_advanced_fork', | |
332 | pattern='/{repo_name:.*?[^/]}/settings/advanced/fork', repo_route=True) |
|
332 | pattern='/{repo_name:.*?[^/]}/settings/advanced/fork', repo_route=True) | |
333 |
|
333 | |||
|
334 | config.add_route( | |||
|
335 | name='edit_repo_advanced_hooks', | |||
|
336 | pattern='/{repo_name:.*?[^/]}/settings/advanced/hooks', repo_route=True) | |||
|
337 | ||||
334 | # Caches |
|
338 | # Caches | |
335 | config.add_route( |
|
339 | config.add_route( | |
336 | name='edit_repo_caches', |
|
340 | name='edit_repo_caches', |
@@ -43,8 +43,6 b' class RepoSettingsView(RepoAppView):' | |||||
43 |
|
43 | |||
44 | def load_default_context(self): |
|
44 | def load_default_context(self): | |
45 | c = self._get_local_tmpl_context() |
|
45 | c = self._get_local_tmpl_context() | |
46 |
|
||||
47 |
|
||||
48 | return c |
|
46 | return c | |
49 |
|
47 | |||
50 | @LoginRequired() |
|
48 | @LoginRequired() | |
@@ -231,3 +229,19 b' class RepoSettingsView(RepoAppView):' | |||||
231 |
|
229 | |||
232 | raise HTTPFound( |
|
230 | raise HTTPFound( | |
233 | h.route_path('edit_repo_advanced', repo_name=self.db_repo_name)) |
|
231 | h.route_path('edit_repo_advanced', repo_name=self.db_repo_name)) | |
|
232 | ||||
|
233 | @LoginRequired() | |||
|
234 | @HasRepoPermissionAnyDecorator('repository.admin') | |||
|
235 | @view_config( | |||
|
236 | route_name='edit_repo_advanced_hooks', request_method='GET', | |||
|
237 | renderer='rhodecode:templates/admin/repos/repo_edit.mako') | |||
|
238 | def edit_advanced_install_hooks(self): | |||
|
239 | """ | |||
|
240 | Install Hooks for repository | |||
|
241 | """ | |||
|
242 | _ = self.request.translate | |||
|
243 | self.load_default_context() | |||
|
244 | self.rhodecode_vcs_repo.install_hooks(force=True) | |||
|
245 | h.flash(_('installed hooks repository'), category='success') | |||
|
246 | raise HTTPFound( | |||
|
247 | h.route_path('edit_repo_advanced', repo_name=self.db_repo_name)) |
General Comments 0
You need to be logged in to leave comments.
Login now