h2 ' DNP Listing for Tag = @dnp_entry.tag.name .block .block__header span DNP Information = if can?(@conn, :edit, @dnp_entry) do = link "Edit listing", to: Routes.dnp_entry_path(@conn, :edit, @dnp_entry, tag_id: @dnp_entry.tag_id) = link "Back to DNP List", to: Routes.dnp_entry_path(@conn, :index) .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 = if can?(@conn, :show_reason, @dnp_entry) do tr td Reason: td = @reason = if can?(@conn, :show_feedback, @dnp_entry) do tr td Instructions: td = @instructions tr td Feedback: td = @dnp_entry.feedback tr td Status: td = 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 h4 Mod Notes = render PhilomenaWeb.Admin.ModNoteView, "_table.html", mod_notes: @mod_notes, conn: @conn = link "Add New Note", to: Routes.admin_mod_note_path(@conn, :new, notable_id: @dnp_entry.id, notable_type: "DnpEntry")