mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
add controls to show pages for dnp and user link (derpibooru/philomena#181)
This commit is contained in:
parent
56487e3933
commit
93e6979202
2 changed files with 36 additions and 0 deletions
|
@ -50,6 +50,28 @@ h2
|
||||||
td
|
td
|
||||||
= String.capitalize(@dnp_entry.aasm_state)
|
= String.capitalize(@dnp_entry.aasm_state)
|
||||||
|
|
||||||
|
= if can?(@conn, :index, Philomena.DnpEntries.DnpEntry) do
|
||||||
|
= case @dnp_entry.aasm_state do
|
||||||
|
- s when s in ["requested", "claimed"] ->
|
||||||
|
=> link "Claim", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "claimed"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
' •
|
||||||
|
=> link "Approve", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "listed"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
' •
|
||||||
|
=> link "Close", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "closed"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
|
||||||
|
- "listed" ->
|
||||||
|
=> link "Rescind", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "rescinded"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
' •
|
||||||
|
= link "Close", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "closed"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
|
||||||
|
- s when s in ["rescinded", "acknowledged"] ->
|
||||||
|
=> link "Claim", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "acknowledged"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
' •
|
||||||
|
= link "Close", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "closed"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
|
||||||
|
- _state ->
|
||||||
|
=> link "Claim", to: Routes.admin_dnp_entry_transition_path(@conn, :create, @dnp_entry, state: "claimed"), data: [method: "post", confirm: "Are you really, really sure?"]
|
||||||
|
|
||||||
= if assigns[:mod_notes] do
|
= if assigns[:mod_notes] do
|
||||||
h4 Mod Notes
|
h4 Mod Notes
|
||||||
= render PhilomenaWeb.Admin.ModNoteView, "_table.html", mod_notes: @mod_notes, conn: @conn
|
= render PhilomenaWeb.Admin.ModNoteView, "_table.html", mod_notes: @mod_notes, conn: @conn
|
||||||
|
|
|
@ -56,4 +56,18 @@ h3 Associated tag
|
||||||
- else
|
- else
|
||||||
p There is no tag associated with this link.
|
p There is no tag associated with this link.
|
||||||
|
|
||||||
|
= if can?(@conn, :index, Philomena.UserLinks.UserLink) do
|
||||||
|
p
|
||||||
|
=> link "Edit", to: Routes.profile_user_link_path(@conn, :edit, @user, @user_link)
|
||||||
|
' •
|
||||||
|
=> link "Verify", to: Routes.admin_user_link_verification_path(@conn, :create, @user_link), method: :post
|
||||||
|
' •
|
||||||
|
=> link "Reject", to: Routes.admin_user_link_reject_path(@conn, :create, @user_link), method: :post
|
||||||
|
= if not verified?(@user_link) do
|
||||||
|
' •
|
||||||
|
= if contacted?(@user_link) do
|
||||||
|
' Artist contacted
|
||||||
|
- else
|
||||||
|
= link "Artist contacted", to: Routes.admin_user_link_contact_path(@conn, :create, @user_link), method: :post
|
||||||
|
|
||||||
= link "Back", to: Routes.profile_user_link_path(@conn, :index, @user)
|
= link "Back", to: Routes.profile_user_link_path(@conn, :index, @user)
|
||||||
|
|
Loading…
Reference in a new issue