mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
porting PHRAS-1578/PHRAS-1579/PHRAS-1621/PHRAS-1675/PHRAS-1404/PHRAS-1336 to 4.1
This commit is contained in:
@@ -1,29 +1,6 @@
|
||||
<h1>{{ 'ElasticSearch configuration' | trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
|
||||
{{ form_row(form.host) }}
|
||||
{{ form_row(form.port) }}
|
||||
|
||||
<div>
|
||||
{{ form_label(form.indexName) }}
|
||||
{{ form_errors(form.indexName) }}
|
||||
{{ form_widget(form.indexName) }}
|
||||
|
||||
{{ form_label(form.esSettingsDropIndexButton) }}
|
||||
{{ form_widget(form.esSettingsDropIndexButton) }}
|
||||
|
||||
{{ form_label(form.esSettingsCreateIndexButton) }}
|
||||
{{ form_widget(form.esSettingsCreateIndexButton) }}
|
||||
</div>
|
||||
|
||||
{{ form_row(form.shards) }}
|
||||
{{ form_row(form.replicas) }}
|
||||
{{ form_row(form.minScore) }}
|
||||
{{ form_row(form.highlight) }}
|
||||
{{ form_row(form.save) }}
|
||||
{{ form_end(form) }}
|
||||
{{ form(form) }}
|
||||
<button type="submit" id="elasticsearch_settings_save" name="elasticsearch_settings[save]"
|
||||
class="btn btn-primary">{{ 'Save' | trans }}</button>
|
||||
|
||||
<form id="ElasticSearchDropIndexForm" action="{{ path('admin_searchengine_drop_index') }}" method="POST">
|
||||
</form>
|
||||
@@ -33,13 +10,16 @@
|
||||
<div id="dropIndexConfirmDialog">Really drop index ?</div>
|
||||
|
||||
{% block javascript %}
|
||||
<script type="text/javascript" src="{{ path('minifier', { 'f' : '/scripts/apps/admin/search-engine/views/es_config.js' }) }}"></script>
|
||||
<script type="text/javascript">
|
||||
{% if indexer.indexExists() %}
|
||||
var elasticSearchIndexExists = true;
|
||||
{% else %}
|
||||
var elasticSearchIndexExists = false;
|
||||
{% endif %}
|
||||
searchEngineConfigurationFormInit(elasticSearchIndexExists);
|
||||
</script>
|
||||
{% endblock %}
|
||||
<script type="text/javascript">
|
||||
var pathGetIndexSettings = "{{ path('admin_searchengine_setting_from_index') }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="{{ path('minifier', { 'f' : '/scripts/apps/admin/search-engine/views/es_config.js' }) }}"></script>
|
||||
<script type="text/javascript">
|
||||
{% if indexer.indexExists() %}
|
||||
var elasticSearchIndexExists = true;
|
||||
{% else %}
|
||||
var elasticSearchIndexExists = false;
|
||||
{% endif %}
|
||||
searchEngineConfigurationFormInit(elasticSearchIndexExists);
|
||||
</script>
|
||||
{% endblock %}
|
@@ -0,0 +1,27 @@
|
||||
<div class="general-aggregation-layout">
|
||||
<ul class="unstyled aggregation-collection">
|
||||
{% for formdata in form %}
|
||||
{% set attr = formdata.vars['attr']|join(',') %}
|
||||
{% if attr == 'aggregate' %}
|
||||
<li>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{ form_label(formdata, null, {
|
||||
'label_attr': {'class': 'label-aggregation'}
|
||||
}) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(formdata) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="submit" id="elasticsearch_settings_save" name="elasticsearch_settings[save]"
|
||||
class="btn btn-primary">{{ 'Save' | trans }}</button>
|
||||
</div>
|
@@ -0,0 +1,33 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="search-engine-tabs" style="display: none;">
|
||||
<ul>
|
||||
<li><a href="#elastic-search">{{ 'ElasticSearch configuration' | trans }}</a></li>
|
||||
<li><a href="#general-aggregation">{{ 'admin::search-engine: general-aggregation' | trans }}</a></li>
|
||||
</ul>
|
||||
<div class="top-bar-shadow"></div>
|
||||
|
||||
<div id="general-aggregation">
|
||||
{% include 'admin/search-engine/general-aggregation.html.twig'%}
|
||||
</div>
|
||||
<div id="elastic-search">
|
||||
{% include 'admin/search-engine/elastic-search.html.twig' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block javascript %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.search-engine-tabs').tabs({
|
||||
activate: function (event, ui) {
|
||||
$('#elasticsearch_settings_activeTab').val(ui.newPanel.selector);
|
||||
}
|
||||
});
|
||||
var activeTab = $('#elasticsearch_settings_activeTab').val();
|
||||
if (activeTab) {
|
||||
$('.search-engine-tabs a[href="' + activeTab + '"]').trigger('click');
|
||||
}
|
||||
});
|
||||
$(".search-engine-tabs").show();
|
||||
</script>
|
||||
{% endblock %}
|
||||
{{ form_end(form) }}
|
Reference in New Issue
Block a user