Merge branch 'search-fixes' into 'main'
Fix global search term See merge request framasoft/mobilizon!1281
This commit is contained in:
commit
0d6626d55a
@ -100,7 +100,17 @@
|
|||||||
:title="extra.title || extra.label"
|
:title="extra.title || extra.label"
|
||||||
:key="extra.key"
|
:key="extra.key"
|
||||||
>
|
>
|
||||||
<template #icon> <o-icon :icon="extra.icon" customSize="36" /> </template>
|
<template #icon>
|
||||||
|
<img
|
||||||
|
v-if="extra.icon && extra.icon.substring(0, 7) === 'mz:icon'"
|
||||||
|
:src="`/img/${extra.icon.substring(8)}_monochrome.svg`"
|
||||||
|
width="36"
|
||||||
|
height="36"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<o-icon v-else-if="extra.icon" :icon="extra.icon" customSize="36" />
|
||||||
|
<o-icon v-else customSize="36" icon="help-circle" />
|
||||||
|
</template>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
((extra.type == EventMetadataType.STRING &&
|
((extra.type == EventMetadataType.STRING &&
|
||||||
|
@ -37,7 +37,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
|
|||||||
options =
|
options =
|
||||||
options
|
options
|
||||||
|> Keyword.merge(
|
|> Keyword.merge(
|
||||||
term: options[:search],
|
search: options[:term],
|
||||||
startDateMin: to_date(options[:begins_on]),
|
startDateMin: to_date(options[:begins_on]),
|
||||||
startDateMax: to_date(options[:ends_on]),
|
startDateMax: to_date(options[:ends_on]),
|
||||||
categoryOneOf: options[:category_one_of],
|
categoryOneOf: options[:category_one_of],
|
||||||
@ -95,7 +95,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
|
|||||||
options =
|
options =
|
||||||
options
|
options
|
||||||
|> Keyword.merge(
|
|> Keyword.merge(
|
||||||
term: options[:search],
|
search: options[:term],
|
||||||
languageOneOf: options[:language_one_of],
|
languageOneOf: options[:language_one_of],
|
||||||
boostLanguages: options[:boost_languages],
|
boostLanguages: options[:boost_languages],
|
||||||
distance: if(options[:radius], do: "#{options[:radius]}_km", else: nil),
|
distance: if(options[:radius], do: "#{options[:radius]}_km", else: nil),
|
||||||
|
Loading…
Reference in New Issue
Block a user