philomena/lib/philomena_web/templates/admin/artist_link/index.html.slime

79 lines
2.7 KiB
Text
Raw Normal View History

h1 Artist Links
2019-12-10 02:21:49 +01:00
p Link creation is done via the Users menu.
p Verifying a link will automatically award an artist badge if the link is public, no artist badge exists, and an "artist:" tag is specified.
= form_for :artist_link, ~p"/admin/artist_links", [method: "get", class: "hform"], fn f ->
2019-12-10 02:21:49 +01:00
.field
= text_input f, :q, name: :q, value: @conn.params["q"], class: "input hform__text", placeholder: "Search query", autocapitalize: "none"
= submit "Search", class: "hform__button button"
- route = fn p -> ~p"/admin/artist_links?#{p}" end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @artist_links, route: route, params: link_scope(@conn), conn: @conn
2019-12-10 02:21:49 +01:00
.block
.block__header
= if @conn.params["all"] do
= link "Show unverified only", to: ~p"/admin/artist_links"
2019-12-10 02:21:49 +01:00
- else
= link "Show all", to: ~p"/admin/artist_links?#{[all: "true"]}"
2019-12-10 02:21:49 +01:00
= pagination
.block__content
table.table
thead
tr
th State
th User
th URL
th Options
th Mark
th Public
tbody
= for link <- @artist_links do
2019-12-10 02:21:49 +01:00
tr
td class=link_state_class(link)
strong
= link_state_name(link)
= if contacted?(link) do
br
' by
= link.contacted_by_user.name
br
| (
= pretty_time link.contacted_at
| )
td
= render PhilomenaWeb.UserAttributionView, "_user.html", object: link, awards: true, conn: @conn
= render PhilomenaWeb.TagView, "_tag_list.html", tags: display_order(link.user.linked_tags), conn: @conn
td
= link String.slice(link.uri, 0, 100), to: link.uri
= if link.tag do
br
= render PhilomenaWeb.TagView, "_tag.html", tag: link.tag, conn: @conn
td
=> link "View", to: ~p"/profiles/#{link.user}/artist_links/#{link}"
2019-12-10 02:21:49 +01:00
' &bull;
= link "Edit", to: ~p"/profiles/#{link.user}/artist_links/#{link}/edit"
2019-12-10 02:21:49 +01:00
td
=> link "Verify", to: ~p"/admin/artist_links/#{link}/verification", method: :post
2019-12-10 02:21:49 +01:00
' &bull;
=> link "Reject", to: ~p"/admin/artist_links/#{link}/reject", method: :post
2019-12-10 02:21:49 +01:00
br
= if not verified?(link) do
= if contacted?(link) do
' Artist contacted
- else
= link "Artist contacted", to: ~p"/admin/artist_links/#{link}/contact", method: :post
2019-12-10 02:21:49 +01:00
td
= public_text(link)
.block__header.block__header--light
= pagination