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