##// END OF EJS Templates
comments: remove helper to render a comment object....
comments: remove helper to render a comment object. - we always use helper renderer, and for consistency we should stick with that. It makes refactoring, and general use much harder. DB objects should have least possible logic inside.

File last commit:

r1555:9d1f0e57 default
r1673:e3526633 default
Show More
repo_edit_maintenance.mako
58 lines | 1.5 KiB | application/x-mako | MakoHtmlLexer
/ rhodecode / templates / admin / repos / repo_edit_maintenance.mako
repositories: enabled support for maintenance commands....
r1555 <div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">${_('Maintenance')}</h3>
</div>
<div class="panel-body">
<p>
% if c.executable_tasks:
${_('Perform maintenance tasks for this repo, following tasks will be performed')}:
<ol>
% for task in c.executable_tasks:
<li>${task}</li>
% endfor
</ol>
% else:
${_('No maintenance tasks for this repo available')}
% endif
</p>
<div id="results" style="display:none; padding: 10px 0px;"></div>
% if c.executable_tasks:
<div class="form">
<div class="fields">
<button class="btn btn-small btn-primary" onclick="executeTask();return false">
${_('Run Maintenance')}
</button>
</div>
</div>
% endif
</div>
</div>
<script>
executeTask = function() {
var btn = $(this);
$('#results').show();
$('#results').html('<h4>${_('Performing Maintenance')}...</h4>');
btn.attr('disabled', 'disabled');
btn.addClass('disabled');
var url = "${h.route_path('repo_maintenance_execute', repo_name=c.repo_info.repo_name)}";
var success = function (data) {
var displayHtml = $('<pre></pre>');
$(displayHtml).append(data);
$('#results').html(displayHtml);
btn.removeAttr('disabled');
btn.removeClass('disabled');
};
ajaxGET(url, success, null);
}
</script>