Show More
@@ -309,9 +309,6 b' class BaseReferencesView(RepoAppView):' | |||
|
309 | 309 | def load_default_context(self): |
|
310 | 310 | c = self._get_local_tmpl_context() |
|
311 | 311 | |
|
312 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
313 | c.repo_info = self.db_repo | |
|
314 | ||
|
315 | 312 | self._register_global_c(c) |
|
316 | 313 | return c |
|
317 | 314 |
@@ -37,9 +37,6 b' class RepoCachesView(RepoAppView):' | |||
|
37 | 37 | def load_default_context(self): |
|
38 | 38 | c = self._get_local_tmpl_context() |
|
39 | 39 | |
|
40 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
41 | c.repo_info = self.db_repo | |
|
42 | ||
|
43 | 40 | self._register_global_c(c) |
|
44 | 41 | return c |
|
45 | 42 |
@@ -150,10 +150,7 b' class RepoChangelogView(RepoAppView):' | |||
|
150 | 150 | def load_default_context(self): |
|
151 | 151 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
152 | 152 | |
|
153 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
154 | c.repo_info = self.db_repo | |
|
155 | 153 | c.rhodecode_repo = self.rhodecode_vcs_repo |
|
156 | ||
|
157 | 154 | self._register_global_c(c) |
|
158 | 155 | return c |
|
159 | 156 |
@@ -148,9 +148,6 b' def _context_url(request, fileid=None):' | |||
|
148 | 148 | class RepoCommitsView(RepoAppView): |
|
149 | 149 | def load_default_context(self): |
|
150 | 150 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
151 | ||
|
152 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
153 | c.repo_info = self.db_repo | |
|
154 | 151 | c.rhodecode_repo = self.rhodecode_vcs_repo |
|
155 | 152 | |
|
156 | 153 | self._register_global_c(c) |
@@ -45,8 +45,6 b' class RepoCompareView(RepoAppView):' | |||
|
45 | 45 | def load_default_context(self): |
|
46 | 46 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
47 | 47 | |
|
48 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
49 | c.repo_info = self.db_repo | |
|
50 | 48 | c.rhodecode_repo = self.rhodecode_vcs_repo |
|
51 | 49 | |
|
52 | 50 | self._register_global_c(c) |
@@ -42,9 +42,6 b' class RepoFeedView(RepoAppView):' | |||
|
42 | 42 | def load_default_context(self): |
|
43 | 43 | c = self._get_local_tmpl_context() |
|
44 | 44 | |
|
45 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
46 | c.repo_info = self.db_repo | |
|
47 | ||
|
48 | 45 | self._register_global_c(c) |
|
49 | 46 | self._load_defaults() |
|
50 | 47 | return c |
@@ -81,8 +81,6 b' class RepoFilesView(RepoAppView):' | |||
|
81 | 81 | def load_default_context(self): |
|
82 | 82 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
83 | 83 | |
|
84 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
85 | c.repo_info = self.db_repo | |
|
86 | 84 | c.rhodecode_repo = self.rhodecode_vcs_repo |
|
87 | 85 | |
|
88 | 86 | self._register_global_c(c) |
@@ -46,9 +46,6 b' class RepoForksView(RepoAppView, DataGri' | |||
|
46 | 46 | |
|
47 | 47 | def load_default_context(self): |
|
48 | 48 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
49 | ||
|
50 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
51 | c.repo_info = self.db_repo | |
|
52 | 49 | c.rhodecode_repo = self.rhodecode_vcs_repo |
|
53 | 50 | |
|
54 | 51 | acl_groups = RepoGroupList( |
@@ -227,7 +224,7 b' class RepoForksView(RepoAppView, DataGri' | |||
|
227 | 224 | if isinstance(task, BaseAsyncResult): |
|
228 | 225 | task_id = task.task_id |
|
229 | 226 | except formencode.Invalid as errors: |
|
230 |
c.r |
|
|
227 | c.rhodecode_db_repo = self.db_repo | |
|
231 | 228 | |
|
232 | 229 | data = render('rhodecode:templates/forks/fork.mako', |
|
233 | 230 | self._get_template_context(c), self.request) |
@@ -33,9 +33,6 b' class RepoMaintenanceView(RepoAppView):' | |||
|
33 | 33 | def load_default_context(self): |
|
34 | 34 | c = self._get_local_tmpl_context() |
|
35 | 35 | |
|
36 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
37 | c.repo_info = self.db_repo | |
|
38 | ||
|
39 | 36 | self._register_global_c(c) |
|
40 | 37 | return c |
|
41 | 38 |
@@ -40,9 +40,6 b' class RepoSettingsPermissionsView(RepoAp' | |||
|
40 | 40 | def load_default_context(self): |
|
41 | 41 | c = self._get_local_tmpl_context() |
|
42 | 42 | |
|
43 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
44 | c.repo_info = self.db_repo | |
|
45 | ||
|
46 | 43 | self._register_global_c(c) |
|
47 | 44 | return c |
|
48 | 45 |
@@ -57,8 +57,6 b' class RepoPullRequestsView(RepoAppView, ' | |||
|
57 | 57 | |
|
58 | 58 | def load_default_context(self): |
|
59 | 59 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
60 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
61 | c.repo_info = self.db_repo | |
|
62 | 60 | c.REVIEW_STATUS_APPROVED = ChangesetStatus.STATUS_APPROVED |
|
63 | 61 | c.REVIEW_STATUS_REJECTED = ChangesetStatus.STATUS_REJECTED |
|
64 | 62 | self._register_global_c(c) |
@@ -33,9 +33,6 b' class RepoReviewRulesView(RepoAppView):' | |||
|
33 | 33 | def load_default_context(self): |
|
34 | 34 | c = self._get_local_tmpl_context() |
|
35 | 35 | |
|
36 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
37 | c.repo_info = self.db_repo | |
|
38 | ||
|
39 | 36 | self._register_global_c(c) |
|
40 | 37 | return c |
|
41 | 38 |
@@ -44,9 +44,6 b' class RepoSettingsView(RepoAppView):' | |||
|
44 | 44 | def load_default_context(self): |
|
45 | 45 | c = self._get_local_tmpl_context() |
|
46 | 46 | |
|
47 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
48 | c.repo_info = self.db_repo | |
|
49 | ||
|
50 | 47 | acl_groups = RepoGroupList( |
|
51 | 48 | RepoGroup.query().all(), |
|
52 | 49 | perm_set=['group.write', 'group.admin']) |
@@ -43,9 +43,6 b' class RepoSettingsView(RepoAppView):' | |||
|
43 | 43 | def load_default_context(self): |
|
44 | 44 | c = self._get_local_tmpl_context() |
|
45 | 45 | |
|
46 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
47 | c.repo_info = self.db_repo | |
|
48 | ||
|
49 | 46 | self._register_global_c(c) |
|
50 | 47 | return c |
|
51 | 48 |
@@ -43,9 +43,6 b' class RepoSettingsFieldsView(RepoAppView' | |||
|
43 | 43 | def load_default_context(self): |
|
44 | 44 | c = self._get_local_tmpl_context() |
|
45 | 45 | |
|
46 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
47 | c.repo_info = self.db_repo | |
|
48 | ||
|
49 | 46 | self._register_global_c(c) |
|
50 | 47 | return c |
|
51 | 48 |
@@ -39,9 +39,6 b' class RepoSettingsIssueTrackersView(Repo' | |||
|
39 | 39 | def load_default_context(self): |
|
40 | 40 | c = self._get_local_tmpl_context() |
|
41 | 41 | |
|
42 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
43 | c.repo_info = self.db_repo | |
|
44 | ||
|
45 | 42 | self._register_global_c(c) |
|
46 | 43 | return c |
|
47 | 44 |
@@ -36,9 +36,6 b' class RepoSettingsRemoteView(RepoAppView' | |||
|
36 | 36 | def load_default_context(self): |
|
37 | 37 | c = self._get_local_tmpl_context() |
|
38 | 38 | |
|
39 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
40 | c.repo_info = self.db_repo | |
|
41 | ||
|
42 | 39 | self._register_global_c(c) |
|
43 | 40 | return c |
|
44 | 41 |
@@ -43,9 +43,6 b' class RepoSettingsVcsView(RepoAppView):' | |||
|
43 | 43 | def load_default_context(self): |
|
44 | 44 | c = self._get_local_tmpl_context() |
|
45 | 45 | |
|
46 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
47 | c.repo_info = self.db_repo | |
|
48 | ||
|
49 | 46 | self._register_global_c(c) |
|
50 | 47 | return c |
|
51 | 48 |
@@ -35,9 +35,6 b' class StripView(RepoAppView):' | |||
|
35 | 35 | def load_default_context(self): |
|
36 | 36 | c = self._get_local_tmpl_context() |
|
37 | 37 | |
|
38 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
39 | c.repo_info = self.db_repo | |
|
40 | ||
|
41 | 38 | self._register_global_c(c) |
|
42 | 39 | return c |
|
43 | 40 |
@@ -48,8 +48,6 b' class RepoSummaryView(RepoAppView):' | |||
|
48 | 48 | def load_default_context(self): |
|
49 | 49 | c = self._get_local_tmpl_context(include_app_defaults=True) |
|
50 | 50 | |
|
51 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
52 | c.repo_info = self.db_repo | |
|
53 | 51 | c.rhodecode_repo = None |
|
54 | 52 | if not c.repository_requirements_missing: |
|
55 | 53 | c.rhodecode_repo = self.rhodecode_vcs_repo |
@@ -393,8 +393,7 b' class RepoIntegrationsView(IntegrationSe' | |||
|
393 | 393 | c.repo = self.repo |
|
394 | 394 | c.repo_group = self.repo_group |
|
395 | 395 | |
|
396 | # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead | |
|
397 | c.repo_info = self.db_repo = self.repo | |
|
396 | self.db_repo = self.repo | |
|
398 | 397 | c.rhodecode_db_repo = self.repo |
|
399 | 398 | c.repo_name = self.db_repo.repo_name |
|
400 | 399 | c.repository_pull_requests = ScmModel().get_pull_requests(self.repo) |
@@ -5,7 +5,7 b'' | |||
|
5 | 5 | <%inherit file="/base/base.mako"/> |
|
6 | 6 | |
|
7 | 7 | <%def name="title()"> |
|
8 |
${_('%s repository settings') % c.r |
|
|
8 | ${_('%s repository settings') % c.rhodecode_db_repo.repo_name} | |
|
9 | 9 | %if c.rhodecode_name: |
|
10 | 10 | · ${h.branding(c.rhodecode_name)} |
|
11 | 11 | %endif |
@@ -63,7 +63,7 b'' | |||
|
63 | 63 | <li class="${'active' if c.active=='caches' else ''}"> |
|
64 | 64 | <a href="${h.route_path('edit_repo_caches', repo_name=c.repo_name)}">${_('Caches')}</a> |
|
65 | 65 | </li> |
|
66 |
%if c.r |
|
|
66 | %if c.rhodecode_db_repo.repo_type != 'svn': | |
|
67 | 67 | <li class="${'active' if c.active=='remote' else ''}"> |
|
68 | 68 | <a href="${h.route_path('edit_repo_remote', repo_name=c.repo_name)}">${_('Remote')}</a> |
|
69 | 69 | </li> |
@@ -74,7 +74,7 b'' | |||
|
74 | 74 | <li class="${'active' if c.active=='integrations' else ''}"> |
|
75 | 75 | <a href="${h.route_path('repo_integrations_home', repo_name=c.repo_name)}">${_('Integrations')}</a> |
|
76 | 76 | </li> |
|
77 |
%if c.r |
|
|
77 | %if c.rhodecode_db_repo.repo_type != 'svn': | |
|
78 | 78 | <li class="${'active' if c.active=='reviewers' else ''}"> |
|
79 | 79 | <a href="${h.route_path('repo_reviewers', repo_name=c.repo_name)}">${_('Reviewer Rules')}</a> |
|
80 | 80 | </li> |
@@ -2,16 +2,16 b'' | |||
|
2 | 2 | |
|
3 | 3 | <% |
|
4 | 4 | elems = [ |
|
5 |
(_('Owner'), lambda:base.gravatar_with_user(c.r |
|
|
6 |
(_('Created on'), h.format_date(c.r |
|
|
7 |
(_('Updated on'), h.format_date(c.r |
|
|
8 |
(_('Cached Commit id'), lambda: h.link_to(c.r |
|
|
5 | (_('Owner'), lambda:base.gravatar_with_user(c.rhodecode_db_repo.user.email), '', ''), | |
|
6 | (_('Created on'), h.format_date(c.rhodecode_db_repo.created_on), '', ''), | |
|
7 | (_('Updated on'), h.format_date(c.rhodecode_db_repo.updated_on), '', ''), | |
|
8 | (_('Cached Commit id'), lambda: h.link_to(c.rhodecode_db_repo.changeset_cache.get('short_id'), h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.changeset_cache.get('raw_id'))), '', ''), | |
|
9 | 9 | ] |
|
10 | 10 | %> |
|
11 | 11 | |
|
12 | 12 | <div class="panel panel-default"> |
|
13 | 13 | <div class="panel-heading" id="advanced-info" > |
|
14 |
<h3 class="panel-title">${_('Repository: %s') % c.r |
|
|
14 | <h3 class="panel-title">${_('Repository: %s') % c.rhodecode_db_repo.repo_name} <a class="permalink" href="#advanced-info"> ΒΆ</a></h3> | |
|
15 | 15 | </div> |
|
16 | 16 | <div class="panel-body"> |
|
17 | 17 | ${base.dt_info_panel(elems)} |
@@ -24,16 +24,16 b'' | |||
|
24 | 24 | <h3 class="panel-title">${_('Fork Reference')} <a class="permalink" href="#advanced-fork"> ΒΆ</a></h3> |
|
25 | 25 | </div> |
|
26 | 26 | <div class="panel-body"> |
|
27 |
${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.r |
|
|
27 | ${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
28 | 28 | |
|
29 |
% if c.r |
|
|
30 |
<div class="panel-body-title-text">${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.r |
|
|
29 | % if c.rhodecode_db_repo.fork: | |
|
30 | <div class="panel-body-title-text">${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.rhodecode_db_repo.fork.repo_name, h.route_path('repo_summary', repo_name=c.rhodecode_db_repo.fork.repo_name))})} | |
|
31 | 31 | | <button class="btn btn-link btn-danger" type="submit">Remove fork reference</button></div> |
|
32 | 32 | % endif |
|
33 | 33 | |
|
34 | 34 | <div class="field"> |
|
35 | 35 | ${h.hidden('id_fork_of')} |
|
36 |
${h.submit('set_as_fork_%s' % c.r |
|
|
36 | ${h.submit('set_as_fork_%s' % c.rhodecode_db_repo.repo_name,_('Set'),class_="btn btn-small",)} | |
|
37 | 37 | </div> |
|
38 | 38 | <div class="field"> |
|
39 | 39 | <span class="help-block">${_('Manually set this repository as a fork of another from the list')}</span> |
@@ -48,7 +48,7 b'' | |||
|
48 | 48 | <h3 class="panel-title">${_('Public Journal Visibility')} <a class="permalink" href="#advanced-journal"> ΒΆ</a></h3> |
|
49 | 49 | </div> |
|
50 | 50 | <div class="panel-body"> |
|
51 |
${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.r |
|
|
51 | ${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
52 | 52 | <div class="field"> |
|
53 | 53 | %if c.in_public_journal: |
|
54 | 54 | <button class="btn btn-small" type="submit"> |
@@ -73,17 +73,17 b'' | |||
|
73 | 73 | <h3 class="panel-title">${_('Locking state')} <a class="permalink" href="#advanced-locking"> ΒΆ</a></h3> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="panel-body"> |
|
76 |
${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.r |
|
|
76 | ${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
77 | 77 | |
|
78 |
%if c.r |
|
|
79 |
<div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.r |
|
|
80 |
h.format_date(h. time_to_datetime(c.r |
|
|
78 | %if c.rhodecode_db_repo.locked[0]: | |
|
79 | <div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.rhodecode_db_repo.locked[0]), | |
|
80 | h.format_date(h. time_to_datetime(c.rhodecode_db_repo.locked[1])), c.rhodecode_db_repo.locked[2])}</div> | |
|
81 | 81 | %else: |
|
82 | 82 | <div class="panel-body-title-text">${_('This Repository is not currently locked.')}</div> |
|
83 | 83 | %endif |
|
84 | 84 | |
|
85 | 85 | <div class="field" > |
|
86 |
%if c.r |
|
|
86 | %if c.rhodecode_db_repo.locked[0]: | |
|
87 | 87 | ${h.hidden('set_unlock', '1')} |
|
88 | 88 | <button class="btn btn-small" type="submit" |
|
89 | 89 | onclick="return confirm('${_('Confirm to unlock repository.')}');"> |
@@ -117,15 +117,15 b'' | |||
|
117 | 117 | <table class="display"> |
|
118 | 118 | <tr> |
|
119 | 119 | <td> |
|
120 |
${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.r |
|
|
120 | ${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.rhodecode_db_repo.forks.count()) % c.rhodecode_db_repo.forks.count()} | |
|
121 | 121 | </td> |
|
122 | 122 | <td> |
|
123 |
%if c.r |
|
|
123 | %if c.rhodecode_db_repo.forks.count(): | |
|
124 | 124 | <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label> |
|
125 | 125 | %endif |
|
126 | 126 | </td> |
|
127 | 127 | <td> |
|
128 |
%if c.r |
|
|
128 | %if c.rhodecode_db_repo.forks.count(): | |
|
129 | 129 | <input type="radio" name="forks" value="delete_forks"/> <label for="forks">${_('Delete forks')}</label> |
|
130 | 130 | %endif |
|
131 | 131 | </td> |
@@ -153,7 +153,7 b'' | |||
|
153 | 153 | |
|
154 | 154 | <script> |
|
155 | 155 | |
|
156 |
var currentRepoId = ${c.r |
|
|
156 | var currentRepoId = ${c.rhodecode_db_repo.repo_id}; | |
|
157 | 157 | |
|
158 | 158 | var repoTypeFilter = function(data) { |
|
159 | 159 | var results = []; |
@@ -176,7 +176,7 b' var repoTypeFilter = function(data) {' | |||
|
176 | 176 | $("#id_fork_of").select2({ |
|
177 | 177 | cachedDataSource: {}, |
|
178 | 178 | minimumInputLength: 2, |
|
179 |
placeholder: "${_('Change repository') if c.r |
|
|
179 | placeholder: "${_('Change repository') if c.rhodecode_db_repo.fork else _('Pick repository')}", | |
|
180 | 180 | dropdownAutoWidth: true, |
|
181 | 181 | containerCssClass: "drop-menu", |
|
182 | 182 | dropdownCssClass: "drop-menu-dropdown", |
@@ -191,7 +191,7 b' var repoTypeFilter = function(data) {' | |||
|
191 | 191 | } else { |
|
192 | 192 | $.ajax({ |
|
193 | 193 | url: pyroutes.url('repo_list_data'), |
|
194 |
data: {'query': query.term, repo_type: '${c.r |
|
|
194 | data: {'query': query.term, repo_type: '${c.rhodecode_db_repo.repo_type}'}, | |
|
195 | 195 | dataType: 'json', |
|
196 | 196 | type: 'GET', |
|
197 | 197 | success: function(data) { |
@@ -10,14 +10,14 b'' | |||
|
10 | 10 | ${_('Cache purge can be automated by such api call. Can be called periodically in crontab etc.')} |
|
11 | 11 | <br/> |
|
12 | 12 | <code> |
|
13 |
${h.api_call_example(method='invalidate_cache', args={"repoid": c.r |
|
|
13 | ${h.api_call_example(method='invalidate_cache', args={"repoid": c.rhodecode_db_repo.repo_name})} | |
|
14 | 14 | </code> |
|
15 | 15 | </p> |
|
16 | 16 | |
|
17 | 17 | ${h.secure_form(h.route_path('edit_repo_caches', repo_name=c.repo_name), method='POST', request=request)} |
|
18 | 18 | <div class="form"> |
|
19 | 19 | <div class="fields"> |
|
20 |
${h.submit('reset_cache_%s' % c.r |
|
|
20 | ${h.submit('reset_cache_%s' % c.rhodecode_db_repo.repo_name,_('Invalidate repository cache'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")} | |
|
21 | 21 | </div> |
|
22 | 22 | </div> |
|
23 | 23 | ${h.end_form()} |
@@ -29,7 +29,7 b'' | |||
|
29 | 29 | <div class="panel panel-default"> |
|
30 | 30 | <div class="panel-heading"> |
|
31 | 31 | <h3 class="panel-title"> |
|
32 |
${(_ungettext('List of repository caches (%(count)s entry)', 'List of repository caches (%(count)s entries)' ,len(c.r |
|
|
32 | ${(_ungettext('List of repository caches (%(count)s entry)', 'List of repository caches (%(count)s entries)' ,len(c.rhodecode_db_repo.cache_keys)) % {'count': len(c.rhodecode_db_repo.cache_keys)})} | |
|
33 | 33 | </h3> |
|
34 | 34 | </div> |
|
35 | 35 | <div class="panel-body"> |
@@ -40,7 +40,7 b'' | |||
|
40 | 40 | <th>${_('Key')}</th> |
|
41 | 41 | <th>${_('Active')}</th> |
|
42 | 42 | </tr> |
|
43 |
%for cache in c.r |
|
|
43 | %for cache in c.rhodecode_db_repo.cache_keys: | |
|
44 | 44 | <tr> |
|
45 | 45 | <td class="td-prefix">${cache.get_prefix() or '-'}</td> |
|
46 | 46 | <td class="td-cachekey">${cache.cache_key}</td> |
@@ -18,7 +18,7 b'' | |||
|
18 | 18 | <td class="td-hash">${field.field_key}</td> |
|
19 | 19 | <td class="td-type">${field.field_type}</td> |
|
20 | 20 | <td class="td-action"> |
|
21 |
${h.secure_form(h.route_path('edit_repo_fields_delete', repo_name=c.r |
|
|
21 | ${h.secure_form(h.route_path('edit_repo_fields_delete', repo_name=c.rhodecode_db_repo.repo_name, field_id=field.repo_field_id), method='POST', request=request)} | |
|
22 | 22 | ${h.hidden('del_repo_field',field.repo_field_id)} |
|
23 | 23 | <button class="btn btn-link btn-danger" type="submit" |
|
24 | 24 | onclick="return confirm('${_('Confirm to delete this field: %s') % field.field_key}');"> |
@@ -72,8 +72,8 b'' | |||
|
72 | 72 | <div class="panel-body"> |
|
73 | 73 | ${its.issue_tracker_settings_table( |
|
74 | 74 | patterns=c.repo_patterns.items(), |
|
75 |
form_url=h.route_path('edit_repo_issuetracker', repo_name=c.r |
|
|
76 |
delete_url=h.route_path('edit_repo_issuetracker_delete', repo_name=c.r |
|
|
75 | form_url=h.route_path('edit_repo_issuetracker', repo_name=c.rhodecode_db_repo.repo_name), | |
|
76 | delete_url=h.route_path('edit_repo_issuetracker_delete', repo_name=c.rhodecode_db_repo.repo_name) | |
|
77 | 77 | )} |
|
78 | 78 | <div class="buttons"> |
|
79 | 79 | <button type="submit" class="btn btn-primary save-inheritance" id="save">${_('Save')}</button> |
@@ -92,7 +92,7 b'' | |||
|
92 | 92 | </div> |
|
93 | 93 | <div class="panel-body"> |
|
94 | 94 | ${its.issue_tracker_new_row()} |
|
95 |
${its.issue_tracker_settings_test(test_url=h.route_path('edit_repo_issuetracker_test', repo_name=c.r |
|
|
95 | ${its.issue_tracker_settings_test(test_url=h.route_path('edit_repo_issuetracker_test', repo_name=c.rhodecode_db_repo.repo_name))} | |
|
96 | 96 | </div> |
|
97 | 97 | </div> |
|
98 | 98 |
@@ -17,7 +17,7 b'' | |||
|
17 | 17 | ${_('Maintenance can be automated by such api call. Can be called periodically in crontab etc.')} |
|
18 | 18 | <br/> |
|
19 | 19 | <code> |
|
20 |
${h.api_call_example(method='maintenance', args={"repoid": c.r |
|
|
20 | ${h.api_call_example(method='maintenance', args={"repoid": c.rhodecode_db_repo.repo_name})} | |
|
21 | 21 | </code> |
|
22 | 22 | </p> |
|
23 | 23 | |
@@ -51,7 +51,7 b' executeTask = function() {' | |||
|
51 | 51 | btn.attr('disabled', 'disabled'); |
|
52 | 52 | btn.addClass('disabled'); |
|
53 | 53 | |
|
54 |
var url = "${h.route_path('edit_repo_maintenance_execute', repo_name=c.r |
|
|
54 | var url = "${h.route_path('edit_repo_maintenance_execute', repo_name=c.rhodecode_db_repo.repo_name)}"; | |
|
55 | 55 | var success = function (data) { |
|
56 | 56 | var displayHtml = $('<pre></pre>'); |
|
57 | 57 |
@@ -16,7 +16,7 b'' | |||
|
16 | 16 | <th></th> |
|
17 | 17 | </tr> |
|
18 | 18 | ## USERS |
|
19 |
%for _user in c.r |
|
|
19 | %for _user in c.rhodecode_db_repo.permissions(): | |
|
20 | 20 | %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None): |
|
21 | 21 | <tr class="perm_admin_row"> |
|
22 | 22 | <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td> |
@@ -35,7 +35,7 b'' | |||
|
35 | 35 | </td> |
|
36 | 36 | <td></td> |
|
37 | 37 | </tr> |
|
38 |
%elif _user.username == h.DEFAULT_USER and c.r |
|
|
38 | %elif _user.username == h.DEFAULT_USER and c.rhodecode_db_repo.private: | |
|
39 | 39 | <tr> |
|
40 | 40 | <td colspan="4"> |
|
41 | 41 | <span class="private_repo_msg"> |
@@ -76,7 +76,7 b'' | |||
|
76 | 76 | %endfor |
|
77 | 77 | |
|
78 | 78 | ## USER GROUPS |
|
79 |
%for _user_group in c.r |
|
|
79 | %for _user_group in c.rhodecode_db_repo.permission_user_groups(): | |
|
80 | 80 | <tr> |
|
81 | 81 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td> |
|
82 | 82 | <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td> |
@@ -6,30 +6,30 b'' | |||
|
6 | 6 | |
|
7 | 7 | <h4>${_('Manually pull changes from external repository.')}</h4> |
|
8 | 8 | |
|
9 |
%if c.r |
|
|
9 | %if c.rhodecode_db_repo.clone_uri: | |
|
10 | 10 | |
|
11 | 11 | ${_('Remote mirror url')}: |
|
12 |
<a href="${c.r |
|
|
12 | <a href="${c.rhodecode_db_repo.clone_uri}">${c.rhodecode_db_repo.clone_uri_hidden}</a> | |
|
13 | 13 | |
|
14 | 14 | <p> |
|
15 | 15 | ${_('Pull can be automated by such api call. Can be called periodically in crontab etc.')} |
|
16 | 16 | <br/> |
|
17 | 17 | <code> |
|
18 |
${h.api_call_example(method='pull', args={"repoid": c.r |
|
|
18 | ${h.api_call_example(method='pull', args={"repoid": c.rhodecode_db_repo.repo_name})} | |
|
19 | 19 | </code> |
|
20 | 20 | </p> |
|
21 | 21 | |
|
22 | 22 | ${h.secure_form(h.route_path('edit_repo_remote_pull', repo_name=c.repo_name), method='POST', request=request)} |
|
23 | 23 | <div class="form"> |
|
24 | 24 | <div class="fields"> |
|
25 |
${h.submit('remote_pull_%s' % c.r |
|
|
25 | ${h.submit('remote_pull_%s' % c.rhodecode_db_repo.repo_name,_('Pull changes from remote location'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")} | |
|
26 | 26 | </div> |
|
27 | 27 | </div> |
|
28 | 28 | ${h.end_form()} |
|
29 | 29 | %else: |
|
30 | 30 | |
|
31 | 31 | ${_('This repository does not have any remote mirror url set.')} |
|
32 |
<a href="${h.route_path('edit_repo', repo_name=c.r |
|
|
32 | <a href="${h.route_path('edit_repo', repo_name=c.rhodecode_db_repo.repo_name)}">${_('Set remote url.')}</a> | |
|
33 | 33 | <br/> |
|
34 | 34 | <br/> |
|
35 | 35 | <button class="btn disabled" type="submit" disabled="disabled"> |
@@ -3,7 +3,7 b'' | |||
|
3 | 3 | <h3 class="panel-title">${_('Repository statistics')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 |
${h.secure_form(h.route_path('edit_repo_statistics_reset', repo_name=c.r |
|
|
6 | ${h.secure_form(h.route_path('edit_repo_statistics_reset', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
7 | 7 | <div class="form"> |
|
8 | 8 | <div class="fields"> |
|
9 | 9 | <div class="field" > |
@@ -12,7 +12,7 b'' | |||
|
12 | 12 | <dt>${_('Processed progress')}:</dt><dd>${c.stats_percentage}%</dd> |
|
13 | 13 | </dl> |
|
14 | 14 | </div> |
|
15 |
${h.submit('reset_stats_%s' % c.r |
|
|
15 | ${h.submit('reset_stats_%s' % c.rhodecode_db_repo.repo_name,_('Reset statistics'),class_="btn btn-small",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")} | |
|
16 | 16 | </div> |
|
17 | 17 | </div> |
|
18 | 18 | ${h.end_form()} |
@@ -3,13 +3,13 b'' | |||
|
3 | 3 | <h3 class="panel-title">${_('Strip commits from repository')}</h3> |
|
4 | 4 | </div> |
|
5 | 5 | <div class="panel-body"> |
|
6 |
%if c.r |
|
|
6 | %if c.rhodecode_db_repo.repo_type != 'svn': | |
|
7 | 7 | <h4>${_('Please provide up to %d commits commits to strip') % c.strip_limit}</h4> |
|
8 | 8 | <p> |
|
9 | 9 | ${_('In the first step commits will be verified for existance in the repository')}. </br> |
|
10 | 10 | ${_('In the second step, correct commits will be available for stripping')}. |
|
11 | 11 | </p> |
|
12 |
${h.secure_form(h.route_path('strip_check', repo_name=c.r |
|
|
12 | ${h.secure_form(h.route_path('strip_check', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
13 | 13 | <div id="change_body" class="field"> |
|
14 | 14 | <div id="box-1" class="inputx locked_input"> |
|
15 | 15 | <input class="text" id="changeset_id-1" name="changeset_id-1" size="59" |
@@ -112,7 +112,7 b' checkCommits = function() {' | |||
|
112 | 112 | var postData = $('form').serialize(); |
|
113 | 113 | $('#results').show(); |
|
114 | 114 | $('#results').html('<h4>${_('Checking commits')}...</h4>'); |
|
115 |
var url = "${h.route_path('strip_check', repo_name=c.r |
|
|
115 | var url = "${h.route_path('strip_check', repo_name=c.rhodecode_db_repo.repo_name)}"; | |
|
116 | 116 | var btn = $('#strip_action'); |
|
117 | 117 | btn.attr('disabled', 'disabled'); |
|
118 | 118 | btn.addClass('disabled'); |
@@ -171,7 +171,7 b' checkCommits = function() {' | |||
|
171 | 171 | }; |
|
172 | 172 | |
|
173 | 173 | strip = function() { |
|
174 |
var url = "${h.route_path('strip_execute', repo_name=c.r |
|
|
174 | var url = "${h.route_path('strip_execute', repo_name=c.rhodecode_db_repo.repo_name)}"; | |
|
175 | 175 | var success = function(data) { |
|
176 | 176 | var result = '<h4>Strip executed</h4><ol>'; |
|
177 | 177 | $.each(data, function(index, value){ |
@@ -1,7 +1,7 b'' | |||
|
1 | 1 | <%namespace name="vcss" file="/base/vcs_settings.mako"/> |
|
2 | 2 | |
|
3 | 3 | <div id="repo_vcs_settings" class="${'inherited' if c.inherit_global_settings else ''}"> |
|
4 |
${h.secure_form(h.route_path('edit_repo_vcs_update', repo_name=c.r |
|
|
4 | ${h.secure_form(h.route_path('edit_repo_vcs_update', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
5 | 5 | <div class="form panel panel-default"> |
|
6 | 6 | <div class="fields panel-body"> |
|
7 | 7 | <div class="field"> |
@@ -22,7 +22,7 b'' | |||
|
22 | 22 | suffix='_inherited', |
|
23 | 23 | svn_tag_patterns=c.global_svn_tag_patterns, |
|
24 | 24 | svn_branch_patterns=c.global_svn_branch_patterns, |
|
25 |
repo_type=c.r |
|
|
25 | repo_type=c.rhodecode_db_repo.repo_type, | |
|
26 | 26 | disabled='disabled' |
|
27 | 27 | )} |
|
28 | 28 | </div> |
@@ -34,7 +34,7 b'' | |||
|
34 | 34 | suffix='', |
|
35 | 35 | svn_tag_patterns=c.svn_tag_patterns, |
|
36 | 36 | svn_branch_patterns=c.svn_branch_patterns, |
|
37 |
repo_type=c.r |
|
|
37 | repo_type=c.rhodecode_db_repo.repo_type | |
|
38 | 38 | )} |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
@@ -50,7 +50,7 b'' | |||
|
50 | 50 | <script type="text/javascript"> |
|
51 | 51 | |
|
52 | 52 | function ajaxDeletePattern(pattern_id, field_id) { |
|
53 |
var sUrl = "${h.route_path('edit_repo_vcs_svn_pattern_delete', repo_name=c.r |
|
|
53 | var sUrl = "${h.route_path('edit_repo_vcs_svn_pattern_delete', repo_name=c.rhodecode_db_repo.repo_name)}"; | |
|
54 | 54 | var callback = function (o) { |
|
55 | 55 | var elem = $("#"+field_id); |
|
56 | 56 | elem.remove(); |
@@ -27,7 +27,7 b'' | |||
|
27 | 27 | ${self.breadcrumbs()} |
|
28 | 28 | </div> |
|
29 | 29 | |
|
30 |
${h.secure_form(h.route_path('repo_fork_create',repo_name=c.r |
|
|
30 | ${h.secure_form(h.route_path('repo_fork_create',repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} | |
|
31 | 31 | <div class="form"> |
|
32 | 32 | <!-- fields --> |
|
33 | 33 | <div class="fields"> |
@@ -38,8 +38,8 b'' | |||
|
38 | 38 | </div> |
|
39 | 39 | <div class="input"> |
|
40 | 40 | ${h.text('repo_name', class_="medium")} |
|
41 |
${h.hidden('repo_type',c.r |
|
|
42 |
${h.hidden('fork_parent_id',c.r |
|
|
41 | ${h.hidden('repo_type',c.rhodecode_db_repo.repo_type)} | |
|
42 | ${h.hidden('fork_parent_id',c.rhodecode_db_repo.repo_id)} | |
|
43 | 43 | </div> |
|
44 | 44 | </div> |
|
45 | 45 |
General Comments 0
You need to be logged in to leave comments.
Login now