mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
47 lines
1.9 KiB
Text
47 lines
1.9 KiB
Text
elixir:
|
|
route = fn p -> Routes.gallery_path(@conn, :index, p) end
|
|
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @galleries, route: route
|
|
|
|
.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
|
|
= submit "Search", class: "button button--state-primary"
|
|
|
|
.column-layout__main
|
|
.block
|
|
.block__header
|
|
= pagination
|
|
|
|
.block__content.js-resizable-media-container
|
|
= 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!
|
|
|
|
.block__header.block__header--light
|
|
= pagination
|