Merge pull request #2516 from mike-esokia/PHRAS-1916_refactor_user_settings

PHRAS-1916 refactor layout of facet preferences
This commit is contained in:
Nicolas Maillat
2018-03-20 10:21:53 +01:00
committed by GitHub
4 changed files with 13 additions and 17 deletions

0
node_modules/.gitkeep generated vendored
View File

12
package-lock.json generated
View File

@@ -16,9 +16,9 @@
"dev": true
},
"acorn": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.1.tgz",
"integrity": "sha512-D/KGiCpM/VOtTMDS+wfjywEth926WUrArrzYov4N4SI7t+3y8747dPpCmmAvrm/Z3ygqMHnyPxvYYO0yTdn/nQ=="
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
"integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ=="
},
"acorn-dynamic-import": {
"version": "2.0.2",
@@ -7842,9 +7842,9 @@
}
},
"phraseanet-production-client": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/phraseanet-production-client/-/phraseanet-production-client-0.33.5.tgz",
"integrity": "sha512-mu/XHMW4MUT5cGjt30g6CBXJgacnnQGTwrOHK9XyzMboyjXjOfocAc6jEXZXdn5CFem+BXJbg1OmGZPbf/aaAA==",
"version": "0.33.7",
"resolved": "https://registry.npmjs.org/phraseanet-production-client/-/phraseanet-production-client-0.33.7.tgz",
"integrity": "sha512-r0ERaJamj4lUDyzkjItS5l1fCQVQdKKT0y4SvFnQt/uBPeypBS5LPavyshTSeonyjZv3G9kHMQUKfPtLg4GhHA==",
"dependencies": {
"blueimp-canvas-to-blob": {
"version": "3.5.0",

View File

@@ -714,35 +714,31 @@
</form>
</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_ALPHA_ASC') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
<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="box">
<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_ALPHA_ASC') %} selected="selected" {% endif %}
value="{{ constant('Alchemy\\Phrasea\\Core\\Configuration\\DisplaySettingService::ORDER_ALPHA_ASC') }}">{{ 'Alphabetic asc' | trans }}</option>
<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 class="box">
<h1>{{ 'index::advance_search: facet' | trans }}</h1>
{% 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

@@ -5316,8 +5316,8 @@ phraseanet-common@^0.4.1:
pym.js "^1.3.1"
phraseanet-production-client@^0.33.0:
version "0.33.5"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.33.5.tgz#f73066ac98786a473ee5ff918aa6f14babb9580e"
version "0.33.7"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.33.7.tgz#7b5ecb6e3001de9132cd12cb6574f6d25dc25cb9"
dependencies:
axios "^0.16.2"
backbone "^1.3.3"