From 48bd30ab9aec11cc3560d3fb2157ba5ad7e320cd Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Tue, 4 Jun 2019 13:09:45 +0400 Subject: [PATCH 1/2] PHRAS-2376 #comment update yarn.lock --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a48c1808f9..28d093ec09 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "normalize-css": "^2.1.0", "npm": "^6.0.0", "npm-modernizr": "^2.8.3", - "phraseanet-production-client": "^0.34.15-d", + "phraseanet-production-client": "^0.34.16-d", "requirejs": "^2.3.5", "tinymce": "^4.0.28", "underscore": "^1.8.3", diff --git a/yarn.lock b/yarn.lock index b1a1a03542..2add336009 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7560,10 +7560,10 @@ phraseanet-common@^0.4.1: js-cookie "^2.1.0" pym.js "^1.3.1" -phraseanet-production-client@^0.34.15-d: - version "0.34.15-d" - resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.15-d.tgz#58335ce4747e00b58d2b31f1e1f61c4e9c0ebfb0" - integrity sha512-BQHPj7tO285KawxZh+M7ki2aKKqFil+pHxSgdFXcpPmfHqV4vyew7h2QL4XL8E6fu18tKIxxpQ6k2EDrKeCO4w== +phraseanet-production-client@^0.34.16-d: + version "0.34.16-d" + resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.16-d.tgz#981927b4475927f83a7bde98d704ec57686af189" + integrity sha512-Jvapwr63VBYcYlcMQ3OEV3jcCjmWYCt2EtFFLX8YRKQhf+drT1JfERj069lDTtoc3fSGAz5MUaZF/R5EvPDY1Q== dependencies: "@mapbox/mapbox-gl-language" "^0.9.2" "@turf/turf" "^5.1.6" From 3b120fb020750942344c8f4deffa3700ec311228 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 4 Jun 2019 12:07:32 +0200 Subject: [PATCH 2/2] PHRAS-2573_last-query-as-default_4.1 - set default default user settings to "replay last_query on login" - set a default (empty) query for first login --- .../Phrasea/Core/Configuration/DisplaySettingService.php | 3 ++- templates/web/prod/index.html.twig | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 %}