mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-05 00:57:59 +01:00
d1c893248d
* return hits from elasticsearch and add in sort param to templates * use returned hits from elasticsearch for navigation * mix format * fix gallery pagination * add missing fields to search help dropdown * unused variable
45 lines
1.6 KiB
Text
45 lines
1.6 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#imagelist-container
|
|
section.block__header.flex
|
|
span.block__header__title.hide-mobile
|
|
=> header
|
|
|
|
= pagination
|
|
|
|
.flex__right
|
|
= random_button @conn, params
|
|
= hidden_toggle @conn, route, params
|
|
= deleted_toggle @conn, route, params
|
|
= quick_tag @conn
|
|
|
|
= info_row @conn, tags
|
|
|
|
.block__content.js-resizable-media-container
|
|
= 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__header.block__header--light.flex
|
|
= pagination
|
|
|
|
span.block__header__title
|
|
= info
|
|
.flex__right
|
|
a href="/settings/edit" title="Display Settings"
|
|
i.fa.fa-cog
|
|
span.hide-mobile.hide-limited-desktop<>
|
|
' Display Settings
|