add 'search posts' button to topic header

This commit is contained in:
byte[] 2019-12-07 11:32:04 -05:00
parent ae189bafce
commit 5cdc647208
3 changed files with 5 additions and 6 deletions

View file

@ -43,9 +43,9 @@ defmodule Philomena.Posts.Query do
int_fields = ~W(id) int_fields = ~W(id)
date_fields = ~W(created_at updated_at) date_fields = ~W(created_at updated_at)
literal_fields = ~W(image_id) literal_fields = ~W(forum_id topic_id)
ngram_fields = ~W(body subject) ngram_fields = ~W(body subject)
custom_fields = ~W(author user_id forum_id topic_id) custom_fields = ~W(author user_id)
default_field = "body" default_field = "body"
transforms = %{ transforms = %{
"user_id" => &Philomena.Posts.Query.user_id_transform/2, "user_id" => &Philomena.Posts.Query.user_id_transform/2,

View file

@ -22,7 +22,6 @@ defmodule PhilomenaWeb.PostController do
%{term: %{access_level: "normal"}}, %{term: %{access_level: "normal"}},
], ],
must_not: [ must_not: [
%{terms: %{image_tag_ids: conn.assigns.current_filter.hidden_tag_ids}},
%{term: %{hidden_from_users: true}} %{term: %{hidden_from_users: true}}
] ]
} }

View file

@ -11,9 +11,9 @@ h1 = @topic.title
=> link(@forum.name, to: Routes.forum_path(@conn, :show, @forum)) => link(@forum.name, to: Routes.forum_path(@conn, :show, @forum))
' » ' »
=> link(@topic.title, to: Routes.forum_topic_path(@conn, :show, @forum, @topic)) => link(@topic.title, to: Routes.forum_topic_path(@conn, :show, @forum, @topic))
/a href=posts_path(forum_id: @forum.id, subject: @topic.title) a href=Routes.post_path(@conn, :index, pq: "topic_id:#{@topic.id}")
/ i.fa.fa-fw.fa-search> i.fa.fa-fw.fa-search>
/ | Search Posts ' Search Posts
.flex.flex--wrap.block__header.block__header--light .flex.flex--wrap.block__header.block__header--light
.flex--fixed .flex--fixed
= pagination = pagination