2019-11-30 03:33:15 +01:00
|
|
|
elixir:
|
|
|
|
header = assigns[:header] || ""
|
|
|
|
params = assigns[:params] || assigns[:scope] || []
|
|
|
|
scope = assigns[:scope] || []
|
2019-12-05 22:57:59 +01:00
|
|
|
tags = assigns[:tags] || []
|
2019-11-30 03:33:15 +01:00
|
|
|
route = assigns[:route] || fn p -> Routes.image_path(@conn, :index, p) end
|
|
|
|
image_url = fn image -> Routes.image_path(@conn, :show, image, scope) end
|
2020-08-13 17:32:35 +02:00
|
|
|
sorted_url = fn image, hit -> Routes.image_path(@conn, :show, image, Keyword.put(scope, :sort, hit["sort"])) end
|
2019-11-30 03:33:15 +01:00
|
|
|
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: params
|
|
|
|
info = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images
|
2019-10-09 01:19:57 +02:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.block.block--borderless#imagelist-container
|
|
|
|
= if header != "" do
|
|
|
|
.block__header.page__header
|
2019-10-09 01:19:57 +02:00
|
|
|
=> header
|
2019-12-16 23:11:16 +01:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.block.block--borderless.flex__row.flex--spaced-out
|
|
|
|
= if @images.total_pages > 1 do
|
|
|
|
.button__group--standalone
|
|
|
|
.page__pagination = pagination
|
|
|
|
- else
|
|
|
|
div
|
|
|
|
|
|
|
|
.flex__row
|
|
|
|
.button__group--standalone
|
|
|
|
= random_button @conn, params
|
|
|
|
= hidden_toggle @conn, route, params
|
2019-12-18 01:42:50 +01:00
|
|
|
= deleted_toggle @conn, route, params
|
2023-11-23 17:07:49 +01:00
|
|
|
= if can?(@conn, :batch_update, Tag) do
|
|
|
|
.button__group--standalone.button__group--warning
|
|
|
|
= quick_tag @conn
|
2019-12-16 23:11:16 +01:00
|
|
|
|
2019-12-05 22:57:59 +01:00
|
|
|
= info_row @conn, tags
|
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.media-list
|
2020-08-13 17:32:35 +02:00
|
|
|
= for record <- @images do
|
|
|
|
= case record do
|
|
|
|
- {image, hit} ->
|
|
|
|
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: sorted_url.(image, hit), size: assigns[:size] || :thumb, conn: @conn
|
|
|
|
|
|
|
|
- image ->
|
|
|
|
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image), size: assigns[:size] || :thumb, conn: @conn
|
2019-10-09 01:19:57 +02:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.block.block--borderless.block--spaced-top.flex__row
|
|
|
|
.button__group--standalone
|
|
|
|
.page__pagination = pagination
|
2019-10-09 01:19:57 +02:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
span.page__info
|
2019-10-09 01:19:57 +02:00
|
|
|
= info
|
2020-12-09 03:30:03 +01:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.flex__spacer
|
|
|
|
|
|
|
|
.page__info.button__group--standalone
|
2019-10-09 01:19:57 +02:00
|
|
|
a href="/settings/edit" title="Display Settings"
|
|
|
|
i.fa.fa-cog
|
2023-11-23 17:07:49 +01:00
|
|
|
span.hidden--mobile<>
|
2019-12-12 16:54:41 +01:00
|
|
|
' Display Settings
|