Bug 36396: Link facet with authorised value category - ES
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / searchengine / elasticsearch / mappings.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% SET footerjs = 1 %]
5 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>[% FILTER collapse %]
8     [% t("Search engine configuration (Elasticsearch)") | html %] &rsaquo;
9     [% t("Administration") | html %] &rsaquo;
10     [% t("Koha") | html %]
11 [% END %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% Asset.css("lib/datatables/rowReorder.dataTables.min.css") | $raw %]
14 <style>
15 a.add, a.delete {
16     cursor: pointer;
17 }
18 </style>
19 </head>
20
21 <body id="admin_searchengine_mappings" class="admin">
22 [% WRAPPER 'header.inc' %]
23     [% INCLUDE 'prefs-admin-search.inc' %]
24 [% END %]
25
26 [% WRAPPER 'sub-header.inc' %]
27     [% WRAPPER breadcrumbs %]
28         [% WRAPPER breadcrumb_item %]
29             <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
30         [% END %]
31         [% WRAPPER breadcrumb_item bc_active= 1 %]
32             <span>Search engine configuration (Elasticsearch)</span>
33         [% END %]
34     [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
36
37 <div class="main container-fluid">
38     <div class="row">
39         <div class="col-sm-10 col-sm-push-2">
40             <main>
41                 [% INCLUDE 'messages.inc' %]
42
43     [% FOR m IN messages %]
44       <div class="dialog [% m.type | html %]">
45         [% SWITCH m.code %]
46         [% CASE 'error_on_update' %]
47           [% tx("An error occurred when updating mappings: {message}.", { message = m.message }) | html %]
48         [% CASE 'error_on_delete' %]
49           [% t("An error occurred when deleting the existing mappings. Nothing has been changed!") | $raw %]
50           [% tx("(search field {field_name} with mapping {marc_field}.)", { field_name = m.values.field_name, marc_field = m.values.marc_field }) | html %]
51         [% CASE 'invalid_field_weight' %]
52           [% tx("Invalid field weight '{weight}', must be a positive decimal number.", { weight = m.weight }) | html %]
53         [% CASE 'missing_mandatory_fields' %]
54           [% t("You attempted to delete all mappings for a required index, you must leave at least one mapping") | $raw %]
55         [% CASE 'error_on_update_es_mappings' %]
56           [% tx("An error occurred when updating Elasticsearch index mappings: {message}.", { message = m.message }) | html %]
57         [% CASE 'reindex_required' %]
58           [% tx("Index '{index}' needs to be reindexed.", { index = m.index }) | html %]
59         [% CASE 'recreate_required' %]
60           [% tx("Index '{index}' needs to be recreated.", { index = m.index }) | html %]
61         [% CASE 'success_on_update' %]
62           [% t("Mappings updated successfully.") | $raw %]
63         [% CASE 'success_on_reset' %]
64           [% t("Mappings have been reset successfully.") | $raw %]
65         [% CASE 'elasticsearch_disabled' %]
66           [% t("Elasticsearch is currently disabled.") | $raw %]
67         [% CASE %]
68           [% m.code | html %]
69         [% END %]
70       </div>
71     [% END %]
72
73     <h1>Search engine configuration (Elasticsearch)</h1>
74
75     [% IF errors %]
76         <div class="dialog alert">
77         Changes have not been applied. Please check the following values:
78           <ul>
79             [% FOREACH e IN errors %]
80                 <li>
81                     [% IF ( e.type == "malformed_mapping" ) %]
82                         <span>The value "[% e.value | html %]" is not supported for mappings</span>
83                     [% ELSIF ( e.type == "no_mapping" ) %]
84                         <span>There is no mapping for the index [% e.value | html %]</span>
85                     [% END %]
86                 </li>
87             [% END %]
88           </ul>
89         </div>
90     [% END %]
91
92     [% IF reset_confirm %]
93         <div class="dialog alert">
94             <h3>The current mappings you see on the screen will be erased and replaced by the mappings in the mappings.yaml file.</h3>
95             <form method="post">
96                 [% INCLUDE 'csrf-token.inc' %]
97                 <input type="hidden" name="op" value="cud-reset_confirmed" />
98                 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, reset mappings</button>
99             </form>
100
101             <form method="get">
102                 <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not reset mappings</button>
103             </form>
104         </div>
105     [% END %]
106
107     <div class="note">
108         <i class="fa fa-exclamation"></i>
109         <strong>Warning:</strong> Any changes to the configuration will only take effect after a full reindex. Until then searching may not work correctly.
110
111         <p><strong>Weight:</strong> define weight as a positive number. Higher numbers indicate increased relevancy.
112         <strong>Note that fields weighting works only for simple search.</strong></p>
113         <ol>
114           <li>Only search fields mapped with biblios can be weighted</li>
115           <li>Search will boost/increase weighted field(s) relevancy</li>
116         </ol>
117     </div>
118
119     <form id="es_mappings" method="post">
120         [% INCLUDE 'csrf-token.inc' %]
121
122         [% WRAPPER tabs id= "tabs" %]
123
124             [% WRAPPER tabs_nav %]
125                 [% WRAPPER tab_item tabname= "search_fields" bt_active= 1 %] Search fields [% END %]
126                 [% FOREACH index IN indexes %]
127                     [% SWITCH index.index_name %]
128                         [% CASE 'biblios' %]
129                             [% WRAPPER tab_item tabname= "mapping_biblios" %] <span>Bibliographic records</span> [% END %]
130                         [% CASE 'authorities' %]
131                             [% WRAPPER tab_item tabname= "mapping_authorities" %] <span>Authorities</span> [% END %]
132                     [% END %]
133                 [% END %]
134             [% END # /WRAPPER tabs_nav %]
135
136             [% WRAPPER tab_panels %]
137                 [% WRAPPER tab_panel tabname="search_fields" bt_active= 1 %]
138                     <table class="search_fields" id="search_fields_table" data-index_name="search_fields">
139                         <thead>
140                             <tr>
141                                 <th>Name</th>
142                                 <th>Aliases</th>
143                                 <th>Label</th>
144                                 <th>Type</th>
145                                 <th>Weight</th>
146                                 <th colspan="2">Searchable</th>
147                                 <th>&nbsp;</th>
148                             </tr>
149                             <tr>
150                                 <th colspan="5" class="NoSort">&nbsp;</th>
151                                 <th class="NoSort">Staff interface</th>
152                                 <th class="NoSort">OPAC</th>
153                                 <th>&nbsp;</th>
154                             </tr>
155                         </thead>
156                         <tbody>
157                             [% FOREACH search_field IN all_search_fields %]
158                                 <tr>
159                                     <td data-order="[% search_field.name | html %]">
160                                         [% IF search_field.mandatory %]
161                                             <input type="text" name="search_field_name" value="[% search_field.name | html %]" readonly />
162                                         [% ELSE %]
163                                             <input type="text" name="search_field_name" value="[% search_field.name | html %]" />
164                                         [% END %]
165                                     </td>
166                                     <td>
167                                         [% search_field.aliases.join(', ') | html %]
168                                     </td>
169                                     <td data-order="[% search_field.label | html %]">
170                                         [% IF search_field.mandatory %]
171                                             <input type="text" name="search_field_label" value="[% search_field.label | html %]" readonly />
172                                         [% ELSE %]
173                                             <input type="text" name="search_field_label" value="[% search_field.label | html %]" />
174                                         [% END %]
175                                     </td>
176                                     <td data-order="[% search_field.type | html %]">
177                                         [% IF search_field.mandatory %]
178                                             <input type="hidden" name="search_field_type" value="[% search_field.type | html %]" />
179                                             <select name="search_field_type" disabled>
180                                         [% ELSE %]
181                                             <select name="search_field_type">
182                                         [% END %]
183                                             <option value=""></option>
184                                             [% IF search_field.type == "string" %]
185                                                 <option value="string" selected="selected">String</option>
186                                             [% ELSE %]
187                                                 <option value="string">String</option>
188                                             [% END %]
189                                             [% IF search_field.type == "date" %]
190                                                 <option value="date" selected="selected">Date</option>
191                                             [% ELSE %]
192                                                 <option value="date">Date</option>
193                                             [% END %]
194                                             [% IF search_field.type == "year" %]
195                                                 <option value="year" selected="selected">Year</option>
196                                             [% ELSE %]
197                                                 <option value="year">Year</option>
198                                             [% END %]
199                                             [% IF search_field.type == "number" %]
200                                                 <option value="number" selected="selected">Number</option>
201                                             [% ELSE %]
202                                                 <option value="number">Number</option>
203                                             [% END %]
204                                             [% IF search_field.type == "boolean" %]
205                                                 <option value="boolean" selected="selected">Boolean</option>
206                                             [% ELSE %]
207                                                 <option value="boolean">Boolean</option>
208                                             [% END %]
209                                             [% IF search_field.type == "sum" %]
210                                                 <option value="sum" selected="selected">Sum</option>
211                                             [% ELSE %]
212                                                 <option value="sum">Sum</option>
213                                             [% END %]
214                                             [% IF search_field.type == "isbn" %]
215                                                 <option value="isbn" selected="selected">ISBN</option>
216                                             [% ELSE %]
217                                                 <option value="isbn">ISBN</option>
218                                             [% END %]
219                                             [% IF search_field.type == "stdno" %]
220                                                 <option value="stdno" selected="selected">Std. Number</option>
221                                             [% ELSE %]
222                                                 <option value="stdno">Std. Number</option>
223                                             [% END %]
224                                             [% IF search_field.type == "callnumber" %]
225                                                 <option value="callnumber" selected="selected">Call Number</option>
226                                             [% ELSE %]
227                                                 <option value="callnumber">Call Number</option>
228                                             [% END %]
229                                             [% IF search_field.type == "geo_point" %]
230                                               <option value="geo_point" selected="selected">Geo point</option>
231                                             [% ELSE %]
232                                               <option value="geo_point">Geo point</option>
233                                             [% END %]
234                                         </select>
235                                     </td>
236                                         <td data-order="[% search_field.weight | html %]">
237                                             [% IF search_field.mapped_biblios %]
238                                                 <input type="text" inputmode="decimal" pattern="[0-9\.]*" name="search_field_weight" value="[% search_field.weight | html %]" />
239                                             [% ELSE %]
240                                                 <input type="text" name="search_field_weight" value="">
241                                             [% END %]
242                                         </td>
243                                     <td>
244                                         <select name="search_field_staff_client">
245                                             [% IF search_field.staff_client %]
246                                                 <option value="1" selected="selected">Yes</option>
247                                                 <option value="0">No</option>
248                                             [% ELSE %]
249                                                 <option value="1">Yes</option>
250                                                 <option value="0" selected="selected">No</option>
251                                             [% END %]
252                                         </select>
253                                     </td>
254                                     <td>
255                                         <select name="search_field_opac">
256                                             [% IF search_field.opac %]
257                                                 <option value="1" selected="selected">Yes</option>
258                                                 <option value="0">No</option>
259                                             [% ELSE %]
260                                                 <option value="1">Yes</option>
261                                                 <option value="0" selected="selected">No</option>
262                                             [% END %]
263                                         </select>
264                                     </td>
265                                     <td>
266                                         [% IF search_field.is_mapped %]
267                                             <a class="btn btn-default btn-xs disabled delete-search-field" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a>
268                                         [% ELSE %]
269                                             <a class="btn btn-default btn-xs delete-search-field" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a>
270                                         [% END %]
271                                     </td>
272                                 </tr>
273                             [% END %]
274                         </tbody>
275                         <tfoot>
276                             <tr data-type="search-field">
277                                 <td>
278                                     <input type="text" data-id="search_field_name"/>
279                                 </td>
280                                 <td></td>
281                                 <td>
282                                     <input type="text" data-id="search_field_label"/>
283                                 </td>
284                                 <td>
285                                     <select data-id="search_field_type">
286                                         <option value=""></option>
287                                         <option value="string">String</option>
288                                         <option value="date">Date</option>
289                                         <option value="year">Year</option>
290                                         <option value="number">Number</option>
291                                         <option value="boolean">Boolean</option>
292                                         <option value="sum">Sum</option>
293                                         <option value="isbn">ISBN</option>
294                                         <option value="stdno">Std. Number</option>
295                                     </select>
296                                 </td>
297                                 <td>
298                                     <input type="text" data-id="search_field_weight" value="">
299                                 </td>
300                                 <td>
301                                     <select data-id="search_field_staff_client">
302                                         <option value="1">Yes</option>
303                                         <option value="0">No</option>
304                                     </select>
305                                 </td>
306                                 <td>
307                                     <select data-id="search_field_opac">
308                                         <option value="1">Yes</option>
309                                         <option value="0">No</option>
310                                     </select>
311                                 </td>
312                                 <td><a class="btn btn-default btn-xs add-search-field"><i class="fa fa-plus"></i> Add</a></td>
313                             </tr>
314                         </tfoot>
315                     </table>
316                 [% END %]
317                 [% FOREACH index IN indexes %]
318                     [% WRAPPER tab_panel tabname="mapping_${ index.index_name }" %]
319                         <table class="mappings" data-index_name="[% index.index_name | html %]" data-ordering="false" id="mapping_[% index.index_name | html %]_table">
320                             <thead>
321                                 <tr>
322                                 <th>Search field</th>
323                                 <th>Sortable</th>
324                                 <th>Facetable</th>
325                                 <th>Suggestible</th>
326                                 <th>Searchable</th>
327                                 <th>Filter</th>
328                                 <th>Mapping</th>
329                                 <th>&nbsp;</th>
330                                 </tr>
331                             </thead>
332                             <tbody>
333                                 [% FOREACH mapping IN index.mappings %]
334                                     [% IF mapping.search_field_mandatory && mapping.search_field_label != loop.next.search_field_label && mapping.search_field_label != loop.prev.search_field_label %]
335                                         <tr>
336                                             <td>
337                                                 <input type="hidden" name="mapping_index_name" value="[% index.index_name | html %]" />
338                                                 <input type="hidden" name="mapping_search_field_name" value="[% mapping.search_field_name | html %]">
339                                                 [% mapping.search_field_name | html %]
340                                                 [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %]
341                                             </td>
342                                             <td>
343                                                 [% IF mapping.sort == 0 %]
344                                                     <input type="hidden" name="mapping_sort" value="0" readonly />No
345                                                 [% ELSE %]
346                                                     <input type="hidden" name="mapping_sort" value="1" readonly />Yes
347                                                 [% END %]
348                                             </td>
349                                             <td>
350                                                 <input type="hidden" name="mapping_facet" value="[% mapping.facet | html %]" readonly />[% IF mapping.facet == 1 %]Yes[% ELSE %]No[% END %]
351                                             </td>
352                                             <td>
353                                                 <input type="hidden" name="mapping_suggestible" value="[% mapping.suggestible | html %]" readonly />[% IF mapping.suggestible == 1 %]Yes[% ELSE %]No[% END %]
354                                             </td>
355                                             <td>
356                                                 <input type="hidden" name="mapping_search" value="[% mapping.search | html %]" readonly />[% IF mapping.search == 1 %]Yes[% ELSE %]No[% END %]
357                                             </td>
358                                             <td>
359                                                 <input type="hidden" name="mapping_filter" value="[% mapping.filter | html %]" readonly />[% IF mapping.filter == 'punctuation' %]Punctuation[% END %]
360                                             </td>
361                                             <td data-search="[% mapping.marc_field | html %]">
362                                                 <input name="mapping_marc_field" type="text" value="[% mapping.marc_field | html %]" />
363                                             </td>
364                                             <td>&nbsp;</td>
365                                         </tr>
366                                     [% ELSE %]
367                                         <tr>
368                                             <td>
369                                                 <input type="hidden" name="mapping_index_name" value="[% index.index_name | html %]" />
370                                                 <input type="hidden" name="mapping_search_field_name" value="[% mapping.search_field_name | html %]">
371                                                 [% mapping.search_field_name | html %]
372                                                 [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %]
373                                             </td>
374                                             <td>
375                                                 <select name="mapping_sort">
376                                                     [% IF mapping.sort == 0 %]
377                                                         <option value="0" selected="selected">No</option>
378                                                         <option value="1">Yes</option>
379                                                     [% ELSE %]
380                                                         <option value="0">No</option>
381                                                         <option value="1" selected="selected">Yes</option>
382                                                     [% END %]
383                                                 </select>
384                                             </td>
385                                             <td>
386                                                 [% IF mapping.is_facetable %]
387                                                     <select name="mapping_facet">
388                                                         [% IF mapping.facet %]
389                                                             <option value="0">No</option>
390                                                             <option value="1" selected="selected">Yes</option>
391                                                         [% ELSE %]
392                                                             <option value="0" selected="selected">No</option>
393                                                             <option value="1">Yes</option>
394                                                         [% END %]
395                                                     </select>
396                                                 [% ELSE %]
397                                                     <input type="hidden" name="mapping_facet" value="0" />
398                                                     No
399                                                 [% END %]
400                                             </td>
401                                             <td>
402                                                 <select name="mapping_suggestible">
403                                                     [% IF mapping.suggestible %]
404                                                         <option value="0">No</option>
405                                                         <option value="1" selected="selected">Yes</option>
406                                                     [% ELSE %]
407                                                         <option value="0" selected="selected">No</option>
408                                                         <option value="1">Yes</option>
409                                                     [% END %]
410                                                 </select>
411                                             </td>
412                                             <td>
413                                             <select name="mapping_search">
414                                                 [% IF mapping.search %]
415                                                     <option value="0">No</option>
416                                                     <option value="1" selected="selected">Yes</option>
417                                                 [% ELSE %]
418                                                     <option value="0" selected="selected">No</option>
419                                                     <option value="1">Yes</option>
420                                                 [% END %]
421                                             </select>
422                                             </td>
423                                             <td>
424                                                 <select name="mapping_filter">
425                                                     [% IF mapping.filter == 'punctuation' %]
426                                                         <option value="">None</option>
427                                                         <option value="punctuation" selected="selected">Punctuation</option>
428                                                     [% ELSE %]
429                                                         <option value="" selected="selected">None</option>
430                                                         <option value="punctuation">Punctuation</option>
431                                                     [% END %]
432                                                 </select>
433                                             </td>
434                                             <td data-search="[% mapping.marc_field | html %]">
435                                                 <input name="mapping_marc_field" type="text" value="[% mapping.marc_field | html %]" />
436                                             </td>
437                                             [% IF mapping.search_field_mandatory %]
438                                                 <td><a class="btn btn-default btn-xs delete-mapping mandatory" data-field_name="[% mapping.search_field_name | html %]" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>
439                                             [% ELSE %]
440                                                 <td><a class="btn btn-default btn-xs delete-mapping" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>
441                                             [% END %]
442                                         </tr>
443                                     [% END %]
444                                 [% END %]
445                             </tbody>
446                             <tfoot>
447                                 <tr data-type="mapping">
448                                     <td>
449                                         <input data-id="mapping_index_name" type="hidden" value="[% index.index_name | html %]" />
450                                         <select data-id="mapping_search_field_name">
451                                             [% FOREACH f IN all_search_fields %]
452                                                 <option value="[% f.name | html %]">[% f.name | html %][% IF f.label != f.name %] ([% f.label | html %])[% END %]</option>
453                                             [% END %]
454                                         </select>
455                                     </td>
456                                     <td>
457                                         <select data-id="mapping_sort">
458                                         <option value="0">No</option>
459                                         <option value="1">Yes</option>
460                                         </select>
461                                     </td>
462                                     <td>
463                                         <select data-id="mapping_facet">
464                                             <option value="0">No</option>
465                                             <option value="1">Yes</option>
466                                         </select>
467                                     </td>
468                                     <td>
469                                         <select data-id="mapping_suggestible">
470                                             <option value="0">No</option>
471                                             <option value="1">Yes</option>
472                                         </select>
473                                     </td>
474                                     <td>
475                                         <select data-id="mapping_search">
476                                             <option value="0">No</option>
477                                             <option value="1">Yes</option>
478                                         </select>
479                                     </td>
480                                     <td>
481                                         <select data-id="mapping_filter">
482                                             <option value="">None</option>
483                                             <option value="punctuation">Punctuation</option>
484                                         </select>
485                                     </td>
486                                     <td><input data-id="mapping_marc_field" type="text" /></td>
487                                     <td><a class="btn btn-default btn-xs add"><i class="fa fa-plus"></i> Add</a></td>
488                                 </tr>
489                             </tfoot>
490                         </table>
491
492                         [% IF index.index_name == 'biblios' %]
493                             <h3>Facet order</h3>
494                             <div class="hint">Drag and drop rows to change the order</div>
495                             <div id="facet_[% index.index_name | html %]">
496                                 <table id="facet_[% index.index_name | html %]_table" style="max-width: 50%; margin: 0;">
497                                     <thead>
498                                         <tr>
499                                             <th>Order</th>
500                                             <th class="NoSort">Search field</th>
501                                             <th class="NoSort">Label</th>
502                                             <th class="NoSort">Authorized value category</th>
503                                             <th class="NoSort">&nbsp;</th>
504                                         </tr>
505                                     </thead>
506                                     <tbody>
507                                         [% FOREACH f IN facetable_fields %]
508                                             <tr>
509                                                 <td>[% loop.count | html %]</td>
510                                                 <td class="drag_handle">
511                                                     [% f.name | html %]
512                                                 </td>
513                                                 <td>
514                                                     [% SWITCH f.label %]
515                                                     [% CASE 'Authors' %]<span>Authors</span>
516                                                     [% CASE 'Item types' %]<span>Item types</span>
517                                                     [% CASE 'Locations' %]<span>Locations</span>
518                                                     [% CASE 'Places' %]<span>Places</span>
519                                                     [% CASE 'Series' %]<span>Series</span>
520                                                     [% CASE 'Topics' %]<span>Topics</span>
521                                                     [% CASE 'Collections' %]<span>Collections</span>
522                                                     [% CASE 'Holding libraries' %]<span>Holding libraries</span>
523                                                     [% CASE 'Home libraries' %]<span>Home libraries</span>
524                                                     [% CASE 'Languages' %]<span>Languages</span>
525                                                     [% CASE %]<span>[% f.label | html %]</span>
526                                                     [% END %]
527                                                     <input type="hidden" name="facet_name" value="[% f.name | html %]" />
528                                                 </td>
529                                                 <td>
530                                                     <select name="facet_av_cat_[% f.name | html %]">
531                                                         [% FOR av_cat IN authorised_value_categories %]
532                                                             [% IF f.authorised_value_category == av_cat %]
533                                                                 <option value="[% av_cat | html %]" selected="selected">[% av_cat | html %]</option>
534                                                             [% ELSE %]
535                                                                 <option value="[% av_cat | html %]">[% av_cat | html %]</option>
536                                                             [% END %]
537                                                         [% END %]
538                                                     </select>
539                                                 </td>
540                                                 <td>
541                                                     <a class="btn btn-default btn-xs delete-facet" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a>
542                                                 </td>
543                                             </tr>
544                                         [% END %]
545                                     </tbody>
546                                     <tfoot>
547                                         <tr data-type="facet">
548                                             <td></td>
549                                             <td>
550                                                 <select data-id="facet-search-field">
551                                                     [% FOREACH search_field IN all_search_fields %]
552                                                         <option value="[% search_field.name | html %]" data-label="[% search_field.label | html %]">[% search_field.name | html %]</option>
553                                                     [% END %]
554                                                 </select>
555                                             </td>
556                                             <td></td>
557                                             <td>
558                                                 <select data-id="facet-av-cat">
559                                                     [% FOR av_cat IN authorised_value_categories %]
560                                                         [% IF f.authorised_value_category == av_cat %]
561                                                             <option value="[% av_cat | html %]" selected="selected">[% av_cat | html %]</option>
562                                                         [% ELSE %]
563                                                             <option value="[% av_cat | html %]">[% av_cat | html %]</option>
564                                                         [% END %]
565                                                     [% END %]
566                                                 </select>
567                                             </td>
568                                             <td><a class="btn btn-default btn-xs add-facet"><i class="fa fa-plus"></i> Add</a></td>
569                                         </tr>
570                                     </tfoot>
571                                 </table>
572                             </div>
573                         [% END %]
574                     [% END # /WRAPPER tab_panel#mapping_{ index.index_name} %]
575                 [% END # /FOREACH index %]
576             [% END # /WRAPPER tab_panels %]
577         [% END # /WRAPPER tabs %]
578
579         <fieldset class="action">
580             <input type="hidden" name="op" value="cud-edit">
581             <button class="btn btn-primary" type="submit"><i class="fa-solid fa-hard-drive" aria-hidden="true"></i> Save</button>
582         </fieldset>
583     </form>
584     <form method="get">
585         <fieldset class="action">
586             <button class="btn btn-default" type="submit" name="op" value="reset_confirm"><i class="fa-solid fa-rotate" aria-hidden="true"></i> Reset mappings</button>
587         </fieldset>
588     </form>
589
590             </main>
591         </div> <!-- /.col-sm-10.col-sm-push-2 -->
592
593         <div class="col-sm-2 col-sm-pull-10">
594             <aside>
595                 [% INCLUDE 'admin-menu.inc' %]
596             </aside>
597         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
598      </div> <!-- /.row -->
599
600 [% MACRO jsinclude BLOCK %]
601     [% INCLUDE 'datatables.inc' %]
602     [% Asset.js("lib/datatables/dataTables.rowReorder.min.js") | $raw %]
603     [% Asset.js("js/elasticsearch-mappings.js") | $raw %]
604 [% END %]
605
606 [% INCLUDE 'intranet-bottom.inc' %]