related to #1931 New message if no filters are filled

This commit is contained in:
MatthieuLP
2023-07-19 10:26:48 +02:00
parent 356f6ff83a
commit da62e80e82
4 changed files with 14 additions and 2 deletions
+2
View File
@@ -426,4 +426,6 @@ $lang['You can try to edit your filters and perform a new search.'] = 'You can t
$lang['File type'] = 'File type';
$lang['Choose filters'] = 'Choose filters';
$lang['Clear'] = 'Clear';
$lang['Fill in the filters to start a search'] = 'Fill in the filters to start a search';
$lang['Pre-established filters are proposed, but you can add or remove them using the "Choose filters" button.'] = 'Pre-established filters are proposed, but you can add or remove them using the "Choose filters" button.';
?>
+2
View File
@@ -431,3 +431,5 @@ $lang['You can try to edit your filters and perform a new search.'] = 'Vous pouv
$lang['File type'] = 'Type de fichier';
$lang['Choose filters'] = 'Choisir les filtres';
$lang['Clear'] = 'Vider';
$lang['Fill in the filters to start a search'] = 'Complétez les filtres pour lancer une recherche';
$lang['Pre-established filters are proposed, but you can add or remove them using the "Choose filters" button.'] = 'Des filtres préétablis vous sont proposés, mais vous pouvez aussi en ajouter ou en retirer grâce au bouton “Choisir les filtres”.';
+5
View File
@@ -233,6 +233,11 @@ $(document).ready(function () {
PS_params.filetypes = global_params.fields.filetypes.length > 0 ? global_params.fields.filetypes : '';
}
// Adapt no result message
if ($(".filter-filled").length === 0) {
$(".mcs-no-result .text .top").html(str_empty_search_top_alt);
$(".mcs-no-result .text .bot").html(str_empty_search_bot_alt);
}
/**
* Filter Manager
+5 -2
View File
@@ -25,6 +25,9 @@ str_author_widget_label = "{'Author'|@translate}";
str_added_by_widget_label = "{'Added by'|@translate}";
str_filetypes_widget_label = "{'File type'|@translate}";
str_empty_search_top_alt = "{'Fill in the filters to start a search'|@translate}";
str_empty_search_bot_alt = "{'Pre-established filters are proposed, but you can add or remove them using the "Choose filters" button.'|@translate}";
{/footer_script}
{if isset($errors) or isset($infos)}
@@ -522,8 +525,8 @@ str_filetypes_widget_label = "{'File type'|@translate}";
{else if !empty($SEARCH_ID)}
<div class="mcs-no-result">
<div class="text">
<span>{'No results are available.'|@translate}</span>
<span>{'You can try to edit your filters and perform a new search.'|translate}</span>
<span class="top">{'No results are available.'|@translate}</span>
<span class="bot">{'You can try to edit your filters and perform a new search.'|translate}</span>
</div>
</div>
{/if}