Mercurial > kallithea
annotate rhodecode/templates/base/default_perms_box.html @ 4147:1c8f818787b3 rhodecode-2.2.5-gpl
old style: show the full link box on summary page - no overlap or truncation
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 02 Jul 2014 19:03:23 -0400 |
parents | ffd45b185016 |
children |
rev | line source |
---|---|
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## snippet for displaying default permission box |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 ## usage: |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 ## <%namespace name="dpb" file="/base/default_perms_box.html"/> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 ## ${dpb.default_perms_box(<url_to_form>)} |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 <%def name="default_perms_box(form_url)"> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 ${h.form(form_url, method='put')} |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 <div class="form"> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 <!-- fields --> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 <div class="fields"> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 <div class="field"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
13 <div class="label label-checkbox"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
14 <label for="inherit_default_permissions">${_('Inherit from defaults')}:</label> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
16 <div class="checkboxes"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
17 ${h.checkbox('inherit_default_permissions',value=True)} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
18 <span class="help-block"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
19 ${h.literal(_('Select to inherit permissions from %s permissions settings, and default IP address whitelist.') |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
20 % h.link_to('default global', url('admin_permissions')))} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
21 </span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
22 </div> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
24 |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 <div id="inherit_overlay"> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 <div class="field"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
27 <div class="label label-checkbox"> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 <label for="create_repo_perm">${_('Create repositories')}:</label> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
30 <div class="checkboxes"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
31 ${h.checkbox('create_repo_perm',value=True)} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
32 <span class="help-block"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
33 ${h.literal(_('Select this option to allow repository creation for this user'))} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
34 </span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
35 </div> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
37 |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
38 <div class="field"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
39 <div class="label label-checkbox"> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 <label for="create_user_group_perm">${_('Create user groups')}:</label> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
42 <div class="checkboxes"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
43 ${h.checkbox('create_user_group_perm',value=True)} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
44 <span class="help-block"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
45 ${h.literal(_('Select this option to allow user group creation for this user'))} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
46 </span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
47 </div> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
49 |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 <div class="field"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
51 <div class="label label-checkbox"> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 <label for="fork_repo_perm">${_('Fork repositories')}:</label> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
53 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
54 <div class="checkboxes"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
55 ${h.checkbox('fork_repo_perm',value=True)} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
56 <span class="help-block"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
57 ${h.literal(_('Select this option to allow repository forking for this user'))} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
58 </span> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
59 </div> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
61 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
62 </div> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 <div class="buttons"> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
64 ${h.submit('save',_('Save'),class_="btn")} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3736
diff
changeset
|
65 ${h.reset('reset',_('Reset'),class_="btn")} |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
66 </div> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
67 </div> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
68 </div> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
69 ${h.end_form()} |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
70 |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
71 ## JS |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
72 <script> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
73 YUE.onDOMReady(function(e){ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
74 |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
75 var show_custom_perms = function(inherit_default){ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
76 if(inherit_default){ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 YUD.setStyle('inherit_overlay', 'display', 'none'); |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
78 } |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
79 else{ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 YUD.setStyle('inherit_overlay', 'display', ''); |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 } |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
82 } |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
84 var defaults = YUD.get('inherit_default_permissions').checked; |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
85 show_custom_perms(defaults); |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
86 YUE.on('inherit_default_permissions', 'change', function(e){ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
87 if(YUD.get('inherit_default_permissions').checked){ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
88 show_custom_perms(true); |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 } |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
90 else{ |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
91 show_custom_perms(false); |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
92 } |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
93 }) |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
94 }) |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
95 </script> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
96 |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
97 </%def> |