2019-11-18 05:47:09 +01:00
|
|
|
elixir:
|
|
|
|
route = fn p -> Routes.gallery_path(@conn, :index, p) end
|
2020-06-16 19:03:58 +02:00
|
|
|
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @galleries, route: route, params: [gallery: @conn.params["gallery"]]
|
2019-11-18 05:47:09 +01:00
|
|
|
|
|
|
|
.column-layout
|
|
|
|
.column-layout__left
|
|
|
|
.block
|
|
|
|
.block__content
|
|
|
|
h3 Search Galleries
|
|
|
|
|
|
|
|
= form_for @conn, Routes.gallery_path(@conn, :index), [as: :gallery, method: "get", class: "hform"], fn f ->
|
|
|
|
.field = label f, :title, "Title"
|
|
|
|
.field = text_input f, :title, class: "input hform__text", placeholder: "Gallery title (* as wildcard)"
|
|
|
|
|
|
|
|
.field = label f, :description, "Description"
|
|
|
|
.field = textarea f, :description, class: "input hform__text", placeholder: "Gallery description"
|
|
|
|
|
|
|
|
.field = label f, :creator, "Creator"
|
|
|
|
.field = text_input f, :creator, class: "input hform__text", placeholder: "Gallery creator (exact match)"
|
|
|
|
|
|
|
|
.field = label f, :include_image, "Include image"
|
|
|
|
.field = number_input f, :include_image, class: "input hform__text", placeholder: "Image ID (e.g. 100)"
|
|
|
|
|
|
|
|
.field = label f, :sf, "Sort by"
|
|
|
|
.field
|
|
|
|
=> select f, :sf, ["Creation Date": "created_at", "Update Date": "updated_at", "Image Count": "image_count", "Relevance": "_score"], class: "input"
|
|
|
|
=> select f, :sd, ["Descending": "desc", "Ascending": "asc"], class: "input"
|
|
|
|
|
|
|
|
.field
|
2024-04-28 18:51:40 +02:00
|
|
|
= submit "Search", class: "button button--primary"
|
2021-09-05 20:58:04 +02:00
|
|
|
.block
|
|
|
|
.block__header
|
|
|
|
a href="/galleries/new" title="Create Gallery"
|
|
|
|
' Create Gallery
|
2019-11-18 05:47:09 +01:00
|
|
|
|
|
|
|
.column-layout__main
|
|
|
|
.block
|
2020-12-11 17:53:40 +01:00
|
|
|
.block__header.page__header
|
|
|
|
.page__pagination = pagination
|
2019-11-18 05:47:09 +01:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.media-list
|
2019-12-16 07:15:59 +01:00
|
|
|
= if Enum.any?(@galleries) do
|
|
|
|
= for gallery <- @galleries do
|
|
|
|
= render PhilomenaWeb.GalleryView, "_gallery.html", gallery: gallery, conn: @conn
|
|
|
|
|
|
|
|
- else
|
|
|
|
.block.block--fixed.block--no-margin.block--warning
|
|
|
|
' No galleries found!
|
2019-11-18 05:47:09 +01:00
|
|
|
|
2020-12-11 17:53:40 +01:00
|
|
|
.block__header.block__header--light.page__header
|
|
|
|
.page__pagination = pagination
|