View | Details | Raw Unified | Return to bug 27316
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_23716_update_sort_mappings.perl (+6 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "UPDATE search_marc_to_field SET sort = 1 WHERE sort IS NULL" );
4
    $dbh->do( "ALTER TABLE search_marc_to_field MODIFY COLUMN sort tinyint(1) DEFAULT 1 NOT NULL COMMENT 'Sort defaults to 1 (Yes) and creates sort fields in the index, 0 (no) will prevent this'" );
5
    NewVersion( $DBversion, 27316, "Description");
6
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-14 / +9 lines)
Lines 306-312 a.add, a.delete { Link Here
306
                                  [% mapping.search_field_label | html %]
306
                                  [% mapping.search_field_label | html %]
307
                                </td>
307
                                </td>
308
                                <td>
308
                                <td>
309
                                  <input type="hidden" name="mapping_sort" value="[% mapping.sort | html %]" readonly />[% IF mapping.sort == 'undef' %]Undef[% ELSE %][% mapping.sort | html %][% END %]
309
                                  [% IF mapping.sort == 0 %]
310
                                      <input type="hidden" name="mapping_sort" value="0" readonly />No
311
                                  [% ELSE %]
312
                                      <input type="hidden" name="mapping_sort" value="1" readonly />Yes
313
                                  [% END %]
310
                                </td>
314
                                </td>
311
                                <td>
315
                                <td>
312
                                  <input type="hidden" name="mapping_facet" value="[% mapping.facet | html %]" readonly />[% IF mapping.facet == 1 %]Yes[% ELSE %]No[% END %]
316
                                  <input type="hidden" name="mapping_facet" value="[% mapping.facet | html %]" readonly />[% IF mapping.facet == 1 %]Yes[% ELSE %]No[% END %]
Lines 330-349 a.add, a.delete { Link Here
330
                                </td>
334
                                </td>
331
                                <td>
335
                                <td>
332
                                  <select name="mapping_sort">
336
                                  <select name="mapping_sort">
333
                                    [% IF mapping.sort == 'undef' %]
334
                                      <option value="undef" selected="selected">Undef</option>
335
                                    [% ELSE %]
336
                                      <option value="undef">Undef</option>
337
                                    [% END %]
338
                                    [% IF mapping.sort == 0 %]
337
                                    [% IF mapping.sort == 0 %]
339
                                      <option value="0" selected="selected">0</option>
338
                                      <option value="0" selected="selected">No</option>
340
                                    [% ELSE %]
339
                                      <option value="1">Yes</option>
341
                                      <option value="0">0</option>
342
                                    [% END %]
343
                                    [% IF  mapping.sort == 1 %]
344
                                      <option value="1" selected="selected">1</option>
345
                                    [% ELSE %]
340
                                    [% ELSE %]
346
                                      <option value="1">1</option>
341
                                      <option value="0">No</option>
342
                                      <option value="1" selected="selected">Yes</option>
347
                                    [% END %]
343
                                    [% END %]
348
                                  </select>
344
                                  </select>
349
                                </td>
345
                                </td>
350
- 

Return to bug 27316