1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-26 04:28:30 +09:00
YuruToot/app/views/admin/roles/_role.html.haml
Claire befbac3f1c
Fix various in the user role management UI (#18777)
* Reword priority description

* Disable checkboxes for permissions you can't enable in role edition interface

* Set max priority in HTML attribute

* Explicitly link to role edition, do not link when you can't edit

* Reword priority description based on review
2022-07-07 18:18:23 +02:00

31 lines
1.2 KiB
Plaintext

.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)