PHRAS-2933 Fix facets order and move to workzone block

This commit is contained in:
Harrys Ravalomanana
2020-02-19 15:20:19 +04:00
parent bfb90810e2
commit b35c1595ed
3 changed files with 35 additions and 30 deletions

View File

@@ -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",

View File

@@ -183,6 +183,36 @@
</div>
{% if GV_thesaurus %}
<div id="proposals" class="PNB thesaurus-from-facets-action">
<div class="filter-facet-setting look_box_settings">
<div class="left-facet-filter facet-filter">
<h4>{{ 'index::advance_search: facet-order' | trans }}</h4>
<form class="form-inline">
{% set order_facet = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_facet') %}
<label class="select" for="orderFacet">
<select class="preferences-facet-order" name="orderFacet" >
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') }}">{{ 'index::advance_search: facet-tech-order' | trans }}</option>
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
</select>
</label>
</form>
</div>
<div class="right-facet-filter facet-filter">
<h4>{{ 'index::advance_search: facet-values-order' | trans }}</h4>
<form class="form-inline">
{% set facet_values_order = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet_values_order') %}
<label class="select" for="facetValuesOrder">
<select class="preferences-facet-values-order" name="facetValuesOrder">
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') }}">{{ 'index::advance_search: order-by-hits' | trans }}</option>
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
</select>
</label>
</form>
</div>
</div>
<button id="facets-back-btn" style="display:none;">back</button>
</div>
{% include 'prod/tab_thesaurus.html.twig' with {has_access_to_module: app.getAclForUser(app.getAuthenticatedUser()).has_access_to_module('thesaurus')} %}
@@ -814,30 +844,6 @@
</div>
<div class="box">
<h1>{{ 'index::advance_search: facet' | trans }}</h1>
<h1>{{ 'index::advance_search: facet-order' | trans }}</h1>
<form class="form-inline">
{% set order_facet = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'order_facet') %}
<label class="select" for="orderFacet">
<select class="preferences-facet-order" name="orderFacet">
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_BCT') }}">{{ 'index::advance_search: facet-tech-order' | trans }}</option>
<option {% if order_facet == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
</select>
</label>
</form>
<h1>{{ 'index::advance_search: facet-values-order' | trans }}</h1>
<form class="form-inline">
{% set facet_values_order = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet_values_order') %}
<label class="select" for="facetValuesOrder">
<select class="preferences-facet-values-order" name="facetValuesOrder">
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_BY_HITS') }}">{{ 'index::advance_search: order-by-hits' | trans }}</option>
<option {% if facet_values_order == constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
</select>
</label>
</form>
{% set facetFilter = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet') %}
<label class="checkbox inline" for="ADVSRCH_FILTER_FACET" style="margin-bottom: 1em">
<input id="ADVSRCH_FILTER_FACET" type="checkbox" name="filter_facet" {% if facetFilter == 'true' %}checked="checked"{% endif %}>

View File

@@ -7577,11 +7577,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0"
pym.js "^1.3.1"
phraseanet-production-client@0.34.135-d:
version "0.34.135-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.135-d.tgz#fafbeecc0bd7aac7271742596576d5601b35d93e"
integrity sha512-mIORoFSZ4ZQgT0/1PhXsbwExrpTtNskdq/37/tuTrh5s/6SasFgvutSkUCvqr7EDyE2LNHZDAfcTCFLqo9T7DQ==
phraseanet-production-client@0.34.137-d:
version "0.34.137-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.137-d.tgz#ea3114879def2c24c15d02ace0b69d4db6fe448b"
integrity sha512-wtPOPBUKqIEmEWSATfjNi5gQ3t5VcLCEOGnDKrBHFtD43asmoosPblMM4bgoP2Gp2LuaXVs3p8yctHxKZXDFTA==
dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6"