mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
add redirect stub to gallery show page
This commit is contained in:
parent
38447e7e9c
commit
bdec219d23
2 changed files with 6 additions and 3 deletions
|
@ -4,7 +4,7 @@ defmodule PhilomenaWeb.GalleryController do
|
|||
alias Philomena.Galleries.Gallery
|
||||
import Ecto.Query
|
||||
|
||||
plug :load_resource, model: Gallery, only: [:show], preload: [:creator, thumbnail: :tags]
|
||||
plug :load_resource, model: Gallery, only: [:show]
|
||||
|
||||
def index(conn, params) do
|
||||
galleries =
|
||||
|
@ -24,7 +24,10 @@ defmodule PhilomenaWeb.GalleryController do
|
|||
render(conn, "index.html", galleries: galleries, layout_class: "layout--wide")
|
||||
end
|
||||
|
||||
def show(_conn, _params) do
|
||||
def show(conn, _params) do
|
||||
# stub
|
||||
conn
|
||||
|> redirect(to: Routes.search_path(conn, :index, q: "gallery_id:#{conn.assigns.gallery_id}"))
|
||||
end
|
||||
|
||||
defp parse_search(%{"gallery" => gallery_params}) do
|
||||
|
|
|
@ -12,7 +12,7 @@ header.header
|
|||
i.fa.fa-upload
|
||||
|
||||
form.header__search.flex.flex--no-wrap.flex--centered action="/search" method="get"
|
||||
input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=assigns[:search_query] placeholder="Search" autocapitalize="none"
|
||||
input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=(assigns[:search_query] || @conn.params["q"]) placeholder="Search" autocapitalize="none"
|
||||
|
||||
button.header__search__button type="submit" title='Search'
|
||||
i.fa-embedded--search
|
||||
|
|
Loading…
Reference in a new issue