mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
sort facets via preferences
This commit is contained in:
@@ -18,6 +18,7 @@ class DisplaySettingService
|
||||
const ORDER_ALPHA_ASC = "ORDER_ALPHA_ASC";
|
||||
const ORDER_ALPHA_DESC = "ORDER_ALPHA_DESC";
|
||||
const ORDER_BY_ADMIN = "ORDER_BY_ADMIN";
|
||||
const ORDER_BY_BCT = "ORDER_BY_BCT";
|
||||
|
||||
/**
|
||||
* The default user settings.
|
||||
|
@@ -143,7 +143,7 @@
|
||||
|
||||
$(document).ready(function(){
|
||||
prodApp.appEvents.emit('workzone.doRemoveWarning', "{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), "warning_on_delete_story") %}true{% else %}false{% endif %}");
|
||||
prodApp.appEvents.emit('search.setFilterFacet', "{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), "facet") %}{{ app['settings'].getUserSetting(app.getAuthenticatedUser(), "facet") }}{% else %}false{% endif %}")
|
||||
prodApp.appEvents.emit('search.updateFacetData');
|
||||
|
||||
|
||||
});
|
||||
@@ -713,6 +713,20 @@
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
<div class="box">
|
||||
<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>
|
||||
</select>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
<div class="box">
|
||||
<h1>{{ 'index::advance_search: facet' | trans }}</h1>
|
||||
{% set facetFilter = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'facet') %}
|
||||
|
Reference in New Issue
Block a user