Files
@ 371898dc9a91
Branch filter:
Location: kallithea/rhodecode/templates/base/perms_summary.html - annotation
371898dc9a91
3.1 KiB
text/html
fixed some issues with paginators on chrome, and made them look nicer
fda60c2ad65f 87e6960e250b 87e6960e250b 87e6960e250b fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 87e6960e250b fda60c2ad65f a8f520540ab0 fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f a8f520540ab0 fda60c2ad65f a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 a8f520540ab0 fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f a8f520540ab0 a8f520540ab0 a8f520540ab0 fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f a8f520540ab0 a8f520540ab0 fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f a8f520540ab0 fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f fda60c2ad65f | ## snippet for displaying permissions overview for users
## usage:
## <%namespace name="p" file="/base/perms_summary.html"/>
## ${p.perms_summary(c.perm_user.permissions)}
<%def name="perms_summary(permissions)">
<div id="perms" class="table">
%for section in sorted(permissions.keys()):
<div class="perms_section_head">${section.replace("_"," ").capitalize()}</div>
%if not permissions[section]:
<span class="empty_data">${_('No permissions defined yet')}</span>
%else:
<div id='tbl_list_wrap_${section}' class="yui-skin-sam">
<table id="tbl_list_${section}">
%if section == 'global':
<thead>
<tr>
<th colspan="2" class="left">${_('Permission')}</th>
<th class="left">${_('Edit Permission')}</th>
</thead>
<tbody>
%for k in permissions[section]:
<tr>
<td colspan="2">
${h.get_permission_name(k)}
</td>
<td>
<a href="${h.url('edit_permission', id='default')}">${_('edit')}</a>
</td>
</tr>
%endfor
</tbody>
%else:
<thead>
<tr>
<th class="left">${_('Name')}</th>
<th class="left">${_('Permission')}</th>
<th class="left">${_('Edit Permission')}</th>
</thead>
<tbody>
%for k, section_perm in sorted(permissions[section].items(), key=lambda s: s[1]+s[0].lower()):
<tr>
<td>
%if section == 'repositories':
<a href="${h.url('summary_home',repo_name=k)}">${k}</a>
%elif section == 'repositories_groups':
<a href="${h.url('repos_group_home',group_name=k)}">${k}</a>
%elif section == 'user_groups':
##<a href="${h.url('edit_users_group',id=k)}">${k}</a>
${k}
%endif
</td>
<td>
<span class="perm_tag ${section_perm.split('.')[-1]}">${section_perm}</span>
</td>
<td>
%if section == 'repositories':
<a href="${h.url('edit_repo',repo_name=k,anchor='permissions_manage')}">${_('edit')}</a>
%elif section == 'repositories_groups':
<a href="${h.url('edit_repos_group',group_name=k,anchor='permissions_manage')}">${_('edit')}</a>
%elif section == 'user_groups':
##<a href="${h.url('edit_users_group',id=k)}">${_('edit')}</a>
%endif
</td>
</tr>
%endfor
</tbody>
%endif
</table>
</div>
%endif
%endfor
</div>
</%def>
|