Mercurial > kallithea
diff rhodecode/templates/admin/users/user_edit_my_account.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 | 690a955ba785 |
children | a0a692cb0bec |
line wrap: on
line diff
--- a/rhodecode/templates/admin/users/user_edit_my_account.html Thu Apr 04 13:18:24 2013 +0200 +++ b/rhodecode/templates/admin/users/user_edit_my_account.html Thu Apr 04 14:08:58 2013 +0200 @@ -43,54 +43,10 @@ </ul> </div> <!-- end box / title --> - <div id="perms_container"> - <div id="perms" class="table"> - %for section in sorted(c.rhodecode_user.permissions.keys()): - <div class="perms_section_head">${section.replace("_"," ").capitalize()}</div> + ## permissions overview + <%namespace name="p" file="/base/perms_summary.html"/> + ${p.perms_summary(c.perm_user.permissions)} - <div id='tbl_list_wrap_${section}' class="yui-skin-sam"> - <table id="tbl_list_${section}"> - <thead> - <tr> - <th class="left">${_('Name')}</th> - <th class="left">${_('Permission')}</th> - </thead> - <tbody> - %for k in sorted(c.rhodecode_user.permissions[section], key=lambda s: s.lower): - <% - if section != 'global': - section_perm = c.rhodecode_user.permissions[section].get(k) - _perm = section_perm.split('.')[-1] - else: - _perm = section_perm = None - %> - %if _perm not in ['none']: - <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> - %else: - ${k} - %endif - </td> - <td> - %if section == 'global': - ${h.boolicon(True)} - %else: - <span class="perm_tag ${_perm}">${section_perm}</span> - %endif - </td> - </tr> - %endif - %endfor - </tbody> - </table> - </div> - %endfor - </div> - </div> <div id="my_container" style="display:none"> <div class="table yui-skin-sam" id="repos_list_wrap"></div> <div id="user-paginator" style="padding: 0px 0px 0px 20px"></div>