reponses:: Ces enregistrements vont etre definitivement supprimes et ne pourront etre recuperes. Etes vous sur ?
diff --git a/resources/www/admin/styles/main.scss b/resources/www/admin/styles/main.scss
index d238fee86b..f35c14f8dd 100644
--- a/resources/www/admin/styles/main.scss
+++ b/resources/www/admin/styles/main.scss
@@ -111,6 +111,13 @@ div.finder div.content div.title {
white-space: nowrap;
overflow: hidden;
}
+
+//setting
+.dumpfield {
+ margin-top:10px;
+ width: 400px;
+}
+
/******* MAIN MENU ************************************************************/
@@ -524,6 +531,104 @@ span.simplecolorpicker.picker {
background-position: center center;
}
+/******* SEARCH ENGINE SETTINGS ***************************************************/
+.search-engine-tabs {
+ background: 0;
+ border: 0;
+ .top-bar-shadow {
+ margin-top: 1px;
+ background: #aaa8a5; /* For browsers that do not support gradients */
+ background: -webkit-linear-gradient(bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* For Safari 5.1 to 6.0 */
+ background: -o-linear-gradient(bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* For Opera 11.1 to 12.0 */
+ background: -moz-linear-gradient(bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* For Firefox 3.6 to 15 */
+ background: linear-gradient(to bottom, #aaa8a5, rgba(255, 255, 255, 0.15)); /* Standard syntax */
+ height: 4px;
+ }
+ .ui-tabs-active {
+ background: #9EA09D !important;
+ a {
+ color: #FFFFFF !important;
+ }
+ }
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
+ border: 0;
+ background: #EFF0F0;
+ a {
+ color: #9EA09D;
+ }
+ }
+}
+
+#elasticsearch_settings_esSettingsDropIndexButton, #elasticsearch_settings_esSettingsCreateIndexButton {
+ margin-bottom: 20px;
+}
+
+#elasticsearch_settings_save {
+ padding: 15px;
+ margin-top: 20px;
+ &::before {
+ content: "\F0A0";
+ font-family: "FontAwesome";
+ margin-right: 5px;
+ }
+}
+
+#elasticsearch_settings_esSettingFromIndex {
+ margin-top: 20px;
+}
+
+#elastic-search, #general-aggregation {
+ background: #ffffff;
+}
+
+.general-aggregation-layout {
+ margin-top: 20px;
+ width: 450px;
+ button.btn-primary {
+ margin-left: 4px;
+ margin-top: 20px;
+ padding: 15px;
+ width: 180px;
+ i {
+ margin-right: 5px;
+ }
+ }
+}
+
+.aggregation-collection {
+ li {
+ border: 1px solid #ccc;
+ background: #FFF;
+ color: #000;
+ height: 30px;
+ margin: 4px;
+ padding: 20px;
+ table {
+ width: 100%;
+ display: inline-table;
+ vertical-align: middle;
+ height: 100%;
+ table-layout: fixed;
+ }
+ }
+ .label-aggregation {
+ font-weight: bold;
+ font-size: 16px;
+ color: #666;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ display: inline-block;
+ width: 100%;
+ vertical-align: middle;
+ margin-bottom: 0px;
+ }
+ select {
+ float: right;
+ width: 100%;
+ }
+}
+
@media screen and (max-width: 1150px) {
.langTab {
display: block;
diff --git a/templates/web/admin/search-engine/elastic-search.html.twig b/templates/web/admin/search-engine/elastic-search.html.twig
index e6eaa97148..bd5ed24aae 100644
--- a/templates/web/admin/search-engine/elastic-search.html.twig
+++ b/templates/web/admin/search-engine/elastic-search.html.twig
@@ -1,29 +1,6 @@
-{{ 'ElasticSearch configuration' | trans }}
-
-{{ form_start(form) }}
- {{ form_errors(form) }}
-
- {{ form_row(form.host) }}
- {{ form_row(form.port) }}
-
-
- {{ 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) }}
-
-
- {{ 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) }}
+{{ 'Save' | trans }}
@@ -33,13 +10,16 @@
Really drop index ?
{% block javascript %}
-
-
-{% endblock %}
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/templates/web/admin/search-engine/general-aggregation.html.twig b/templates/web/admin/search-engine/general-aggregation.html.twig
new file mode 100644
index 0000000000..d4b83ba31b
--- /dev/null
+++ b/templates/web/admin/search-engine/general-aggregation.html.twig
@@ -0,0 +1,27 @@
+
+
+ {% for formdata in form %}
+ {% set attr = formdata.vars['attr']|join(',') %}
+ {% if attr == 'aggregate' %}
+
+
+
+
+
+ {{ form_label(formdata, null, {
+ 'label_attr': {'class': 'label-aggregation'}
+ }) }}
+
+
+ {{ form_widget(formdata) }}
+
+
+
+
+
+ {% endif %}
+ {% endfor %}
+
+
{{ 'Save' | trans }}
+
\ No newline at end of file
diff --git a/templates/web/admin/search-engine/search-engine-settings.html.twig b/templates/web/admin/search-engine/search-engine-settings.html.twig
new file mode 100644
index 0000000000..6ade653866
--- /dev/null
+++ b/templates/web/admin/search-engine/search-engine-settings.html.twig
@@ -0,0 +1,33 @@
+{{ form_start(form) }}
+
+
+
+
+
+ {% include 'admin/search-engine/general-aggregation.html.twig'%}
+
+
+ {% include 'admin/search-engine/elastic-search.html.twig' %}
+
+
+
+{% block javascript %}
+
+{% endblock %}
+{{ form_end(form) }}
\ No newline at end of file
diff --git a/www/scripts/apps/admin/search-engine/views/es_config.js b/www/scripts/apps/admin/search-engine/views/es_config.js
index 23ba10f4ee..6085645a75 100644
--- a/www/scripts/apps/admin/search-engine/views/es_config.js
+++ b/www/scripts/apps/admin/search-engine/views/es_config.js
@@ -37,3 +37,32 @@ function searchEngineConfigurationFormInit(indexExists) {
});
}
}
+
+$("input[data-class='inline']").parent('div').css('display','inline-block');
+$("button[data-class='inline']").parent('div').css({'display':'inline-block'});
+$("button[data-class='inline']").css({'margin-left':'10px', 'margin-bottom': '10px'});
+//Get setting from index
+function esSettingFromIndex() {
+ $('#elasticsearch_settings_dumpField').removeClass('hide');
+ var data = {};
+ data.index = $('#elasticsearch_settings_indexName').val();
+ var url = pathGetIndexSettings;
+ $.ajax({
+ type: "GET",
+ url: url,
+ dataType: 'json',
+ data : data,
+ success: function (data) {
+ if (data.success) {
+ $('#elasticsearch_settings_dumpField').text(JSON.stringify(data.response));
+ } else {
+ $('#elasticsearch_settings_dumpField').text(data.message);
+ }
+ }
+ , error: function (jqXHR, textStatus, errorThrown) {
+ alert("Error XML:\n\n" + jqXHR.responseText);
+ }
+ });
+
+ return false;
+}