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

74 lines
1.7 KiB
Text
Raw Permalink Normal View History

- route = fn p -> ~p"/admin/adverts?#{p}" end
2019-12-15 03:54:16 +01:00
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @adverts, route: route
.block
.block__header
a href=~p"/admin/adverts/new"
2019-12-15 03:54:16 +01:00
i.fa.fa-plus>
' New advert
= pagination
.block__content
table.table
thead
tr
th.table--adverts__image Image
th Ad Information
th Start
th Finish
th Enabled
th Restriction
th Statistics
th Options
tbody
= for advert <- @adverts do
tr
td
img src=advert_image_url(advert)
td
strong
' URL:
= link advert.link, to: advert.link
br
strong
' Title:
em
= advert.title
= if present?(advert.notes) do
br
strong
' Notes:
= advert.notes
td class=time_column_class(advert.start_date)
= pretty_time advert.start_date
td class=time_column_class(advert.finish_date)
= pretty_time advert.finish_date
td
= live_text(advert)
td
= advert.restrictions
td
' Impressions:
= advert.impressions
br
' Clicks:
= advert.clicks
td
=> link "Edit", to: ~p"/admin/adverts/#{advert}/edit"
2019-12-15 03:54:16 +01:00
' &bull;
= link "Destroy", to: ~p"/admin/adverts/#{advert}", data: [confirm: "Are you really, really sure?", method: "delete"]
2019-12-15 03:54:16 +01:00
.block__header.block__header--light
= pagination