apps: removed deprecated usage of c.repo_info
This commit is contained in:
parent
87a5eb4bde
commit
3821db3f37
33 changed files with 57 additions and 114 deletions
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
<%
|
||||
elems = [
|
||||
(_('Owner'), lambda:base.gravatar_with_user(c.repo_info.user.email), '', ''),
|
||||
(_('Created on'), h.format_date(c.repo_info.created_on), '', ''),
|
||||
(_('Updated on'), h.format_date(c.repo_info.updated_on), '', ''),
|
||||
(_('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'))), '', ''),
|
||||
(_('Owner'), lambda:base.gravatar_with_user(c.rhodecode_db_repo.user.email), '', ''),
|
||||
(_('Created on'), h.format_date(c.rhodecode_db_repo.created_on), '', ''),
|
||||
(_('Updated on'), h.format_date(c.rhodecode_db_repo.updated_on), '', ''),
|
||||
(_('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'))), '', ''),
|
||||
]
|
||||
%>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" id="advanced-info" >
|
||||
<h3 class="panel-title">${_('Repository: %s') % c.repo_info.repo_name} <a class="permalink" href="#advanced-info"> ¶</a></h3>
|
||||
<h3 class="panel-title">${_('Repository: %s') % c.rhodecode_db_repo.repo_name} <a class="permalink" href="#advanced-info"> ¶</a></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
${base.dt_info_panel(elems)}
|
||||
|
|
@ -24,16 +24,16 @@
|
|||
<h3 class="panel-title">${_('Fork Reference')} <a class="permalink" href="#advanced-fork"> ¶</a></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.repo_info.repo_name), method='POST', request=request)}
|
||||
${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)}
|
||||
|
||||
% if c.repo_info.fork:
|
||||
<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))})}
|
||||
% if c.rhodecode_db_repo.fork:
|
||||
<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))})}
|
||||
| <button class="btn btn-link btn-danger" type="submit">Remove fork reference</button></div>
|
||||
% endif
|
||||
|
||||
<div class="field">
|
||||
${h.hidden('id_fork_of')}
|
||||
${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('Set'),class_="btn btn-small",)}
|
||||
${h.submit('set_as_fork_%s' % c.rhodecode_db_repo.repo_name,_('Set'),class_="btn btn-small",)}
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="help-block">${_('Manually set this repository as a fork of another from the list')}</span>
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
<h3 class="panel-title">${_('Public Journal Visibility')} <a class="permalink" href="#advanced-journal"> ¶</a></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.repo_info.repo_name), method='POST', request=request)}
|
||||
${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)}
|
||||
<div class="field">
|
||||
%if c.in_public_journal:
|
||||
<button class="btn btn-small" type="submit">
|
||||
|
|
@ -73,17 +73,17 @@
|
|||
<h3 class="panel-title">${_('Locking state')} <a class="permalink" href="#advanced-locking"> ¶</a></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.repo_info.repo_name), method='POST', request=request)}
|
||||
${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)}
|
||||
|
||||
%if c.repo_info.locked[0]:
|
||||
<div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.repo_info.locked[0]),
|
||||
h.format_date(h. time_to_datetime(c.repo_info.locked[1])), c.repo_info.locked[2])}</div>
|
||||
%if c.rhodecode_db_repo.locked[0]:
|
||||
<div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.rhodecode_db_repo.locked[0]),
|
||||
h.format_date(h. time_to_datetime(c.rhodecode_db_repo.locked[1])), c.rhodecode_db_repo.locked[2])}</div>
|
||||
%else:
|
||||
<div class="panel-body-title-text">${_('This Repository is not currently locked.')}</div>
|
||||
%endif
|
||||
|
||||
<div class="field" >
|
||||
%if c.repo_info.locked[0]:
|
||||
%if c.rhodecode_db_repo.locked[0]:
|
||||
${h.hidden('set_unlock', '1')}
|
||||
<button class="btn btn-small" type="submit"
|
||||
onclick="return confirm('${_('Confirm to unlock repository.')}');">
|
||||
|
|
@ -117,15 +117,15 @@
|
|||
<table class="display">
|
||||
<tr>
|
||||
<td>
|
||||
${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.repo_info.forks.count()) % c.repo_info.forks.count()}
|
||||
${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.rhodecode_db_repo.forks.count()) % c.rhodecode_db_repo.forks.count()}
|
||||
</td>
|
||||
<td>
|
||||
%if c.repo_info.forks.count():
|
||||
%if c.rhodecode_db_repo.forks.count():
|
||||
<input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
|
||||
%endif
|
||||
</td>
|
||||
<td>
|
||||
%if c.repo_info.forks.count():
|
||||
%if c.rhodecode_db_repo.forks.count():
|
||||
<input type="radio" name="forks" value="delete_forks"/> <label for="forks">${_('Delete forks')}</label>
|
||||
%endif
|
||||
</td>
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
|
||||
<script>
|
||||
|
||||
var currentRepoId = ${c.repo_info.repo_id};
|
||||
var currentRepoId = ${c.rhodecode_db_repo.repo_id};
|
||||
|
||||
var repoTypeFilter = function(data) {
|
||||
var results = [];
|
||||
|
|
@ -176,7 +176,7 @@ var repoTypeFilter = function(data) {
|
|||
$("#id_fork_of").select2({
|
||||
cachedDataSource: {},
|
||||
minimumInputLength: 2,
|
||||
placeholder: "${_('Change repository') if c.repo_info.fork else _('Pick repository')}",
|
||||
placeholder: "${_('Change repository') if c.rhodecode_db_repo.fork else _('Pick repository')}",
|
||||
dropdownAutoWidth: true,
|
||||
containerCssClass: "drop-menu",
|
||||
dropdownCssClass: "drop-menu-dropdown",
|
||||
|
|
@ -191,7 +191,7 @@ $("#id_fork_of").select2({
|
|||
} else {
|
||||
$.ajax({
|
||||
url: pyroutes.url('repo_list_data'),
|
||||
data: {'query': query.term, repo_type: '${c.repo_info.repo_type}'},
|
||||
data: {'query': query.term, repo_type: '${c.rhodecode_db_repo.repo_type}'},
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
success: function(data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue