From c484ca6afe29a2d6c062b99df22485fcbc57cb9b Mon Sep 17 00:00:00 2001 From: fdb-hiroshima <35889323+fdb-hiroshima@users.noreply.github.com> Date: Sun, 10 Nov 2019 15:37:51 +0100 Subject: [PATCH] make search items optional (#693) * make search items optional cf https://github.com/Plume-org/Plume/issues/692#issuecomment-550224029 * eindente --- templates/search/index.rs.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/search/index.rs.html b/templates/search/index.rs.html index 4e84b17b..84cfbb2a 100644 --- a/templates/search/index.rs.html +++ b/templates/search/index.rs.html @@ -9,44 +9,56 @@ @(Input::new("q", "Your query") .input_type("search") .set_prop("style", "-webkit-appearance: none;") + .optional() .html(ctx.1))
@i18n!(ctx.1, "Advanced search") @(Input::new("title", i18n!(ctx.1, "Article title matching these words")) .set_prop("placeholder", i18n!(ctx.1, "Title")) + .optional() .html(ctx.1)) @(Input::new("subtitle", i18n!(ctx.1, "Subtitle matching these words")) .set_prop("placeholder", i18n!(ctx.1, "Subtitle")) + .optional() .html(ctx.1)) @(Input::new("content", i18n!(ctx.1, "Content macthing these words")) .set_prop("placeholder", i18n!(ctx.1, "Body content")) + .optional() .html(ctx.1)) @(Input::new("after", i18n!(ctx.1, "From this date")) .input_type("date") .set_prop("max", now) + .optional() .html(ctx.1)) @(Input::new("before", i18n!(ctx.1, "To this date")) .input_type("date") .set_prop("max", now) + .optional() .html(ctx.1)) @(Input::new("tag", i18n!(ctx.1, "Containing these tags")) .set_prop("placeholder", i18n!(ctx.1, "Tags")) + .optional() .html(ctx.1)) @(Input::new("instance", i18n!(ctx.1, "Posted on one of these instances")) .set_prop("placeholder", i18n!(ctx.1, "Instance domain")) + .optional() .html(ctx.1)) @(Input::new("author", i18n!(ctx.1, "Posted by one of these authors")) .set_prop("placeholder", i18n!(ctx.1, "Author(s)")) + .optional() .html(ctx.1)) @(Input::new("blog", i18n!(ctx.1, "Posted on one of these blogs")) .set_prop("placeholder", i18n!(ctx.1, "Blog title")) + .optional() .html(ctx.1)) @(Input::new("lang", i18n!(ctx.1, "Written in this language")) .set_prop("placeholder", i18n!(ctx.1, "Language")) + .optional() .html(ctx.1)) @(Input::new("license", i18n!(ctx.1, "Published under this license")) .set_prop("placeholder", i18n!(ctx.1, "Article license")) + .optional() .html(ctx.1))