philomena/lib/philomena_web/templates/dnp_entry/show.html.slime

79 lines
3 KiB
Text
Raw Normal View History

2019-11-29 22:47:41 +01:00
h2
' DNP Listing for Tag
= @dnp_entry.tag.name
.block
.block__header
2023-11-23 17:07:49 +01:00
span DNP Information
2019-12-12 22:44:50 +01:00
= if can?(@conn, :edit, @dnp_entry) do
2024-06-06 22:28:35 +02:00
= link "Edit listing", to: ~p"/dnp/#{@dnp_entry}/edit?#{[tag_id: @dnp_entry.tag_id]}"
2019-12-12 22:44:50 +01:00
2024-06-06 22:28:35 +02:00
= link "Back to DNP List", to: ~p"/dnp"
2019-11-29 22:47:41 +01:00
.block__content
table.table
tbody
tr
td Created:
td
= pretty_time(@dnp_entry.created_at)
tr
td Tag:
td
= render PhilomenaWeb.TagView, "_tag.html", tag: @dnp_entry.tag, conn: @conn
tr
td Restriction Type:
td
= @dnp_entry.dnp_type
tr
td Conditions:
td
= @conditions
2019-11-29 22:47:41 +01:00
= if can?(@conn, :show_reason, @dnp_entry) do
tr
td Reason:
td
= @reason
2019-11-29 22:47:41 +01:00
= if can?(@conn, :show_feedback, @dnp_entry) do
tr
td Instructions:
td
= @instructions
2019-11-29 22:47:41 +01:00
tr
td Feedback:
td
= @dnp_entry.feedback
tr
td Status:
td
2019-12-12 22:44:50 +01:00
= String.capitalize(@dnp_entry.aasm_state)
2019-12-17 18:29:18 +01:00
= if can?(@conn, :index, Philomena.DnpEntries.DnpEntry) do
= case @dnp_entry.aasm_state do
- s when s in ["requested", "claimed"] ->
2024-06-06 22:28:35 +02:00
=> link "Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
' •
2024-06-06 22:28:35 +02:00
=> link "Approve", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "listed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
' •
2024-06-06 22:28:35 +02:00
=> link "Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- "listed" ->
2024-06-06 22:28:35 +02:00
=> link "Rescind", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]
' •
2024-06-06 22:28:35 +02:00
= link "Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- s when s in ["rescinded", "acknowledged"] ->
2024-06-06 22:28:35 +02:00
=> link "Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]
' •
2024-06-06 22:28:35 +02:00
= link "Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- _state ->
2024-06-06 22:28:35 +02:00
=> link "Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
2019-12-17 18:29:18 +01:00
= if assigns[:mod_notes] do
h4 Mod Notes
= render PhilomenaWeb.Admin.ModNoteView, "_table.html", mod_notes: @mod_notes, conn: @conn
2024-06-06 22:28:35 +02:00
= link "Add New Note", to: ~p"/admin/mod_notes/new?#{[notable_id: @dnp_entry.id, notable_type: "DnpEntry"]}"