1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-23 00:14:48 +00:00

Merge branch 'search-fixes' into 'main'

Fix global search term

See merge request framasoft/mobilizon!1281
This commit is contained in:
Thomas Citharel 2022-10-06 08:39:37 +00:00
commit 0d6626d55a
2 changed files with 13 additions and 3 deletions

View file

@ -100,7 +100,17 @@
:title="extra.title || extra.label"
: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
v-if="
((extra.type == EventMetadataType.STRING &&

View file

@ -37,7 +37,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
options =
options
|> Keyword.merge(
term: options[:search],
search: options[:term],
startDateMin: to_date(options[:begins_on]),
startDateMax: to_date(options[:ends_on]),
categoryOneOf: options[:category_one_of],
@ -95,7 +95,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
options =
options
|> Keyword.merge(
term: options[:search],
search: options[:term],
languageOneOf: options[:language_one_of],
boostLanguages: options[:boost_languages],
distance: if(options[:radius], do: "#{options[:radius]}_km", else: nil),