2022-07-05 00:41:40 +00:00
|
|
|
.announcements-list__item
|
2022-07-07 16:18:23 +00:00
|
|
|
- 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}" }
|
2024-04-23 16:43:49 +00:00
|
|
|
= material_symbol 'group'
|
2022-07-05 00:41:40 +00:00
|
|
|
|
2022-07-07 16:18:23 +00:00
|
|
|
- if role.everyone?
|
|
|
|
= t('admin.roles.everyone')
|
|
|
|
- else
|
|
|
|
= role.name
|
|
|
|
- else
|
|
|
|
%span.announcements-list__item__title
|
|
|
|
%span.user-role{ class: "user-role-#{role.id}" }
|
2024-04-23 16:43:49 +00:00
|
|
|
= material_symbol 'group'
|
2022-07-07 16:18:23 +00:00
|
|
|
|
|
|
|
- if role.everyone?
|
|
|
|
= t('admin.roles.everyone')
|
|
|
|
- else
|
|
|
|
= role.name
|
2022-07-05 00:41:40 +00:00
|
|
|
|
|
|
|
.announcements-list__item__action-bar
|
|
|
|
.announcements-list__item__meta
|
|
|
|
- if role.everyone?
|
|
|
|
= t('admin.roles.everyone_full_description_html')
|
|
|
|
- else
|
2022-07-05 18:01:50 +00:00
|
|
|
= link_to t('admin.roles.assigned_users', count: role.users.count), admin_accounts_path(role_ids: role.id)
|
2023-06-02 17:58:18 +00:00
|
|
|
·
|
2022-07-05 00:41:40 +00:00
|
|
|
%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)
|
2022-07-07 16:18:23 +00:00
|
|
|
%div
|
|
|
|
= table_link_to 'pencil', t('admin.accounts.edit'), edit_admin_role_path(role) if can?(:update, role)
|