mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-28 05:57:58 +01:00
58 lines
2 KiB
Text
58 lines
2 KiB
Text
elixir:
|
|
header = assigns[:header] || ""
|
|
params = assigns[:params] || assigns[:scope] || []
|
|
scope = assigns[:scope] || []
|
|
tags = assigns[:tags] || []
|
|
route = assigns[:route] || fn p -> Routes.image_path(@conn, :index, p) end
|
|
image_url = fn image -> Routes.image_path(@conn, :show, image, scope) end
|
|
sorted_url = fn image, hit -> Routes.image_path(@conn, :show, image, Keyword.put(scope, :sort, hit["sort"])) end
|
|
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: params
|
|
info = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images
|
|
|
|
.block.block--borderless#imagelist-container
|
|
= if header != "" do
|
|
.block__header.page__header
|
|
=> header
|
|
|
|
.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
|
|
.separator--vertical.separator--secondary
|
|
= hidden_toggle @conn, route, params
|
|
= deleted_toggle @conn, route, params
|
|
= if can?(@conn, :batch_update, Tag) do
|
|
.button__group--standalone.button__group--warning
|
|
= quick_tag @conn
|
|
|
|
= info_row @conn, tags
|
|
|
|
.media-list
|
|
= 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
|
|
|
|
.block.block--borderless.block--spaced-top.flex__row
|
|
.button__group--standalone
|
|
.page__pagination = pagination
|
|
|
|
span.page__info
|
|
= info
|
|
|
|
.flex__spacer
|
|
|
|
.page__info.button__group--standalone
|
|
a href="/settings/edit" title="Display Settings"
|
|
i.fa.fa-cog
|
|
span.hidden--mobile<>
|
|
' Display Settings
|