From f7a6ae2f3ffbe8fe6ccf3c092cab814669100e3d Mon Sep 17 00:00:00 2001 From: aynsix Date: Mon, 2 Dec 2019 15:34:28 +0400 Subject: [PATCH 01/15] patch for configuration.yml --- lib/Alchemy/Phrasea/Core/Version.php | 2 +- lib/classes/patch/410alpha20a.php | 99 ++++++++++++++++++++++++++++ lib/conf.d/configuration.yml | 2 +- 3 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 lib/classes/patch/410alpha20a.php diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index c209691c0b..5f488cdd5a 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -16,7 +16,7 @@ class Version /** * @var string */ - private $number = '4.1.0-alpha.19a'; + private $number = '4.1.0-alpha.20a'; /** * @var string diff --git a/lib/classes/patch/410alpha20a.php b/lib/classes/patch/410alpha20a.php new file mode 100644 index 0000000000..610a921cd0 --- /dev/null +++ b/lib/classes/patch/410alpha20a.php @@ -0,0 +1,99 @@ +release; + } + + /** + * {@inheritdoc} + */ + public function concern() + { + return $this->concern; + } + + /** + * {@inheritdoc} + */ + public function require_all_upgrades() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function getDoctrineMigrations() + { + return []; + } + + /** + * {@inheritdoc} + */ + public function apply(base $appbox, Application $app) + { + // fix embed-bundle keys + if ($app['conf']->has(['embed_bundle', 'video', 'available-speeds'])) { + $availableSpeed = $app['conf']->get(['embed_bundle', 'video', 'available-speeds']); + $app['conf']->remove(['embed_bundle', 'video', 'available-speeds']); + $app['conf']->set(['embed_bundle', 'video', 'available_speeds'], $availableSpeed); + } + + if ($app['conf']->has(['embed_bundle', 'audio', 'available-speeds'])) { + $availableSpeed = $app['conf']->get(['embed_bundle', 'audio', 'available-speeds']); + $app['conf']->remove(['embed_bundle', 'audio', 'available-speeds']); + $app['conf']->set(['embed_bundle', 'audio', 'available_speeds'], $availableSpeed); + } + + if ($app['conf']->has(['embed_bundle', 'document', 'enable-pdfjs'])) { + $enablePdfjs = $app['conf']->get(['embed_bundle', 'document', 'enable-pdfjs']); + $app['conf']->remove(['embed_bundle', 'document', 'enable-pdfjs']); + $app['conf']->set(['embed_bundle', 'document', 'enable_pdfjs'], $enablePdfjs); + } + + // geoloc section change replace 'name' to 'map-provider' + if ($app['conf']->has(['geocoding-providers', 0, 'name'])) { + $geocodingName = $app['conf']->get(['geocoding-providers', 0, 'name']); + $app['conf']->remove(['geocoding-providers', 0, 'name']); + $app['conf']->set(['geocoding-providers', 0, 'map-provider'], $geocodingName); + } + + // remove registry classic section + if ($app['conf']->has(['registry', 'classic'])) { + $app['conf']->remove(['registry', 'classic']); + } + + // insert RGPD bloc if not exist + if (!$app['conf']->has(['user_account', 'deleting_policies', 'email_confirmation'])) { + $app['conf']->set(['user_account', 'deleting_policies', 'email_confirmation'], true); + } + + return true; + } +} diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 0e13eba50c..05bf2993f2 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -241,7 +241,7 @@ embed_bundle: geocoding-providers: - map-provider: 'mapboxWebGL' - enabled: true + enabled: false public-key: '' map-layers: - From c40802265d781936b28bddce172a7e6ed6b399ca Mon Sep 17 00:00:00 2001 From: aynsix Date: Tue, 17 Dec 2019 14:34:18 +0400 Subject: [PATCH 02/15] update config --- config/configuration.sample.yml | 21 +-------------------- lib/classes/patch/410alpha20a.php | 7 ++++++- lib/conf.d/configuration.yml | 1 + 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index fbaa368ed9..6642009d4a 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -62,12 +62,6 @@ main: mp4box_timeout: 60 swftools_timeout: 60 unoconv_timeout: 60 - task-manager: - status: started - listener: - protocol: tcp - host: 127.0.0.1 - port: 6700 storage: subdefs: null cache: null @@ -75,20 +69,7 @@ main: download: null lazaret: null caption: null - bridge: - youtube: - enabled: false - client_id: null - client_secret: null - developer_key: null - flickr: - enabled: false - client_id: null - client_secret: null - dailymotion: - enabled: false - client_id: null - client_secret: null + tmp_files: null border-manager: enabled: true extension-mapping: diff --git a/lib/classes/patch/410alpha20a.php b/lib/classes/patch/410alpha20a.php index 610a921cd0..ca07795476 100644 --- a/lib/classes/patch/410alpha20a.php +++ b/lib/classes/patch/410alpha20a.php @@ -84,11 +84,16 @@ class patch_410alpha20a implements patchInterface $app['conf']->set(['geocoding-providers', 0, 'map-provider'], $geocodingName); } - // remove registry classic section + // remove registry classic section if exist if ($app['conf']->has(['registry', 'classic'])) { $app['conf']->remove(['registry', 'classic']); } + // remove bridge section if exist + if ($app['conf']->has(['main', 'bridge'])) { + $app['conf']->remove(['main', 'bridge']); + } + // insert RGPD bloc if not exist if (!$app['conf']->has(['user_account', 'deleting_policies', 'email_confirmation'])) { $app['conf']->set(['user_account', 'deleting_policies', 'email_confirmation'], true); diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 05bf2993f2..5de7eebcd6 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -94,6 +94,7 @@ main: download: null lazaret: null caption: null + tmp_files: null trusted-proxies: [] debugger: From a6e5e504ca6a4b08a6a51fc2e878199a6ebe8f9d Mon Sep 17 00:00:00 2001 From: aynsix Date: Thu, 23 Jan 2020 16:28:27 +0300 Subject: [PATCH 03/15] change vttFieldName to ChapterVttFieldName in configuration --- config/configuration.sample.yml | 8 ++++++++ lib/classes/patch/410alpha20a.php | 7 +++++++ lib/conf.d/configuration.yml | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index 6642009d4a..e3447106e5 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -225,6 +225,14 @@ embed_bundle: document: player: flexpaper enable_pdfjs: true +video-editor: + ChapterVttFieldName: VideoTextTrackChapters + seekBackwardStep: 500 # in ms + seekForwardStep: 500 # in ms + playbackRates: + - 1 + - '1.5' + - 3 geocoding-providers: - map-provider: mapboxWebGL diff --git a/lib/classes/patch/410alpha20a.php b/lib/classes/patch/410alpha20a.php index ca07795476..f659ea35e7 100644 --- a/lib/classes/patch/410alpha20a.php +++ b/lib/classes/patch/410alpha20a.php @@ -84,6 +84,13 @@ class patch_410alpha20a implements patchInterface $app['conf']->set(['geocoding-providers', 0, 'map-provider'], $geocodingName); } + // video-editor section change, replace 'vttFieldName' to 'ChapterVttFieldName' + if ($app['conf']->has(['video-editor', 'vttFieldName'])) { + $chapterVttFieldName = $app['conf']->get(['video-editor', 'vttFieldName']); + $app['conf']->remove(['video-editor', 'vttFieldName']); + $app['conf']->set(['video-editor', 'ChapterVttFieldName'], $chapterVttFieldName); + } + // remove registry classic section if exist if ($app['conf']->has(['registry', 'classic'])) { $app['conf']->remove(['registry', 'classic']); diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 5de7eebcd6..de1eab7f0a 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -285,7 +285,7 @@ geocoding-providers: provincefields: Province countryfields: 'Country, Pays' video-editor: - vttFieldName: VideoTextTrackChapters + ChapterVttFieldName: VideoTextTrackChapters seekBackwardStep: 500 # in ms seekForwardStep: 500 # in ms playbackRates: From 24d85bb499f8415326b13d302407b82c0e4820db Mon Sep 17 00:00:00 2001 From: aynsix Date: Wed, 19 Feb 2020 10:43:23 +0300 Subject: [PATCH 04/15] bump to version 4.1.0-alpha.23a --- lib/Alchemy/Phrasea/Core/Version.php | 2 +- lib/classes/patch/{410alpha20a.php => 410alpha23a.php} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename lib/classes/patch/{410alpha20a.php => 410alpha23a.php} (98%) diff --git a/lib/Alchemy/Phrasea/Core/Version.php b/lib/Alchemy/Phrasea/Core/Version.php index 5f488cdd5a..374c6af2e0 100644 --- a/lib/Alchemy/Phrasea/Core/Version.php +++ b/lib/Alchemy/Phrasea/Core/Version.php @@ -16,7 +16,7 @@ class Version /** * @var string */ - private $number = '4.1.0-alpha.20a'; + private $number = '4.1.0-alpha.23a'; /** * @var string diff --git a/lib/classes/patch/410alpha20a.php b/lib/classes/patch/410alpha23a.php similarity index 98% rename from lib/classes/patch/410alpha20a.php rename to lib/classes/patch/410alpha23a.php index f659ea35e7..410352920f 100644 --- a/lib/classes/patch/410alpha20a.php +++ b/lib/classes/patch/410alpha23a.php @@ -14,7 +14,7 @@ use Alchemy\Phrasea\Application; class patch_410alpha20a implements patchInterface { /** @var string */ - private $release = '4.1.0-alpha.20a'; + private $release = '4.1.0-alpha.23a'; /** @var array */ private $concern = [base::APPLICATION_BOX]; From f10126bf3c77fdc171dc43483e91a7149bad79b0 Mon Sep 17 00:00:00 2001 From: aynsix Date: Wed, 19 Feb 2020 10:48:45 +0300 Subject: [PATCH 05/15] change patch name --- lib/classes/patch/410alpha23a.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/patch/410alpha23a.php b/lib/classes/patch/410alpha23a.php index 410352920f..eae272bc8e 100644 --- a/lib/classes/patch/410alpha23a.php +++ b/lib/classes/patch/410alpha23a.php @@ -11,7 +11,7 @@ use Alchemy\Phrasea\Application; -class patch_410alpha20a implements patchInterface +class patch_410alpha23a implements patchInterface { /** @var string */ private $release = '4.1.0-alpha.23a'; From b35c1595edc0e018d00422b3abeae0e4aca66ab1 Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Wed, 19 Feb 2020 15:20:19 +0400 Subject: [PATCH 06/15] PHRAS-2933 Fix facets order and move to workzone block --- package.json | 2 +- templates/web/prod/index.html.twig | 54 +++++++++++++++++------------- yarn.lock | 9 +++-- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 34944f5377..7fad145f59 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.135-d", + "phraseanet-production-client": "0.34.137-d", "requirejs": "^2.3.5", "tinymce": "^4.0.28", "underscore": "^1.8.3", diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 7fb2455fde..9a01b5ee62 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -183,6 +183,36 @@ {% if GV_thesaurus %}
+
+
+

{{ 'index::advance_search: facet-order' | trans }}

+
+ {% set order_facet = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_facet') %} + +
+
+
+

{{ 'index::advance_search: facet-values-order' | trans }}

+
+ {% set facet_values_order = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet_values_order') %} + +
+
+
{% include 'prod/tab_thesaurus.html.twig' with {has_access_to_module: app.getAclForUser(app.getAuthenticatedUser()).has_access_to_module('thesaurus')} %} @@ -814,30 +844,6 @@

{{ 'index::advance_search: facet' | trans }}

-

{{ 'index::advance_search: facet-order' | trans }}

-
- {% set order_facet = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_facet') %} - -
-

{{ 'index::advance_search: facet-values-order' | trans }}

-
- {% set facet_values_order = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet_values_order') %} - -
{% set facetFilter = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet') %}