diff --git a/lib/philomena_web/templates/admin/user/index.html.slime b/lib/philomena_web/templates/admin/user/index.html.slime index eb67c043..197a33a6 100644 --- a/lib/philomena_web/templates/admin/user/index.html.slime +++ b/lib/philomena_web/templates/admin/user/index.html.slime @@ -46,7 +46,10 @@ h1 Users - true -> td - = user.email + = if can?(@conn, :edit, Philomena.Users.User) do + = user.email + - else + i N/A td = cond do @@ -67,8 +70,10 @@ h1 Users = pretty_time user.created_at td - => link "Edit", to: Routes.admin_user_path(@conn, :edit, user) - ' • + = if can?(@conn, :edit, Philomena.Users.User) do + => link to: Routes.admin_user_path(@conn, :edit, user) do + i.fa.fa-fw.fa-user-edit + ' Edit /= if user.deleted_at do / => link_to 'Reactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :create @@ -76,9 +81,14 @@ h1 Users / => link_to 'Deactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :delete /' • - => link "Ban", to: Routes.admin_user_ban_path(@conn, :new, username: user.name) - ' • - => link "Add link", to: Routes.profile_user_link_path(@conn, :new, user) + = if can?(@conn, :index, Philomena.Bans.User) do + => link to: Routes.admin_user_ban_path(@conn, :new, username: user.name) do + i.fa.fa-fw.fa-ban + ' Ban + = if can?(@conn, :edit, Philomena.UserLinks.UserLink) do + => link to: Routes.profile_user_link_path(@conn, :new, user) do + i.fa.fa-fw.fa-link + ' Add link .block__header.block__header--light = pagination