diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-07-17 23:10:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-17 23:10:31 +0200 |
commit | ab1488a6ad93f572e1d184cb9653f76fd408474f (patch) | |
tree | f1dd126f4745eb99243f390169fb957a72f5acc6 /app/views/admin/roles/_role.html.haml | |
parent | 325ebb76b19bd20e1b76d8bc26c11cab02f6571c (diff) | |
parent | 6c0d73a675d62f676b005c06593fd69e9a7bc0e5 (diff) |
Merge pull request #1804 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/admin/roles/_role.html.haml')
-rw-r--r-- | app/views/admin/roles/_role.html.haml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/admin/roles/_role.html.haml b/app/views/admin/roles/_role.html.haml new file mode 100644 index 000000000..798d8d8b4 --- /dev/null +++ b/app/views/admin/roles/_role.html.haml @@ -0,0 +1,30 @@ +.announcements-list__item + - if can?(:update, role) + = link_to edit_admin_role_path(role), class: 'announcements-list__item__title' do + %span.user-role{ class: "user-role-#{role.id}" } + = fa_icon 'users fw' + + - if role.everyone? + = t('admin.roles.everyone') + - else + = role.name + - else + %span.announcements-list__item__title + %span.user-role{ class: "user-role-#{role.id}" } + = fa_icon 'users fw' + + - if role.everyone? + = t('admin.roles.everyone') + - else + = role.name + + .announcements-list__item__action-bar + .announcements-list__item__meta + - if role.everyone? + = t('admin.roles.everyone_full_description_html') + - else + = link_to t('admin.roles.assigned_users', count: role.users.count), admin_accounts_path(role_ids: role.id) + • + %abbr{ title: role.permissions_as_keys.map { |privilege| I18n.t("admin.roles.privileges.#{privilege}") }.join(', ') }= t('admin.roles.permissions_count', count: role.permissions_as_keys.size) + %div + = table_link_to 'pencil', t('admin.accounts.edit'), edit_admin_role_path(role) if can?(:update, role) |