Show More
@@ -0,0 +1,51 b'' | |||||
|
1 | # -*- coding: utf-8 -*- | |||
|
2 | ||||
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |||
|
4 | # | |||
|
5 | # This program is free software: you can redistribute it and/or modify | |||
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |||
|
7 | # (only), as published by the Free Software Foundation. | |||
|
8 | # | |||
|
9 | # This program is distributed in the hope that it will be useful, | |||
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
12 | # GNU General Public License for more details. | |||
|
13 | # | |||
|
14 | # You should have received a copy of the GNU Affero General Public License | |||
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
|
16 | # | |||
|
17 | # This program is dual-licensed. If you wish to learn more about the | |||
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |||
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |||
|
20 | ||||
|
21 | import logging | |||
|
22 | ||||
|
23 | from pyramid.view import view_config | |||
|
24 | ||||
|
25 | from rhodecode.apps._base import RepoAppView | |||
|
26 | from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator | |||
|
27 | ||||
|
28 | log = logging.getLogger(__name__) | |||
|
29 | ||||
|
30 | ||||
|
31 | class RepoReviewRulesView(RepoAppView): | |||
|
32 | def load_default_context(self): | |||
|
33 | c = self._get_local_tmpl_context() | |||
|
34 | ||||
|
35 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |||
|
36 | c.repo_info = self.db_repo | |||
|
37 | ||||
|
38 | self._register_global_c(c) | |||
|
39 | return c | |||
|
40 | ||||
|
41 | @LoginRequired() | |||
|
42 | @HasRepoPermissionAnyDecorator('repository.admin') | |||
|
43 | @view_config( | |||
|
44 | route_name='repo_reviewers', request_method='GET', | |||
|
45 | renderer='rhodecode:templates/admin/repos/repo_edit.mako') | |||
|
46 | def repo_review_rules(self): | |||
|
47 | c = self.load_default_context() | |||
|
48 | c.active = 'reviewers' | |||
|
49 | ||||
|
50 | return self._get_template_context(c) | |||
|
51 |
1 | NO CONTENT: new file 100644, binary diff hidden |
|
NO CONTENT: new file 100644, binary diff hidden |
@@ -0,0 +1,9 b'' | |||||
|
1 | <div class="panel panel-default"> | |||
|
2 | <div class="panel-heading"> | |||
|
3 | <h3 class="panel-title">${_('Default Reviewer Rules')}</h3> | |||
|
4 | </div> | |||
|
5 | <div class="panel-body"> | |||
|
6 | <h4>${_('This feature is available in RhodeCode EE edition only. Contact {sales_email} to obtain a trial license.').format(sales_email='<a href="mailto:sales@rhodecode.com">sales@rhodecode.com</a>')|n}</h4> | |||
|
7 | <img style="width: 100%; height: 100%" src="${h.asset('images/ee_features/default_reviewers.png')}"/> | |||
|
8 | </div> | |||
|
9 | </div> |
@@ -1,56 +1,61 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | # Copyright (C) 2016-2017 RhodeCode GmbH |
|
3 | # Copyright (C) 2016-2017 RhodeCode GmbH | |
4 | # |
|
4 | # | |
5 | # This program is free software: you can redistribute it and/or modify |
|
5 | # This program is free software: you can redistribute it and/or modify | |
6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
6 | # it under the terms of the GNU Affero General Public License, version 3 | |
7 | # (only), as published by the Free Software Foundation. |
|
7 | # (only), as published by the Free Software Foundation. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU Affero General Public License |
|
14 | # You should have received a copy of the GNU Affero General Public License | |
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | # |
|
16 | # | |
17 | # This program is dual-licensed. If you wish to learn more about the |
|
17 | # This program is dual-licensed. If you wish to learn more about the | |
18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
18 | # RhodeCode Enterprise Edition, including its added features, Support services, | |
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ | |
20 |
|
20 | |||
21 |
|
21 | |||
22 | def includeme(config): |
|
22 | def includeme(config): | |
23 |
|
23 | |||
24 | # Settings |
|
24 | # Settings | |
25 | config.add_route( |
|
25 | config.add_route( | |
26 | name='edit_repo', |
|
26 | name='edit_repo', | |
27 | pattern='/{repo_name:.*?[^/]}/settings', repo_route=True) |
|
27 | pattern='/{repo_name:.*?[^/]}/settings', repo_route=True) | |
28 |
|
28 | |||
29 | # Caches |
|
29 | # Caches | |
30 | config.add_route( |
|
30 | config.add_route( | |
31 | name='edit_repo_caches', |
|
31 | name='edit_repo_caches', | |
32 | pattern='/{repo_name:.*?[^/]}/settings/caches', repo_route=True) |
|
32 | pattern='/{repo_name:.*?[^/]}/settings/caches', repo_route=True) | |
33 |
|
33 | |||
|
34 | # Repo Review Rules | |||
|
35 | config.add_route( | |||
|
36 | name='repo_reviewers', | |||
|
37 | pattern='/{repo_name:.*?[^/]}/settings/review/rules', repo_route=True) | |||
|
38 | ||||
34 | # Maintenance |
|
39 | # Maintenance | |
35 | config.add_route( |
|
40 | config.add_route( | |
36 | name='repo_maintenance', |
|
41 | name='repo_maintenance', | |
37 | pattern='/{repo_name:.*?[^/]}/maintenance', repo_route=True) |
|
42 | pattern='/{repo_name:.*?[^/]}/maintenance', repo_route=True) | |
38 |
|
43 | |||
39 | config.add_route( |
|
44 | config.add_route( | |
40 | name='repo_maintenance_execute', |
|
45 | name='repo_maintenance_execute', | |
41 | pattern='/{repo_name:.*?[^/]}/maintenance/execute', repo_route=True) |
|
46 | pattern='/{repo_name:.*?[^/]}/maintenance/execute', repo_route=True) | |
42 |
|
47 | |||
43 | # Strip |
|
48 | # Strip | |
44 | config.add_route( |
|
49 | config.add_route( | |
45 | name='strip', |
|
50 | name='strip', | |
46 | pattern='/{repo_name:.*?[^/]}/strip', repo_route=True) |
|
51 | pattern='/{repo_name:.*?[^/]}/strip', repo_route=True) | |
47 |
|
52 | |||
48 | config.add_route( |
|
53 | config.add_route( | |
49 | name='strip_check', |
|
54 | name='strip_check', | |
50 | pattern='/{repo_name:.*?[^/]}/strip_check', repo_route=True) |
|
55 | pattern='/{repo_name:.*?[^/]}/strip_check', repo_route=True) | |
51 |
|
56 | |||
52 | config.add_route( |
|
57 | config.add_route( | |
53 | name='strip_execute', |
|
58 | name='strip_execute', | |
54 | pattern='/{repo_name:.*?[^/]}/strip_execute', repo_route=True) |
|
59 | pattern='/{repo_name:.*?[^/]}/strip_execute', repo_route=True) | |
55 | # Scan module for configuration decorators. |
|
60 | # Scan module for configuration decorators. | |
56 | config.scan() |
|
61 | config.scan() |
@@ -1,117 +1,118 b'' | |||||
1 |
|
1 | |||
2 | /****************************************************************************** |
|
2 | /****************************************************************************** | |
3 | * * |
|
3 | * * | |
4 | * DO NOT CHANGE THIS FILE MANUALLY * |
|
4 | * DO NOT CHANGE THIS FILE MANUALLY * | |
5 | * * |
|
5 | * * | |
6 | * * |
|
6 | * * | |
7 | * This file is automatically generated when the app starts up with * |
|
7 | * This file is automatically generated when the app starts up with * | |
8 | * generate_js_files = true * |
|
8 | * generate_js_files = true * | |
9 | * * |
|
9 | * * | |
10 | * To add a route here pass jsroute=True to the route definition in the app * |
|
10 | * To add a route here pass jsroute=True to the route definition in the app * | |
11 | * * |
|
11 | * * | |
12 | ******************************************************************************/ |
|
12 | ******************************************************************************/ | |
13 | function registerRCRoutes() { |
|
13 | function registerRCRoutes() { | |
14 | // routes registration |
|
14 | // routes registration | |
15 | pyroutes.register('home', '/', []); |
|
15 | pyroutes.register('home', '/', []); | |
16 | pyroutes.register('new_repo', '/_admin/create_repository', []); |
|
16 | pyroutes.register('new_repo', '/_admin/create_repository', []); | |
17 | pyroutes.register('edit_user', '/_admin/users/%(user_id)s/edit', ['user_id']); |
|
17 | pyroutes.register('edit_user', '/_admin/users/%(user_id)s/edit', ['user_id']); | |
18 | pyroutes.register('edit_user_group_members', '/_admin/user_groups/%(user_group_id)s/edit/members', ['user_group_id']); |
|
18 | pyroutes.register('edit_user_group_members', '/_admin/user_groups/%(user_group_id)s/edit/members', ['user_group_id']); | |
19 | pyroutes.register('gists', '/_admin/gists', []); |
|
19 | pyroutes.register('gists', '/_admin/gists', []); | |
20 | pyroutes.register('new_gist', '/_admin/gists/new', []); |
|
20 | pyroutes.register('new_gist', '/_admin/gists/new', []); | |
21 | pyroutes.register('toggle_following', '/_admin/toggle_following', []); |
|
21 | pyroutes.register('toggle_following', '/_admin/toggle_following', []); | |
22 | pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']); |
|
22 | pyroutes.register('repo_stats', '/%(repo_name)s/repo_stats/%(commit_id)s', ['repo_name', 'commit_id']); | |
23 | pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']); |
|
23 | pyroutes.register('repo_refs_data', '/%(repo_name)s/refs-data', ['repo_name']); | |
24 | pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']); |
|
24 | pyroutes.register('repo_refs_changelog_data', '/%(repo_name)s/refs-data-changelog', ['repo_name']); | |
25 | pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/default-reviewers', ['repo_name']); |
|
25 | pyroutes.register('repo_default_reviewers_data', '/%(repo_name)s/default-reviewers', ['repo_name']); | |
26 | pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']); |
|
26 | pyroutes.register('changeset_home', '/%(repo_name)s/changeset/%(revision)s', ['repo_name', 'revision']); | |
27 | pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']); |
|
27 | pyroutes.register('edit_repo_perms', '/%(repo_name)s/settings/permissions', ['repo_name']); | |
28 | pyroutes.register('changeset_comment', '/%(repo_name)s/changeset/%(revision)s/comment', ['repo_name', 'revision']); |
|
28 | pyroutes.register('changeset_comment', '/%(repo_name)s/changeset/%(revision)s/comment', ['repo_name', 'revision']); | |
29 | pyroutes.register('changeset_comment_preview', '/%(repo_name)s/changeset/comment/preview', ['repo_name']); |
|
29 | pyroutes.register('changeset_comment_preview', '/%(repo_name)s/changeset/comment/preview', ['repo_name']); | |
30 | pyroutes.register('changeset_comment_delete', '/%(repo_name)s/changeset/comment/%(comment_id)s/delete', ['repo_name', 'comment_id']); |
|
30 | pyroutes.register('changeset_comment_delete', '/%(repo_name)s/changeset/comment/%(comment_id)s/delete', ['repo_name', 'comment_id']); | |
31 | pyroutes.register('changeset_info', '/%(repo_name)s/changeset_info/%(revision)s', ['repo_name', 'revision']); |
|
31 | pyroutes.register('changeset_info', '/%(repo_name)s/changeset_info/%(revision)s', ['repo_name', 'revision']); | |
32 | pyroutes.register('compare_url', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']); |
|
32 | pyroutes.register('compare_url', '/%(repo_name)s/compare/%(source_ref_type)s@%(source_ref)s...%(target_ref_type)s@%(target_ref)s', ['repo_name', 'source_ref_type', 'source_ref', 'target_ref_type', 'target_ref']); | |
33 | pyroutes.register('pullrequest_home', '/%(repo_name)s/pull-request/new', ['repo_name']); |
|
33 | pyroutes.register('pullrequest_home', '/%(repo_name)s/pull-request/new', ['repo_name']); | |
34 | pyroutes.register('pullrequest', '/%(repo_name)s/pull-request/new', ['repo_name']); |
|
34 | pyroutes.register('pullrequest', '/%(repo_name)s/pull-request/new', ['repo_name']); | |
35 | pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']); |
|
35 | pyroutes.register('pullrequest_repo_refs', '/%(repo_name)s/pull-request/refs/%(target_repo_name)s', ['repo_name', 'target_repo_name']); | |
36 | pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']); |
|
36 | pyroutes.register('pullrequest_repo_destinations', '/%(repo_name)s/pull-request/repo-destinations', ['repo_name']); | |
37 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
37 | pyroutes.register('pullrequest_show', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); | |
38 | pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
38 | pyroutes.register('pullrequest_update', '/%(repo_name)s/pull-request/%(pull_request_id)s', ['repo_name', 'pull_request_id']); | |
39 | pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']); |
|
39 | pyroutes.register('pullrequest_show_all', '/%(repo_name)s/pull-request', ['repo_name']); | |
40 | pyroutes.register('pullrequest_comment', '/%(repo_name)s/pull-request-comment/%(pull_request_id)s', ['repo_name', 'pull_request_id']); |
|
40 | pyroutes.register('pullrequest_comment', '/%(repo_name)s/pull-request-comment/%(pull_request_id)s', ['repo_name', 'pull_request_id']); | |
41 | pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request-comment/%(comment_id)s/delete', ['repo_name', 'comment_id']); |
|
41 | pyroutes.register('pullrequest_comment_delete', '/%(repo_name)s/pull-request-comment/%(comment_id)s/delete', ['repo_name', 'comment_id']); | |
42 | pyroutes.register('changelog_home', '/%(repo_name)s/changelog', ['repo_name']); |
|
42 | pyroutes.register('changelog_home', '/%(repo_name)s/changelog', ['repo_name']); | |
43 | pyroutes.register('changelog_file_home', '/%(repo_name)s/changelog/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
43 | pyroutes.register('changelog_file_home', '/%(repo_name)s/changelog/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
44 | pyroutes.register('changelog_elements', '/%(repo_name)s/changelog_details', ['repo_name']); |
|
44 | pyroutes.register('changelog_elements', '/%(repo_name)s/changelog_details', ['repo_name']); | |
45 | pyroutes.register('files_home', '/%(repo_name)s/files/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
45 | pyroutes.register('files_home', '/%(repo_name)s/files/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
46 | pyroutes.register('files_history_home', '/%(repo_name)s/history/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
46 | pyroutes.register('files_history_home', '/%(repo_name)s/history/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
47 | pyroutes.register('files_authors_home', '/%(repo_name)s/authors/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
47 | pyroutes.register('files_authors_home', '/%(repo_name)s/authors/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
48 | pyroutes.register('files_annotate_home', '/%(repo_name)s/annotate/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
48 | pyroutes.register('files_annotate_home', '/%(repo_name)s/annotate/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
49 | pyroutes.register('files_annotate_previous', '/%(repo_name)s/annotate-previous/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
49 | pyroutes.register('files_annotate_previous', '/%(repo_name)s/annotate-previous/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
50 | pyroutes.register('files_archive_home', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']); |
|
50 | pyroutes.register('files_archive_home', '/%(repo_name)s/archive/%(fname)s', ['repo_name', 'fname']); | |
51 | pyroutes.register('files_nodelist_home', '/%(repo_name)s/nodelist/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); |
|
51 | pyroutes.register('files_nodelist_home', '/%(repo_name)s/nodelist/%(revision)s/%(f_path)s', ['repo_name', 'revision', 'f_path']); | |
52 | pyroutes.register('files_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); |
|
52 | pyroutes.register('files_nodetree_full', '/%(repo_name)s/nodetree_full/%(commit_id)s/%(f_path)s', ['repo_name', 'commit_id', 'f_path']); | |
53 | pyroutes.register('summary_home_slash', '/%(repo_name)s/', ['repo_name']); |
|
53 | pyroutes.register('summary_home_slash', '/%(repo_name)s/', ['repo_name']); | |
54 | pyroutes.register('summary_home', '/%(repo_name)s', ['repo_name']); |
|
54 | pyroutes.register('summary_home', '/%(repo_name)s', ['repo_name']); | |
55 | pyroutes.register('favicon', '/favicon.ico', []); |
|
55 | pyroutes.register('favicon', '/favicon.ico', []); | |
56 | pyroutes.register('robots', '/robots.txt', []); |
|
56 | pyroutes.register('robots', '/robots.txt', []); | |
57 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); |
|
57 | pyroutes.register('auth_home', '/_admin/auth*traverse', []); | |
58 | pyroutes.register('global_integrations_new', '/_admin/integrations/new', []); |
|
58 | pyroutes.register('global_integrations_new', '/_admin/integrations/new', []); | |
59 | pyroutes.register('global_integrations_home', '/_admin/integrations', []); |
|
59 | pyroutes.register('global_integrations_home', '/_admin/integrations', []); | |
60 | pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']); |
|
60 | pyroutes.register('global_integrations_list', '/_admin/integrations/%(integration)s', ['integration']); | |
61 | pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']); |
|
61 | pyroutes.register('global_integrations_create', '/_admin/integrations/%(integration)s/new', ['integration']); | |
62 | pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']); |
|
62 | pyroutes.register('global_integrations_edit', '/_admin/integrations/%(integration)s/%(integration_id)s', ['integration', 'integration_id']); | |
63 | pyroutes.register('repo_group_integrations_home', '%(repo_group_name)s/settings/integrations', ['repo_group_name']); |
|
63 | pyroutes.register('repo_group_integrations_home', '%(repo_group_name)s/settings/integrations', ['repo_group_name']); | |
64 | pyroutes.register('repo_group_integrations_list', '%(repo_group_name)s/settings/integrations/%(integration)s', ['repo_group_name', 'integration']); |
|
64 | pyroutes.register('repo_group_integrations_list', '%(repo_group_name)s/settings/integrations/%(integration)s', ['repo_group_name', 'integration']); | |
65 | pyroutes.register('repo_group_integrations_new', '%(repo_group_name)s/settings/integrations/new', ['repo_group_name']); |
|
65 | pyroutes.register('repo_group_integrations_new', '%(repo_group_name)s/settings/integrations/new', ['repo_group_name']); | |
66 | pyroutes.register('repo_group_integrations_create', '%(repo_group_name)s/settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']); |
|
66 | pyroutes.register('repo_group_integrations_create', '%(repo_group_name)s/settings/integrations/%(integration)s/new', ['repo_group_name', 'integration']); | |
67 | pyroutes.register('repo_group_integrations_edit', '%(repo_group_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']); |
|
67 | pyroutes.register('repo_group_integrations_edit', '%(repo_group_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_group_name', 'integration', 'integration_id']); | |
68 | pyroutes.register('repo_integrations_home', '%(repo_name)s/settings/integrations', ['repo_name']); |
|
68 | pyroutes.register('repo_integrations_home', '%(repo_name)s/settings/integrations', ['repo_name']); | |
69 | pyroutes.register('repo_integrations_list', '%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']); |
|
69 | pyroutes.register('repo_integrations_list', '%(repo_name)s/settings/integrations/%(integration)s', ['repo_name', 'integration']); | |
70 | pyroutes.register('repo_integrations_new', '%(repo_name)s/settings/integrations/new', ['repo_name']); |
|
70 | pyroutes.register('repo_integrations_new', '%(repo_name)s/settings/integrations/new', ['repo_name']); | |
71 | pyroutes.register('repo_integrations_create', '%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']); |
|
71 | pyroutes.register('repo_integrations_create', '%(repo_name)s/settings/integrations/%(integration)s/new', ['repo_name', 'integration']); | |
72 | pyroutes.register('repo_integrations_edit', '%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']); |
|
72 | pyroutes.register('repo_integrations_edit', '%(repo_name)s/settings/integrations/%(integration)s/%(integration_id)s', ['repo_name', 'integration', 'integration_id']); | |
73 | pyroutes.register('ops_ping', '_admin/ops/ping', []); |
|
73 | pyroutes.register('ops_ping', '_admin/ops/ping', []); | |
74 | pyroutes.register('admin_settings_open_source', '_admin/settings/open_source', []); |
|
74 | pyroutes.register('admin_settings_open_source', '_admin/settings/open_source', []); | |
75 | pyroutes.register('admin_settings_vcs_svn_generate_cfg', '_admin/settings/vcs/svn_generate_cfg', []); |
|
75 | pyroutes.register('admin_settings_vcs_svn_generate_cfg', '_admin/settings/vcs/svn_generate_cfg', []); | |
76 | pyroutes.register('admin_settings_system', '_admin/settings/system', []); |
|
76 | pyroutes.register('admin_settings_system', '_admin/settings/system', []); | |
77 | pyroutes.register('admin_settings_system_update', '_admin/settings/system/updates', []); |
|
77 | pyroutes.register('admin_settings_system_update', '_admin/settings/system/updates', []); | |
78 | pyroutes.register('admin_settings_sessions', '_admin/settings/sessions', []); |
|
78 | pyroutes.register('admin_settings_sessions', '_admin/settings/sessions', []); | |
79 | pyroutes.register('admin_settings_sessions_cleanup', '_admin/settings/sessions/cleanup', []); |
|
79 | pyroutes.register('admin_settings_sessions_cleanup', '_admin/settings/sessions/cleanup', []); | |
80 | pyroutes.register('users', '_admin/users', []); |
|
80 | pyroutes.register('users', '_admin/users', []); | |
81 | pyroutes.register('users_data', '_admin/users_data', []); |
|
81 | pyroutes.register('users_data', '_admin/users_data', []); | |
82 | pyroutes.register('edit_user_auth_tokens', '_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']); |
|
82 | pyroutes.register('edit_user_auth_tokens', '_admin/users/%(user_id)s/edit/auth_tokens', ['user_id']); | |
83 | pyroutes.register('edit_user_auth_tokens_add', '_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']); |
|
83 | pyroutes.register('edit_user_auth_tokens_add', '_admin/users/%(user_id)s/edit/auth_tokens/new', ['user_id']); | |
84 | pyroutes.register('edit_user_auth_tokens_delete', '_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']); |
|
84 | pyroutes.register('edit_user_auth_tokens_delete', '_admin/users/%(user_id)s/edit/auth_tokens/delete', ['user_id']); | |
85 | pyroutes.register('edit_user_groups_management', '_admin/users/%(user_id)s/edit/groups_management', ['user_id']); |
|
85 | pyroutes.register('edit_user_groups_management', '_admin/users/%(user_id)s/edit/groups_management', ['user_id']); | |
86 | pyroutes.register('edit_user_groups_management_updates', '_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']); |
|
86 | pyroutes.register('edit_user_groups_management_updates', '_admin/users/%(user_id)s/edit/edit_user_groups_management/updates', ['user_id']); | |
87 | pyroutes.register('edit_user_audit_logs', '_admin/users/%(user_id)s/edit/audit', ['user_id']); |
|
87 | pyroutes.register('edit_user_audit_logs', '_admin/users/%(user_id)s/edit/audit', ['user_id']); | |
88 | pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); |
|
88 | pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); | |
89 | pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []); |
|
89 | pyroutes.register('channelstream_subscribe', '/_admin/channelstream/subscribe', []); | |
90 | pyroutes.register('channelstream_proxy', '/_channelstream', []); |
|
90 | pyroutes.register('channelstream_proxy', '/_channelstream', []); | |
91 | pyroutes.register('login', '/_admin/login', []); |
|
91 | pyroutes.register('login', '/_admin/login', []); | |
92 | pyroutes.register('logout', '/_admin/logout', []); |
|
92 | pyroutes.register('logout', '/_admin/logout', []); | |
93 | pyroutes.register('register', '/_admin/register', []); |
|
93 | pyroutes.register('register', '/_admin/register', []); | |
94 | pyroutes.register('reset_password', '/_admin/password_reset', []); |
|
94 | pyroutes.register('reset_password', '/_admin/password_reset', []); | |
95 | pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []); |
|
95 | pyroutes.register('reset_password_confirmation', '/_admin/password_reset_confirmation', []); | |
96 | pyroutes.register('user_autocomplete_data', '/_users', []); |
|
96 | pyroutes.register('user_autocomplete_data', '/_users', []); | |
97 | pyroutes.register('user_group_autocomplete_data', '/_user_groups', []); |
|
97 | pyroutes.register('user_group_autocomplete_data', '/_user_groups', []); | |
98 | pyroutes.register('repo_list_data', '/_repos', []); |
|
98 | pyroutes.register('repo_list_data', '/_repos', []); | |
99 | pyroutes.register('goto_switcher_data', '/_goto_data', []); |
|
99 | pyroutes.register('goto_switcher_data', '/_goto_data', []); | |
100 | pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']); |
|
100 | pyroutes.register('edit_repo', '/%(repo_name)s/settings', ['repo_name']); | |
101 | pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']); |
|
101 | pyroutes.register('edit_repo_caches', '/%(repo_name)s/settings/caches', ['repo_name']); | |
|
102 | pyroutes.register('repo_reviewers', '/%(repo_name)s/settings/review/rules', ['repo_name']); | |||
102 | pyroutes.register('repo_maintenance', '/%(repo_name)s/maintenance', ['repo_name']); |
|
103 | pyroutes.register('repo_maintenance', '/%(repo_name)s/maintenance', ['repo_name']); | |
103 | pyroutes.register('repo_maintenance_execute', '/%(repo_name)s/maintenance/execute', ['repo_name']); |
|
104 | pyroutes.register('repo_maintenance_execute', '/%(repo_name)s/maintenance/execute', ['repo_name']); | |
104 | pyroutes.register('strip', '/%(repo_name)s/strip', ['repo_name']); |
|
105 | pyroutes.register('strip', '/%(repo_name)s/strip', ['repo_name']); | |
105 | pyroutes.register('strip_check', '/%(repo_name)s/strip_check', ['repo_name']); |
|
106 | pyroutes.register('strip_check', '/%(repo_name)s/strip_check', ['repo_name']); | |
106 | pyroutes.register('strip_execute', '/%(repo_name)s/strip_execute', ['repo_name']); |
|
107 | pyroutes.register('strip_execute', '/%(repo_name)s/strip_execute', ['repo_name']); | |
107 | pyroutes.register('search', '/_admin/search', []); |
|
108 | pyroutes.register('search', '/_admin/search', []); | |
108 | pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']); |
|
109 | pyroutes.register('search_repo', '/%(repo_name)s/search', ['repo_name']); | |
109 | pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']); |
|
110 | pyroutes.register('user_profile', '/_profiles/%(username)s', ['username']); | |
110 | pyroutes.register('my_account_profile', '/_admin/my_account/profile', []); |
|
111 | pyroutes.register('my_account_profile', '/_admin/my_account/profile', []); | |
111 | pyroutes.register('my_account_password', '/_admin/my_account/password', []); |
|
112 | pyroutes.register('my_account_password', '/_admin/my_account/password', []); | |
112 | pyroutes.register('my_account_password_update', '/_admin/my_account/password', []); |
|
113 | pyroutes.register('my_account_password_update', '/_admin/my_account/password', []); | |
113 | pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []); |
|
114 | pyroutes.register('my_account_auth_tokens', '/_admin/my_account/auth_tokens', []); | |
114 | pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); |
|
115 | pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); | |
115 | pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []); |
|
116 | pyroutes.register('my_account_auth_tokens_delete', '/_admin/my_account/auth_tokens/delete', []); | |
116 | pyroutes.register('apiv2', '/_admin/api', []); |
|
117 | pyroutes.register('apiv2', '/_admin/api', []); | |
117 | } |
|
118 | } |
@@ -1,106 +1,95 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | ## |
|
2 | ## | |
3 | ## See also repo_settings.html |
|
3 | ## See also repo_settings.html | |
4 | ## |
|
4 | ## | |
5 | <%inherit file="/base/base.mako"/> |
|
5 | <%inherit file="/base/base.mako"/> | |
6 |
|
6 | |||
7 | <%def name="title()"> |
|
7 | <%def name="title()"> | |
8 | ${_('%s repository settings') % c.repo_info.repo_name} |
|
8 | ${_('%s repository settings') % c.repo_info.repo_name} | |
9 | %if c.rhodecode_name: |
|
9 | %if c.rhodecode_name: | |
10 | · ${h.branding(c.rhodecode_name)} |
|
10 | · ${h.branding(c.rhodecode_name)} | |
11 | %endif |
|
11 | %endif | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${_('Settings')} |
|
15 | ${_('Settings')} | |
16 | </%def> |
|
16 | </%def> | |
17 |
|
17 | |||
18 | <%def name="menu_bar_nav()"> |
|
18 | <%def name="menu_bar_nav()"> | |
19 | ${self.menu_items(active='repositories')} |
|
19 | ${self.menu_items(active='repositories')} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="menu_bar_subnav()"> |
|
22 | <%def name="menu_bar_subnav()"> | |
23 | ${self.repo_menu(active='options')} |
|
23 | ${self.repo_menu(active='options')} | |
24 | </%def> |
|
24 | </%def> | |
25 |
|
25 | |||
26 | <%def name="main_content()"> |
|
26 | <%def name="main_content()"> | |
27 | <%include file="/admin/repos/repo_edit_${c.active}.mako"/> |
|
27 | <%include file="/admin/repos/repo_edit_${c.active}.mako"/> | |
28 | </%def> |
|
28 | </%def> | |
29 |
|
29 | |||
30 |
|
30 | |||
31 | <%def name="main()"> |
|
31 | <%def name="main()"> | |
32 | <div class="box"> |
|
32 | <div class="box"> | |
33 | <div class="title"> |
|
33 | <div class="title"> | |
34 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
34 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
35 | ${self.breadcrumbs()} |
|
35 | ${self.breadcrumbs()} | |
36 | </div> |
|
36 | </div> | |
37 |
|
37 | |||
38 | <div class="sidebar-col-wrapper scw-small"> |
|
38 | <div class="sidebar-col-wrapper scw-small"> | |
39 | ##main |
|
|||
40 | <div class="sidebar"> |
|
39 | <div class="sidebar"> | |
41 | <ul class="nav nav-pills nav-stacked"> |
|
40 | <ul class="nav nav-pills nav-stacked"> | |
42 | <li class="${'active' if c.active=='settings' else ''}"> |
|
41 | <li class="${'active' if c.active=='settings' else ''}"> | |
43 | <a href="${h.route_path('edit_repo', repo_name=c.repo_name)}">${_('Settings')}</a> |
|
42 | <a href="${h.route_path('edit_repo', repo_name=c.repo_name)}">${_('Settings')}</a> | |
44 | </li> |
|
43 | </li> | |
45 | <li class="${'active' if c.active=='permissions' else ''}"> |
|
44 | <li class="${'active' if c.active=='permissions' else ''}"> | |
46 | <a href="${h.url('edit_repo_perms', repo_name=c.repo_name)}">${_('Permissions')}</a> |
|
45 | <a href="${h.url('edit_repo_perms', repo_name=c.repo_name)}">${_('Permissions')}</a> | |
47 | </li> |
|
46 | </li> | |
48 | <li class="${'active' if c.active=='advanced' else ''}"> |
|
47 | <li class="${'active' if c.active=='advanced' else ''}"> | |
49 | <a href="${h.url('edit_repo_advanced', repo_name=c.repo_name)}">${_('Advanced')}</a> |
|
48 | <a href="${h.url('edit_repo_advanced', repo_name=c.repo_name)}">${_('Advanced')}</a> | |
50 | </li> |
|
49 | </li> | |
51 | <li class="${'active' if c.active=='vcs' else ''}"> |
|
50 | <li class="${'active' if c.active=='vcs' else ''}"> | |
52 | <a href="${h.url('repo_vcs_settings', repo_name=c.repo_name)}">${_('VCS')}</a> |
|
51 | <a href="${h.url('repo_vcs_settings', repo_name=c.repo_name)}">${_('VCS')}</a> | |
53 | </li> |
|
52 | </li> | |
54 | <li class="${'active' if c.active=='fields' else ''}"> |
|
53 | <li class="${'active' if c.active=='fields' else ''}"> | |
55 | <a href="${h.url('edit_repo_fields', repo_name=c.repo_name)}">${_('Extra Fields')}</a> |
|
54 | <a href="${h.url('edit_repo_fields', repo_name=c.repo_name)}">${_('Extra Fields')}</a> | |
56 | </li> |
|
55 | </li> | |
57 | <li class="${'active' if c.active=='issuetracker' else ''}"> |
|
56 | <li class="${'active' if c.active=='issuetracker' else ''}"> | |
58 | <a href="${h.url('repo_settings_issuetracker', repo_name=c.repo_name)}">${_('Issue Tracker')}</a> |
|
57 | <a href="${h.url('repo_settings_issuetracker', repo_name=c.repo_name)}">${_('Issue Tracker')}</a> | |
59 | </li> |
|
58 | </li> | |
60 | <li class="${'active' if c.active=='caches' else ''}"> |
|
59 | <li class="${'active' if c.active=='caches' else ''}"> | |
61 | <a href="${h.route_path('edit_repo_caches', repo_name=c.repo_name)}">${_('Caches')}</a> |
|
60 | <a href="${h.route_path('edit_repo_caches', repo_name=c.repo_name)}">${_('Caches')}</a> | |
62 | </li> |
|
61 | </li> | |
63 | %if c.repo_info.repo_type != 'svn': |
|
62 | %if c.repo_info.repo_type != 'svn': | |
64 | <li class="${'active' if c.active=='remote' else ''}"> |
|
63 | <li class="${'active' if c.active=='remote' else ''}"> | |
65 | <a href="${h.url('edit_repo_remote', repo_name=c.repo_name)}">${_('Remote')}</a> |
|
64 | <a href="${h.url('edit_repo_remote', repo_name=c.repo_name)}">${_('Remote')}</a> | |
66 | </li> |
|
65 | </li> | |
67 | %endif |
|
66 | %endif | |
68 | <li class="${'active' if c.active=='statistics' else ''}"> |
|
67 | <li class="${'active' if c.active=='statistics' else ''}"> | |
69 | <a href="${h.url('edit_repo_statistics', repo_name=c.repo_name)}">${_('Statistics')}</a> |
|
68 | <a href="${h.url('edit_repo_statistics', repo_name=c.repo_name)}">${_('Statistics')}</a> | |
70 | </li> |
|
69 | </li> | |
71 | <li class="${'active' if c.active=='integrations' else ''}"> |
|
70 | <li class="${'active' if c.active=='integrations' else ''}"> | |
72 | <a href="${h.route_path('repo_integrations_home', repo_name=c.repo_name)}">${_('Integrations')}</a> |
|
71 | <a href="${h.route_path('repo_integrations_home', repo_name=c.repo_name)}">${_('Integrations')}</a> | |
73 | </li> |
|
72 | </li> | |
|
73 | %if c.repo_info.repo_type != 'svn': | |||
|
74 | <li class="${'active' if c.active=='reviewers' else ''}"> | |||
|
75 | <a href="${h.route_path('repo_reviewers', repo_name=c.repo_name)}">${_('Reviewer Rules')}</a> | |||
|
76 | </li> | |||
|
77 | %endif | |||
74 | <li class="${'active' if c.active=='maintenance' else ''}"> |
|
78 | <li class="${'active' if c.active=='maintenance' else ''}"> | |
75 | <a href="${h.route_path('repo_maintenance', repo_name=c.repo_name)}">${_('Maintenance')}</a> |
|
79 | <a href="${h.route_path('repo_maintenance', repo_name=c.repo_name)}">${_('Maintenance')}</a> | |
76 | </li> |
|
80 | </li> | |
77 | <li class="${'active' if c.active=='strip' else ''}"> |
|
81 | <li class="${'active' if c.active=='strip' else ''}"> | |
78 | <a href="${h.route_path('strip', repo_name=c.repo_name)}">${_('Strip')}</a> |
|
82 | <a href="${h.route_path('strip', repo_name=c.repo_name)}">${_('Strip')}</a> | |
79 | </li> |
|
83 | </li> | |
80 | ## TODO: dan: replace repo navigation with navlist registry like with |
|
84 | ||
81 | ## admin menu. First must find way to allow runtime configuration |
|
|||
82 | ## it to account for the c.repo_info.repo_type != 'svn' call above |
|
|||
83 | <% |
|
|||
84 | reviewer_settings = False |
|
|||
85 | try: |
|
|||
86 | import rc_reviewers |
|
|||
87 | reviewer_settings = True |
|
|||
88 | except ImportError: |
|
|||
89 | pass |
|
|||
90 | %> |
|
|||
91 | %if reviewer_settings: |
|
|||
92 | <li class="${'active' if c.active=='reviewers' else ''}"> |
|
|||
93 | <a href="${h.route_path('repo_reviewers_home', repo_name=c.repo_name)}">${_('Reviewers')}</a> |
|
|||
94 | </li> |
|
|||
95 | %endif |
|
|||
96 | </ul> |
|
85 | </ul> | |
97 | </div> |
|
86 | </div> | |
98 |
|
87 | |||
99 | <div class="main-content-full-width"> |
|
88 | <div class="main-content-full-width"> | |
100 | ${self.main_content()} |
|
89 | ${self.main_content()} | |
101 | </div> |
|
90 | </div> | |
102 |
|
91 | |||
103 | </div> |
|
92 | </div> | |
104 | </div> |
|
93 | </div> | |
105 |
|
94 | |||
106 | </%def> No newline at end of file |
|
95 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now