mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27: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
|
||||
|
||||
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
|
||||
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
|
||||
|
|
|
@ -1,44 +1,45 @@
|
|||
.flex.flex--centered.header--secondary__admin-links.stretched-mobile-links.js-staff-action
|
||||
.dropdown.hide-mobile
|
||||
a.header__link title="Admin"
|
||||
' A
|
||||
i.fa.fa-caret-down
|
||||
= if manages_users?(@conn) do
|
||||
.dropdown.hide-mobile
|
||||
a.header__link title="Admin"
|
||||
' A
|
||||
i.fa.fa-caret-down
|
||||
|
||||
.dropdown__content.js-burger-links
|
||||
= if manages_site_notices?(@conn) do
|
||||
= link to: Routes.admin_site_notice_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-info-circle>
|
||||
' Site Notices
|
||||
.dropdown__content.js-burger-links
|
||||
= if manages_site_notices?(@conn) do
|
||||
= link to: Routes.admin_site_notice_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-info-circle>
|
||||
' Site Notices
|
||||
|
||||
= if manages_users?(@conn) do
|
||||
= link to: Routes.admin_user_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-users>
|
||||
' Users
|
||||
= if manages_users?(@conn) do
|
||||
= link to: Routes.admin_user_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-users>
|
||||
' Users
|
||||
|
||||
= if manages_forums?(@conn) do
|
||||
= link to: Routes.admin_forum_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-paragraph>
|
||||
' Forums
|
||||
= if manages_forums?(@conn) do
|
||||
= link to: Routes.admin_forum_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-paragraph>
|
||||
' Forums
|
||||
|
||||
= if manages_ads?(@conn) do
|
||||
= link to: Routes.admin_advert_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-shopping-bag>
|
||||
' Adverts
|
||||
= if manages_ads?(@conn) do
|
||||
= link to: Routes.admin_advert_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-shopping-bag>
|
||||
' Adverts
|
||||
|
||||
= if manages_badges?(@conn) do
|
||||
= link to: Routes.admin_badge_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-trophy>
|
||||
' Badges
|
||||
= if manages_badges?(@conn) do
|
||||
= link to: Routes.admin_badge_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-trophy>
|
||||
' Badges
|
||||
|
||||
= if manages_static_pages?(@conn) do
|
||||
= link to: Routes.page_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-sticky-note>
|
||||
' Pages
|
||||
= if manages_static_pages?(@conn) do
|
||||
= link to: Routes.page_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-sticky-note>
|
||||
' Pages
|
||||
|
||||
= if manages_mod_notes?(@conn) do
|
||||
= link to: Routes.admin_mod_note_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-sticky-note>
|
||||
' Mod Notes
|
||||
= if manages_mod_notes?(@conn) do
|
||||
= link to: Routes.admin_mod_note_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-sticky-note>
|
||||
' Mod Notes
|
||||
|
||||
= if @duplicate_report_count do
|
||||
= link to: Routes.duplicate_report_path(@conn, :index), class: "header__link", title: "Duplicates" do
|
||||
|
@ -64,21 +65,22 @@
|
|||
span.header__counter__admin
|
||||
= @dnp_entry_count
|
||||
|
||||
.dropdown.hide-mobile
|
||||
a.header__link title="Bans"
|
||||
' B
|
||||
i.fa.fa-caret-down
|
||||
= if manages_bans?(@conn) do
|
||||
.dropdown.hide-mobile
|
||||
a.header__link title="Bans"
|
||||
' B
|
||||
i.fa.fa-caret-down
|
||||
|
||||
.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
|
||||
i.fa.fa-fw.fa-user>
|
||||
' User Bans
|
||||
.dropdown__content.dropdown__content-right.js-burger-links
|
||||
|
||||
= link to: Routes.admin_subnet_ban_path(@conn, :index), class: "header__link" do
|
||||
i.fab.fa-fw.fa-internet-explorer>
|
||||
' IP Bans
|
||||
= link to: Routes.admin_user_ban_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-user>
|
||||
' User Bans
|
||||
|
||||
= link to: Routes.admin_fingerprint_ban_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-desktop>
|
||||
' FP Bans
|
||||
= link to: Routes.admin_subnet_ban_path(@conn, :index), class: "header__link" do
|
||||
i.fab.fa-fw.fa-internet-explorer>
|
||||
' IP Bans
|
||||
|
||||
= link to: Routes.admin_fingerprint_ban_path(@conn, :index), class: "header__link" do
|
||||
i.fa.fa-fw.fa-desktop>
|
||||
' FP Bans
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
h1 Editing Tag
|
||||
|
||||
p = link "Edit image", to: Routes.tag_image_path(@conn, :edit, @tag)
|
||||
p = link "Edit aliases", to: Routes.tag_alias_path(@conn, :edit, @tag)
|
||||
= if can?(@conn, :alias, @tag) do
|
||||
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 ->
|
||||
= if @changeset.action do
|
||||
|
@ -38,17 +39,18 @@ p = link "Edit aliases", to: Routes.tag_alias_path(@conn, :edit, @tag)
|
|||
|
||||
br
|
||||
br
|
||||
input.toggle-box#tag-management checked="false" type="checkbox"
|
||||
label for="tag-management" Tag Processing
|
||||
.toggle-box-container
|
||||
.toggle-box-container__content
|
||||
= button_to "Rebuild index", Routes.tag_reindex_path(@conn, :create, @tag), method: "post", class: "button", data: [confirm: "Are you really, really sure?", disable_with: raw("Reindexing…")]
|
||||
p Use this if the tag displays the wrong number of images or returns the wrong search results.
|
||||
= if can?(@conn, :alias, @tag) do
|
||||
input.toggle-box#tag-management checked="false" type="checkbox"
|
||||
label for="tag-management" Tag Processing
|
||||
.toggle-box-container
|
||||
.toggle-box-container__content
|
||||
= button_to "Rebuild index", Routes.tag_reindex_path(@conn, :create, @tag), method: "post", class: "button", data: [confirm: "Are you really, really sure?", disable_with: raw("Reindexing…")]
|
||||
p Use this if the tag displays the wrong number of images or returns the wrong search results.
|
||||
|
||||
= button_to "Destroy tag", Routes.tag_path(@conn, :delete, @tag), method: "delete", class: "button button--state-danger", data: [confirm: "Are you really, really sure?", disable_with: raw("Deleting…")]
|
||||
p
|
||||
strong Irreversible. Use with extreme caution!
|
||||
ul
|
||||
li Intended use is removing garbage tags.
|
||||
li Will remove tag changes on the tag, but not on images or profiles.
|
||||
li Will unset the alias if this tag is an alias target, and will automatically remove any implications that exist to it.
|
||||
= button_to "Destroy tag", Routes.tag_path(@conn, :delete, @tag), method: "delete", class: "button button--state-danger", data: [confirm: "Are you really, really sure?", disable_with: raw("Deleting…")]
|
||||
p
|
||||
strong Irreversible. Use with extreme caution!
|
||||
ul
|
||||
li Intended use is removing garbage tags.
|
||||
li Will remove tag changes on the tag, but not on images or profiles.
|
||||
li Will unset the alias if this tag is an alias target, and will automatically remove any implications that exist to it.
|
||||
|
|
Loading…
Reference in a new issue