repo_edit.html
109 lines
| 3.3 KiB
| text/html
|
HtmlLexer
r216 | ## -*- coding: utf-8 -*- | |||
<%inherit file="/base/base.html"/> | ||||
r127 | <%def name="title()"> | |||
r216 | ${_('Repositories administration')} | |||
r127 | </%def> | |||
<%def name="breadcrumbs()"> | ||||
r216 | ${h.link_to(u'Admin',h.url('admin_home'))} | |||
/ | ||||
r230 | ${_('Repos')} | |||
r127 | </%def> | |||
<%def name="page_nav()"> | ||||
r182 | ${self.menu('admin')} | |||
r216 | ${self.submenu('repos')} | |||
r127 | </%def> | |||
<%def name="main()"> | ||||
<div> | ||||
r216 | <h2>${_('Repositories')} - ${_('edit')}</h2> | |||
r265 | ${h.form(url('repo', id=c.repo_info.repo_name),method='put')} | |||
r216 | <table> | |||
<tr> | ||||
<td>${_('Name')}</td> | ||||
r265 | <td>${h.text('repo_name')}</td> | |||
<td>${self.get_form_error('repo_name')}</td> | ||||
r216 | </tr> | |||
<tr> | ||||
<td>${_('Description')}</td> | ||||
<td>${h.textarea('description',cols=23,rows=5)}</td> | ||||
r265 | <td>${self.get_form_error('description')}</td> | |||
r216 | </tr> | |||
<tr> | ||||
<td>${_('Private')}</td> | ||||
<td>${h.checkbox('private')}</td> | ||||
r265 | <td>${self.get_form_error('private')}</td> | |||
</tr> | ||||
<tr> | ||||
<td>${_('Owner')}</td> | ||||
<td>${h.text('user')}</td> | ||||
<td>${self.get_form_error('user')}</td> | ||||
r216 | </tr> | |||
<tr> | ||||
r296 | <td>${_('Permissions')}</td> | |||
<td> | ||||
<table> | ||||
<tr> | ||||
<td>${_('none')}</td> | ||||
<td>${_('read')}</td> | ||||
<td>${_('write')}</td> | ||||
<td>${_('admin')}</td> | ||||
<td>${_('user')}</td> | ||||
</tr> | ||||
%for r2p in c.repo_info.repo2perm: | ||||
<tr> | ||||
<td>${h.radio('perm_%s' % r2p.user.username,'repository.none')}</td> | ||||
<td>${h.radio('perm_%s' % r2p.user.username,'repository.read')}</td> | ||||
<td>${h.radio('perm_%s' % r2p.user.username,'repository.write')}</td> | ||||
<td>${h.radio('perm_%s' % r2p.user.username,'repository.admin')}</td> | ||||
<td>${r2p.user.username}</td> | ||||
</tr> | ||||
%endfor | ||||
<% | ||||
if not hasattr(c,'form_errors'): | ||||
d = 'display:none;' | ||||
else: | ||||
d='' | ||||
%> | ||||
<tr id="add_perm_input" style="${d}"> | ||||
<td>${h.radio('perm_new_user','repository.none')}</td> | ||||
<td>${h.radio('perm_new_user','repository.read')}</td> | ||||
<td>${h.radio('perm_new_user','repository.write')}</td> | ||||
<td>${h.radio('perm_new_user','repository.admin')}</td> | ||||
<td>${h.text('perm_new_user_name',size=10)}</td> | ||||
<td>${self.get_form_error('perm_new_user_name')}</td> | ||||
</tr> | ||||
<tr> | ||||
<td colspan="4"> | ||||
<span id="add_perm" class="add_icon" style="cursor: pointer;"> | ||||
${_('Add another user')} | ||||
</span> | ||||
</td> | ||||
</tr> | ||||
</table> | ||||
</td> | ||||
</tr> | ||||
<tr> | ||||
r216 | <td></td> | |||
r220 | <td>${h.submit('update','update')}</td> | |||
r216 | </tr> | |||
</table> | ||||
${h.end_form()} | ||||
r296 | <script type="text/javascript"> | |||
YAHOO.util.Event.onDOMReady(function(){ | ||||
var D = YAHOO.util.Dom; | ||||
YAHOO.util.Event.addListener('add_perm','click',function(){ | ||||
D.setStyle('add_perm_input','display',''); | ||||
D.setStyle('add_perm','opacity','0.6'); | ||||
D.setStyle('add_perm','cursor','default'); | ||||
}); | ||||
}); | ||||
</script> | ||||
r127 | </div> | |||
r216 | </%def> | |||