Mercurial > kallithea
annotate rhodecode/templates/base/perms_summary.html @ 4144:962f753552cd rhodecode-2.2.5-gpl
old style: don't reserve space for icons - they will have take the space they need
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 02 Jul 2014 19:03:22 -0400 |
parents | ffd45b185016 |
children |
rev | line source |
---|---|
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## snippet for displaying permissions overview for users |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
2 ## usage: |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
3 ## <%namespace name="p" file="/base/perms_summary.html"/> |
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
4 ## ${p.perms_summary(c.perm_user.permissions)} |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
6 <%def name="perms_summary(permissions, show_all=False, actions=True)"> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 <div id="perms" class="table"> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 %for section in sorted(permissions.keys()): |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
9 <div class="perms_section_head"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
10 ${section.replace("_"," ").capitalize()} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
11 %if section != 'global': |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
12 <div style="float: right"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
13 ${_('show')}: |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
14 ${h.checkbox('perms_filter_none_%s' % section, 'none', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='none')} <label for="${'perms_filter_none_%s' % section}"><span class="perm_tag none">${_('none')}</span></label> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
15 ${h.checkbox('perms_filter_read_%s' % section, 'read', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='read')} <label for="${'perms_filter_read_%s' % section}"><span class="perm_tag read">${_('read')}</span></label> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
16 ${h.checkbox('perms_filter_write_%s' % section, 'write', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='write')} <label for="${'perms_filter_write_%s' % section}"> <span class="perm_tag write">${_('write')}</span></label> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
17 ${h.checkbox('perms_filter_admin_%s' % section, 'admin', 'checked', class_='perm_filter filter_%s' % section, section=section, perm_type='admin')} <label for="${'perms_filter_admin_%s' % section}"><span class="perm_tag admin">${_('admin')}</span></label> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
18 </div> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
19 %endif |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
20 </div> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
21 %if not permissions[section]: |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
22 <span class="empty_data">${_('No permissions defined yet')}</span> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
23 %else: |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
24 <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 <table id="tbl_list_${section}"> |
3901
6cc17e42fa49
Don't show empty permissions for users, only for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
3736
diff
changeset
|
26 ## global permission box |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 %if section == 'global': |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
28 <thead> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
29 <tr> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
30 <th colspan="2" class="left">${_('Permission')}</th> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
31 %if actions: |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
32 <th class="left">${_('Edit Permission')}</th> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
33 %endif |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
34 </thead> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
35 <tbody> |
3736
87e6960e250b
Iteration on default permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
36 %for k in permissions[section]: |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 <tr> |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
38 <td colspan="2"> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
39 ${h.get_permission_name(k)} |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 </td> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
41 %if actions: |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 <td> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
43 <a href="${h.url('admin_permissions')}">${_('edit')}</a> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 </td> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
45 %endif |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 </tr> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 %endfor |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
48 </tbody> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 %else: |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
50 ## none/read/write/admin permissions on groups/repos etc |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
51 <thead> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
52 <tr> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
53 <th class="left">${_('Name')}</th> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
54 <th class="left">${_('Permission')}</th> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
55 %if actions: |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
56 <th class="left">${_('Edit Permission')}</th> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
57 %endif |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
58 </thead> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
59 <tbody class="section_${section}"> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
60 %for k, section_perm in sorted(permissions[section].items(), key=lambda s: {'none':0, 'read':1,'write':2,'admin':3}.get(s[1].split('.')[-1])): |
3901
6cc17e42fa49
Don't show empty permissions for users, only for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
3736
diff
changeset
|
61 %if section_perm.split('.')[-1] != 'none' or show_all: |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
62 <tr class="perm_row ${'%s_%s' % (section, section_perm.split('.')[-1])}"> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 <td> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
64 %if section == 'repositories': |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
65 <a href="${h.url('summary_home',repo_name=k)}">${k}</a> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
66 %elif section == 'repositories_groups': |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
67 <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
68 %elif section == 'user_groups': |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
69 ##<a href="${h.url('edit_users_group',id=k)}">${k}</a> |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
70 ${k} |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
71 %endif |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
72 </td> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
73 <td> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
74 <span class="perm_tag ${section_perm.split('.')[-1]}">${section_perm}</span> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
75 </td> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
76 %if actions: |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 <td> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
78 %if section == 'repositories': |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
79 <a href="${h.url('edit_repo_perms',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 %elif section == 'repositories_groups': |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
81 <a href="${h.url('edit_repo_group_perms',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
82 %elif section == 'user_groups': |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
83 ##<a href="${h.url('edit_users_group',id=k)}">${_('edit')}</a> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
84 %endif |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
85 </td> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
86 %endif |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
87 </tr> |
3901
6cc17e42fa49
Don't show empty permissions for users, only for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
3736
diff
changeset
|
88 %endif |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 %endfor |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
90 <tr id="empty_${section}" style="display: none"><td colspan="6">${_('No permission defined')}</td></tr> |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3666
diff
changeset
|
91 </tbody> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
92 %endif |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
93 </table> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
94 </div> |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
95 %endif |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
96 %endfor |
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
97 </div> |
4116
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
98 <script> |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
99 $(document).ready(function(){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
100 var show_empty = function(section){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
101 var visible = $('.section_{0} tr.perm_row:visible'.format(section)).length; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
102 console.log(visible) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
103 console.log($('.section_{0} tr.perm_row:visible'.format(section))) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
104 if(visible == 0){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
105 $('#empty_{0}'.format(section)).show(); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
106 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
107 else{ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
108 $('#empty_{0}'.format(section)).hide(); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
109 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
110 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
111 $('.perm_filter').on('change', function(e){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
112 var self = this; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
113 var section = $(this).attr('section'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
114 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
115 var opts = {} |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
116 var elems = $('.filter_' + section).each(function(el){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
117 var perm_type = $(this).attr('perm_type'); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
118 var checked = this.checked; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
119 opts[perm_type] = checked; |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
120 if(checked){ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
121 $('.'+section+'_'+perm_type).show(); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
122 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
123 else{ |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
124 $('.'+section+'_'+perm_type).hide(); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
125 } |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
126 }); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
127 show_empty(section); |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
128 }) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
129 |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
130 }) |
ffd45b185016
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3901
diff
changeset
|
131 </script> |
3666
fda60c2ad65f
fixed sort of permissions summary it's now perm+name
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
132 </%def> |