diff --git a/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php b/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php index 572928a38d..104230411d 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php +++ b/lib/Alchemy/Phrasea/Core/Configuration/DisplaySettingService.php @@ -41,7 +41,8 @@ class DisplaySettingService 'css' => '000000', 'start_page_query' => '', 'order_collection_by' => self::ORDER_BY_ADMIN, - 'start_page' => 'QUERY', + 'start_page' => 'LAST_QUERY', + 'last_jsonquery' => '', 'rollover_thumbnail' => 'caption', 'technical_display' => '1', 'doctype_display' => '1', diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 0097132945..6bb9bb39c2 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -270,7 +270,12 @@ {% set startq = startq ~ "\",\"enabled\":true}]}}" %}
{% elseif app['settings'].getUserSetting(app.getAuthenticatedUser(), 'start_page') == 'LAST_QUERY' %} - + {% set startq = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'last_jsonquery') %} + {% if startq is empty %} + {% set startq = "{\"query\":{\"_ux_zone\":\"\",\"type\":\"CLAUSES\",\"must_match\":\"ALL\",\"enabled\":true,\"clauses\":[{\"_ux_zone\":\"FULLTEXT\",\"type\":\"FULLTEXT\",\"value\":\"" %} + {% set startq = startq ~ "\",\"enabled\":true}]}}" %} + {% endif %} + {% endif %}