Mercurial > kallithea
comparison rhodecode/templates/admin/permissions/permissions.html @ 3666:fda60c2ad65f beta
fixed sort of permissions summary it's now perm+name
unified permissions summary for users and user groups
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 04 Apr 2013 14:08:58 +0200 |
parents | ec6354949623 |
children | 3563bb7b4b82 a8f520540ab0 |
comparison
equal
deleted
inserted
replaced
3665:690a955ba785 | 3666:fda60c2ad65f |
---|---|
102 <div class="title"> | 102 <div class="title"> |
103 <h5>${_('Default User Permissions')}</h5> | 103 <h5>${_('Default User Permissions')}</h5> |
104 </div> | 104 </div> |
105 | 105 |
106 ## permissions overview | 106 ## permissions overview |
107 <div id="perms" class="table"> | 107 <%include file="/base/perms_summary.html"/> |
108 %for section in sorted(c.perm_user.permissions.keys()): | 108 |
109 <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> | |
110 %if not c.perm_user.permissions[section]: | |
111 <span class="empty_data">${_('Nothing here yet')}</span> | |
112 %else: | |
113 <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> | |
114 <table id="tbl_list_${section}"> | |
115 <thead> | |
116 <tr> | |
117 <th class="left">${_('Name')}</th> | |
118 <th class="left">${_('Permission')}</th> | |
119 <th class="left">${_('Edit Permission')}</th> | |
120 </thead> | |
121 <tbody> | |
122 %for k in sorted(c.perm_user.permissions[section], key=lambda s: s.lower): | |
123 <% | |
124 if section != 'global': | |
125 section_perm = c.perm_user.permissions[section].get(k) | |
126 _perm = section_perm.split('.')[-1] | |
127 else: | |
128 _perm = section_perm = None | |
129 %> | |
130 <tr> | |
131 <td> | |
132 %if section == 'repositories': | |
133 <a href="${h.url('summary_home',repo_name=k)}">${k}</a> | |
134 %elif section == 'repositories_groups': | |
135 <a href="${h.url('repos_group_home',group_name=k)}">${k}</a> | |
136 %else: | |
137 ${h.get_permission_name(k)} | |
138 %endif | |
139 </td> | |
140 <td> | |
141 %if section == 'global': | |
142 ${h.boolicon(k.split('.')[-1] != 'none')} | |
143 %else: | |
144 <span class="perm_tag ${_perm}">${section_perm}</span> | |
145 %endif | |
146 </td> | |
147 <td> | |
148 %if section == 'repositories': | |
149 <a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
150 %elif section == 'repositories_groups': | |
151 <a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a> | |
152 %else: | |
153 -- | |
154 %endif | |
155 </td> | |
156 </tr> | |
157 %endfor | |
158 </tbody> | |
159 </table> | |
160 </div> | |
161 %endif | |
162 %endfor | |
163 </div> | |
164 </div> | 109 </div> |
165 <div class="box box-left" style="clear:left"> | 110 <div class="box box-left" style="clear:left"> |
166 <!-- box / title --> | 111 <!-- box / title --> |
167 <div class="title"> | 112 <div class="title"> |
168 <h5>${_('Allowed IP addresses')}</h5> | 113 <h5>${_('Allowed IP addresses')}</h5> |