mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
Minor cleanup related to staff perms (#48)
This commit is contained in:
parent
a7b1ecf204
commit
13ce241396
3 changed files with 68 additions and 63 deletions
|
@ -70,10 +70,11 @@ h1 Users
|
||||||
= pretty_time user.created_at
|
= pretty_time user.created_at
|
||||||
|
|
||||||
td
|
td
|
||||||
= if can?(@conn, :edit, Philomena.Users.User) do
|
= if can?(@conn, :edit, user) do
|
||||||
=> link to: Routes.admin_user_path(@conn, :edit, user) do
|
=> link to: Routes.admin_user_path(@conn, :edit, user) do
|
||||||
i.fa.fa-fw.fa-user-edit
|
i.fa.fa-fw.fa-user-edit
|
||||||
' Edit
|
' Edit
|
||||||
|
' •
|
||||||
|
|
||||||
/= if user.deleted_at do
|
/= if user.deleted_at do
|
||||||
/ => link_to 'Reactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :create
|
/ => link_to 'Reactivate', admin_user_activation_path(user), data: { confirm: t('are_you_sure') }, method: :create
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
.flex.flex--centered.header--secondary__admin-links.stretched-mobile-links.js-staff-action
|
.flex.flex--centered.header--secondary__admin-links.stretched-mobile-links.js-staff-action
|
||||||
|
= if manages_users?(@conn) do
|
||||||
.dropdown.hide-mobile
|
.dropdown.hide-mobile
|
||||||
a.header__link title="Admin"
|
a.header__link title="Admin"
|
||||||
' A
|
' A
|
||||||
|
@ -64,13 +65,14 @@
|
||||||
span.header__counter__admin
|
span.header__counter__admin
|
||||||
= @dnp_entry_count
|
= @dnp_entry_count
|
||||||
|
|
||||||
|
= if manages_bans?(@conn) do
|
||||||
.dropdown.hide-mobile
|
.dropdown.hide-mobile
|
||||||
a.header__link title="Bans"
|
a.header__link title="Bans"
|
||||||
' B
|
' B
|
||||||
i.fa.fa-caret-down
|
i.fa.fa-caret-down
|
||||||
|
|
||||||
.dropdown__content.dropdown__content-right.js-burger-links
|
.dropdown__content.dropdown__content-right.js-burger-links
|
||||||
= if manages_bans?(@conn) do
|
|
||||||
= link to: Routes.admin_user_ban_path(@conn, :index), class: "header__link" do
|
= link to: Routes.admin_user_ban_path(@conn, :index), class: "header__link" do
|
||||||
i.fa.fa-fw.fa-user>
|
i.fa.fa-fw.fa-user>
|
||||||
' User Bans
|
' User Bans
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
h1 Editing Tag
|
h1 Editing Tag
|
||||||
|
|
||||||
p = link "Edit image", to: Routes.tag_image_path(@conn, :edit, @tag)
|
p = link "Edit image", to: Routes.tag_image_path(@conn, :edit, @tag)
|
||||||
|
= if can?(@conn, :alias, @tag) do
|
||||||
p = link "Edit aliases", to: Routes.tag_alias_path(@conn, :edit, @tag)
|
p = link "Edit aliases", to: Routes.tag_alias_path(@conn, :edit, @tag)
|
||||||
|
|
||||||
= form_for @changeset, Routes.tag_path(@conn, :update, @tag), [class: "form"], fn f ->
|
= form_for @changeset, Routes.tag_path(@conn, :update, @tag), [class: "form"], fn f ->
|
||||||
|
@ -38,6 +39,7 @@ p = link "Edit aliases", to: Routes.tag_alias_path(@conn, :edit, @tag)
|
||||||
|
|
||||||
br
|
br
|
||||||
br
|
br
|
||||||
|
= if can?(@conn, :alias, @tag) do
|
||||||
input.toggle-box#tag-management checked="false" type="checkbox"
|
input.toggle-box#tag-management checked="false" type="checkbox"
|
||||||
label for="tag-management" Tag Processing
|
label for="tag-management" Tag Processing
|
||||||
.toggle-box-container
|
.toggle-box-container
|
||||||
|
|
Loading…
Reference in a new issue