##// END OF EJS Templates
Import some of the files from Select2 3.5.0 Javascript system....
Import some of the files from Select2 3.5.0 Javascript system. RhodeCode 2.2.5 used a version of Select2. Herein, we bring into Kallithea only a few files directly from Select2 3.5.0 (6ef7155) upstream, using the commands indicated below: (cd /tmp; \ git clone https://github.com/ivaynberg/select2.git; \ cd select2; \ git checkout 3.5.0 \ ) mkdir rhodecode/public/js/select2 cp -pa /tmp/select2/select2.{js,css,png} rhodecode/public/js/select2/ cp -pa /tmp/select2/select2x2.png rhodecode/public/js/select2/ cp -pa /tmp/select2/select2-spinner.gif rhodecode/public/js/select2/ hg add rhodecode/public/js/select2/

File last commit:

r4116:ffd45b18 rhodecode-2.2.5-gpl
r4128:bbbb013a rhodecode-2.2.5-gpl
Show More
default_perms_box.html
97 lines | 3.4 KiB | text/html | HtmlLexer
/ rhodecode / templates / base / default_perms_box.html
Iteration on default permissions...
r3736 ## snippet for displaying default permission box
## usage:
## <%namespace name="dpb" file="/base/default_perms_box.html"/>
## ${dpb.default_perms_box(<url_to_form>)}
<%def name="default_perms_box(form_url)">
${h.form(form_url, method='put')}
<div class="form">
<!-- fields -->
<div class="fields">
<div class="field">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="label label-checkbox">
<label for="inherit_default_permissions">${_('Inherit from defaults')}:</label>
Iteration on default permissions...
r3736 </div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="checkboxes">
${h.checkbox('inherit_default_permissions',value=True)}
<span class="help-block">
${h.literal(_('Select to inherit permissions from %s permissions settings, and default IP address whitelist.')
% h.link_to('default global', url('admin_permissions')))}
</span>
</div>
Iteration on default permissions...
r3736 </div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116
Iteration on default permissions...
r3736 <div id="inherit_overlay">
<div class="field">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="label label-checkbox">
Iteration on default permissions...
r3736 <label for="create_repo_perm">${_('Create repositories')}:</label>
</div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="checkboxes">
${h.checkbox('create_repo_perm',value=True)}
<span class="help-block">
${h.literal(_('Select this option to allow repository creation for this user'))}
</span>
</div>
Iteration on default permissions...
r3736 </div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116
Iteration on default permissions...
r3736 <div class="field">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="label label-checkbox">
Iteration on default permissions...
r3736 <label for="create_user_group_perm">${_('Create user groups')}:</label>
</div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="checkboxes">
${h.checkbox('create_user_group_perm',value=True)}
<span class="help-block">
${h.literal(_('Select this option to allow user group creation for this user'))}
</span>
</div>
Iteration on default permissions...
r3736 </div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116
Iteration on default permissions...
r3736 <div class="field">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="label label-checkbox">
Iteration on default permissions...
r3736 <label for="fork_repo_perm">${_('Fork repositories')}:</label>
</div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="checkboxes">
${h.checkbox('fork_repo_perm',value=True)}
<span class="help-block">
${h.literal(_('Select this option to allow repository forking for this user'))}
</span>
</div>
Iteration on default permissions...
r3736 </div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116
</div>
Iteration on default permissions...
r3736 <div class="buttons">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 ${h.submit('save',_('Save'),class_="btn")}
${h.reset('reset',_('Reset'),class_="btn")}
Iteration on default permissions...
r3736 </div>
</div>
</div>
${h.end_form()}
## JS
<script>
YUE.onDOMReady(function(e){
var show_custom_perms = function(inherit_default){
if(inherit_default){
YUD.setStyle('inherit_overlay', 'display', 'none');
}
else{
YUD.setStyle('inherit_overlay', 'display', '');
}
}
var defaults = YUD.get('inherit_default_permissions').checked;
show_custom_perms(defaults);
YUE.on('inherit_default_permissions', 'change', function(e){
if(YUD.get('inherit_default_permissions').checked){
show_custom_perms(true);
}
else{
show_custom_perms(false);
}
})
})
</script>
</%def>