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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-82 / +82 lines)
Lines 474-562 Link Here
474
        <div class="dialog message">Failed to delete budget because funds exist.</div>
474
        <div class="dialog message">Failed to delete budget because funds exist.</div>
475
    [% END %]
475
    [% END %]
476
476
477
  [% INCLUDE 'budgets-active-currency.inc' %]
477
    [% INCLUDE 'budgets-active-currency.inc' %]
478
479
    [% WRAPPER tabs id= "budgetsTabs" %]
480
481
        [% WRAPPER tabs_nav %]
482
            [% WRAPPER tab_item tabname= "active" bt_active= 1 %] <span>Active budgets</span> [% END %]
483
            [% WRAPPER tab_item tabname= "inactive" %] <span>Inactive budgets</span> [% END %]
484
        [% END # /WRAPPER tabs_nav %]
485
486
        [% WRAPPER tab_panels %]
487
            [% WRAPPER tab_panel tabname="active" bt_active= 1 %]
488
                [% IF ( period_active_loop ) %]
489
                    <table id="activeperiodst">
490
                        <thead>
491
                            <tr>
492
                                <th>Budget name</th>
493
                                <th>Start date</th>
494
                                <th>End date</th>
495
                                <th>Locked</th>
496
                                <th>Total</th>
497
                                <th class="noExport">Actions</th>
498
                            </tr>
499
                        </thead>
500
                        <tbody>
501
                            [% FOREACH period_active IN period_active_loop %]
502
                                <tr>
503
                                    <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_active.budget_period_id | uri %]" title="View funds for [% period_active.budget_period_description | html %]">[% period_active.budget_period_description | html %]</a></td>
504
                                    <td data-order="[% period_active.budget_period_startdate | html %]">[% period_active.budget_period_startdate | $KohaDates %]</td>
505
                                    <td data-order="[% period_active.budget_period_enddate | html %]">[% period_active.budget_period_enddate | $KohaDates %]</td>
506
                                    <td>
507
                                        [% IF ( period_active.budget_period_locked ) %]
508
                                            <i class="fa fa-lock"></i> Locked</span>
509
                                        [% END %]
510
                                    </td>
511
                                    <td class="data">[% period_active.budget_period_total | $Price %]</td>
512
                                    <td>
513
                                        [% PROCESS action_menu block_budget=period_active %]
514
                                    </td>
515
                                </tr>
516
                            [% END # /FOREACH period_active %]
517
                        </tbody>
518
                    </table> <!-- /#activeperiodst -->
519
                [% ELSE %]
520
                    <span>No active budgets</span>
521
                [% END # /IF period_active_loop %]
522
            [% END # /WRAPPER tab_panel#active %]
523
524
            [% WRAPPER tab_panel tabname="inactive" %]
525
                [% IF ( period_inactive_loop ) %]
526
                    <table id="inactiveperiodst">
527
                        <thead>
528
                            <tr>
529
                                <th>Budget name</th>
530
                                <th>Start date</th>
531
                                <th>End date</th>
532
                                <th>Locked</th>
533
                                <th>Total</th>
534
                                <th class="noExport">Actions</th>
535
                            </tr>
536
                        </thead>
537
                        <tbody>
538
                            [% FOREACH period_loo IN period_inactive_loop %]
539
                                <tr>
540
                                    <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_loo.budget_period_id | uri %]" title="View funds for [% period_loo.budget_period_description | html %]">[% period_loo.budget_period_description | html %]</a></td>
541
                                    <td data-order="[% period_loo.budget_period_startdate | html %]">[% period_loo.budget_period_startdate | $KohaDates %]</td>
542
                                    <td data-order="[% period_loo.budget_period_enddate | html %]">[% period_loo.budget_period_enddate | $KohaDates %]</td>
543
                                    <td>[% IF ( period_loo.budget_period_locked ) %]<i class="fa fa-lock"></i> Locked[% END %]</td>
544
                                    <td class="data">[% period_loo.budget_period_total | $Price %]</td>
545
                                    <td>
546
                                            [% PROCESS action_menu block_budget=period_loo %]
547
                                    </td>
548
                                </tr>
549
                            [% END # /FOREACH period_loo %]
550
                        </tbody>
551
                    </table> <!-- /#inactiveperiodst -->
552
                [% ELSE %]
553
                    <span>No inactive budgets</span>
554
                [% END # /IF inactiveperiodst %]
555
            [% END # /WRAPPER tab_panel#inactive %]
556
        [% END # /WRAPPER tab_panels %]
557
    [% END # /WRAPPER tabs %]
478
558
479
  <div id="budgetsTabs" class="toptabs">
559
[% END # /IF else %]
480
    <ul class="nav nav-tabs" role="tablist">
481
        <li role="presentation" class="active">
482
            <a href="#active" aria-controls="active" role="tab" data-toggle="tab">Active budgets</a>
483
        </li>
484
        <li role="presentation">
485
            <a href="#inactive" aria-controls="inactive" role="tab" data-toggle="tab">Inactive budgets</a>
486
        </li>
487
    </ul>
488
    <div class="tab-content">
489
        <div id="active" role="tabpanel" class="tab-pane active">
490
        [% IF ( period_active_loop ) %]
491
            <table id="activeperiodst">
492
            <thead>
493
                <tr>
494
                <th>Budget name</th>
495
                <th>Start date</th>
496
                <th>End date</th>
497
                <th>Locked</th>
498
                <th>Total</th>
499
                <th class="noExport">Actions</th>
500
                </tr>
501
            </thead>
502
            <tbody>
503
                [% FOREACH period_active IN period_active_loop %]
504
                    <tr>
505
                    <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_active.budget_period_id | uri %]" title="View funds for [% period_active.budget_period_description | html %]">[% period_active.budget_period_description | html %]</a></td>
506
                    <td data-order="[% period_active.budget_period_startdate | html %]">[% period_active.budget_period_startdate | $KohaDates %]</td>
507
                    <td data-order="[% period_active.budget_period_enddate | html %]">[% period_active.budget_period_enddate | $KohaDates %]</td>
508
                    <td>
509
                    [% IF ( period_active.budget_period_locked ) %]
510
                        <i class="fa fa-lock"></i> Locked</span>
511
                    [% END %]
512
                    </td>
513
                    <td class="data">[% period_active.budget_period_total | $Price %]</td>
514
                    <td>
515
                        [% PROCESS action_menu block_budget=period_active %]
516
                    </td>
517
                    </tr>
518
                [% END %]
519
            </tbody>
520
            </table>
521
        [% ELSE %]
522
            No active budgets
523
        [% END %]
524
        </div>
525
        <div id="inactive" role="tabpanel" class="tab-pane">
526
        [% IF ( period_inactive_loop ) %]
527
            <table id="inactiveperiodst">
528
            <thead>
529
                <tr>
530
                    <th>Budget name</th>
531
                    <th>Start date</th>
532
                    <th>End date</th>
533
                    <th>Locked</th>
534
                    <th>Total</th>
535
                    <th class="noExport">Actions</th>
536
                </tr>
537
            </thead>
538
            <tbody>
539
                [% FOREACH period_loo IN period_inactive_loop %]
540
                    <tr>
541
                    <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_loo.budget_period_id | uri %]" title="View funds for [% period_loo.budget_period_description | html %]">[% period_loo.budget_period_description | html %]</a></td>
542
                    <td data-order="[% period_loo.budget_period_startdate | html %]">[% period_loo.budget_period_startdate | $KohaDates %]</td>
543
                    <td data-order="[% period_loo.budget_period_enddate | html %]">[% period_loo.budget_period_enddate | $KohaDates %]</td>
544
                    <td>[% IF ( period_loo.budget_period_locked ) %]<i class="fa fa-lock"></i> Locked[% END %]</td>
545
                    <td class="data">[% period_loo.budget_period_total | $Price %]</td>
546
                    <td>
547
                            [% PROCESS action_menu block_budget=period_loo %]
548
                    </td>
549
                    </tr>
550
                [% END %]
551
            </tbody>
552
            </table>
553
        [% ELSE %]
554
            No inactive budgets
555
        [% END %]
556
        </div>
557
    </div> <!-- /.tab-content -->
558
  </div>
559
[% END %]
560
560
561
            </main>
561
            </main>
562
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
562
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-283 / +280 lines)
Lines 118-436 a.add, a.delete { Link Here
118
    </div>
118
    </div>
119
119
120
    <form id="es_mappings" method="post">
120
    <form id="es_mappings" method="post">
121
        <div id="tabs" class="toptabs">
121
122
            <ul class="nav nav-tabs" role="tablist">
122
        [% WRAPPER tabs id= "tabs" %]
123
                <li role="presentation" class="active">
123
124
                    <a href="#search_fields" data-tab="search_fields" aria-controls="search_fields" role="tab" data-toggle="tab" >Search fields</a>
124
            [% WRAPPER tabs_nav %]
125
                </li>
125
                [% WRAPPER tab_item tabname= "search_fields" bt_active= 1 %] Search fields [% END %]
126
                [% FOREACH index IN indexes %]
126
                [% FOREACH index IN indexes %]
127
                    [% SWITCH index.index_name %]
127
                    [% SWITCH index.index_name %]
128
                        [% CASE 'biblios' %]
128
                        [% CASE 'biblios' %]
129
                            <li role="presentation">
129
                            [% WRAPPER tab_item tabname= "mapping_biblios" %] <span>Bibliographic records</span> [% END %]
130
                                <a href="#mapping_biblios" data-tab="mapping_biblios" aria-controls="mapping_biblios" role="tab" data-toggle="tab">Bibliographic records</a>
131
                            </li>
132
                        [% CASE 'authorities' %]
130
                        [% CASE 'authorities' %]
133
                            <li role="presentation">
131
                            [% WRAPPER tab_item tabname= "mapping_authorities" %] <span>Authorities</span> [% END %]
134
                                <a href="#mapping_authorities" data-tab="mapping_authorities" aria-controls="mapping_authorities" role="tab" data-toggle="tab">Authorities</a>
135
                            </li>
136
                    [% END %]
132
                    [% END %]
137
                [% END %]
133
                [% END %]
138
            </ul>
134
            [% END # /WRAPPER tabs_nav %]
139
            <div class="tab-content">
135
140
                <div id="search_fields" role="tabpanel" class="tab-pane active">
136
            [% WRAPPER tab_panels %]
137
                [% WRAPPER tab_panel tabname="search_fields" bt_active= 1 %]
141
                    <table class="search_fields" id="search_fields_table">
138
                    <table class="search_fields" id="search_fields_table">
142
                        <thead>
139
                        <thead>
143
                        <tr>
144
                            <th>Name</th>
145
                            <th>Aliases</th>
146
                            <th>Label</th>
147
                            <th>Type</th>
148
                            <th>Weight</th>
149
                            <th colspan="2">Searchable</th>
150
                        </tr>
151
                        <tr>
152
                            <th colspan="5" class="NoSort">&nbsp;</th>
153
                            <th class="NoSort">Staff interface</th>
154
                            <th class="NoSort">OPAC</th>
155
                        </tr>
156
                        </thead>
157
                        <tbody>
158
                        [% FOREACH search_field IN all_search_fields %]
159
                            <tr>
140
                            <tr>
160
                            <td data-order="[% search_field.name | html %]">
141
                                <th>Name</th>
161
                                [% IF search_field.mandatory %]
142
                                <th>Aliases</th>
162
                                    <input type="text" name="search_field_name" value="[% search_field.name | html %]" readonly />
143
                                <th>Label</th>
163
                                [% ELSE %]
144
                                <th>Type</th>
164
                                    <input type="text" name="search_field_name" value="[% search_field.name | html %]" />
145
                                <th>Weight</th>
165
                                [% END %]
146
                                <th colspan="2">Searchable</th>
166
                            </td>
167
                            <td>
168
                                [% search_field.aliases.join(', ') | html %]
169
                            </td>
170
                            <td data-order="[% search_field.label | html %]">
171
                                [% IF search_field.mandatory %]
172
                                    <input type="text" name="search_field_label" value="[% search_field.label | html %]" readonly />
173
                                [% ELSE %]
174
                                    <input type="text" name="search_field_label" value="[% search_field.label | html %]" />
175
                                [% END %]
176
                            </td>
177
                            <td data-order="[% search_field.type | html %]">
178
                                [% IF search_field.mandatory %]
179
                                    <input type="hidden" name="search_field_type" value="[% search_field.type | html %]" />
180
                                    <select name="search_field_type" disabled>
181
                                [% ELSE %]
182
                                    <select name="search_field_type">
183
                                [% END %]
184
                                    <option value=""></option>
185
                                    [% IF search_field.type == "string" %]
186
                                        <option value="string" selected="selected">String</option>
187
                                    [% ELSE %]
188
                                        <option value="string">String</option>
189
                                    [% END %]
190
                                    [% IF search_field.type == "date" %]
191
                                        <option value="date" selected="selected">Date</option>
192
                                    [% ELSE %]
193
                                        <option value="date">Date</option>
194
                                    [% END %]
195
                                    [% IF search_field.type == "year" %]
196
                                        <option value="year" selected="selected">Year</option>
197
                                    [% ELSE %]
198
                                        <option value="year">Year</option>
199
                                    [% END %]
200
                                    [% IF search_field.type == "number" %]
201
                                        <option value="number" selected="selected">Number</option>
202
                                    [% ELSE %]
203
                                        <option value="number">Number</option>
204
                                    [% END %]
205
                                    [% IF search_field.type == "boolean" %]
206
                                        <option value="boolean" selected="selected">Boolean</option>
207
                                    [% ELSE %]
208
                                        <option value="boolean">Boolean</option>
209
                                    [% END %]
210
                                    [% IF search_field.type == "sum" %]
211
                                        <option value="sum" selected="selected">Sum</option>
212
                                    [% ELSE %]
213
                                        <option value="sum">Sum</option>
214
                                    [% END %]
215
                                    [% IF search_field.type == "isbn" %]
216
                                        <option value="isbn" selected="selected">ISBN</option>
217
                                    [% ELSE %]
218
                                        <option value="isbn">ISBN</option>
219
                                    [% END %]
220
                                    [% IF search_field.type == "stdno" %]
221
                                        <option value="stdno" selected="selected">Std. Number</option>
222
                                    [% ELSE %]
223
                                        <option value="stdno">Std. Number</option>
224
                                    [% END %]
225
                                    [% IF search_field.type == "callnumber" %]
226
                                        <option value="callnumber" selected="selected">Call Number</option>
227
                                    [% ELSE %]
228
                                        <option value="callnumber">Call Number</option>
229
                                    [% END %]
230
                                    </select>
231
                            </td>
232
                                <td data-order="[% search_field.weight | html %]">
233
                                    [% IF search_field.mapped_biblios %]
234
                                        <input type="text" inputmode="decimal" pattern="[0-9\.]*" name="search_field_weight" value="[% search_field.weight | html %]" />
235
                                    [% ELSE %]
236
                                        <input type="text" name="search_field_weight" value="">
237
                                    [% END %]
238
                                </td>
239
                            <td>
240
                                <select name="search_field_staff_client">
241
                                [% IF search_field.staff_client %]
242
                                    <option value="1" selected="selected">Yes</option>
243
                                    <option value="0">No</option>
244
                                [% ELSE %]
245
                                    <option value="1">Yes</option>
246
                                    <option value="0" selected="selected">No</option>
247
                                [% END %]
248
                                </select>
249
                            </td>
250
                            <td>
251
                                <select name="search_field_opac">
252
                                [% IF search_field.opac %]
253
                                    <option value="1" selected="selected">Yes</option>
254
                                    <option value="0">No</option>
255
                                [% ELSE %]
256
                                    <option value="1">Yes</option>
257
                                    <option value="0" selected="selected">No</option>
258
                                [% END %]
259
                                </select>
260
                            </td>
261
                            </tr>
147
                            </tr>
262
                        [% END %]
148
                            <tr>
263
                        </tbody>
149
                                <th colspan="5" class="NoSort">&nbsp;</th>
264
                    </table>
150
                                <th class="NoSort">Staff interface</th>
265
                </div>
151
                                <th class="NoSort">OPAC</th>
266
                [% FOREACH index IN indexes %]
267
                    <div id="mapping_[% index.index_name | html %]" role="tabpanel" class="tab-pane">
268
                        <table class="mappings" data-index_name="[% index.index_name | html %]" data-ordering="false" id="mapping_[% index.index_name | html %]_table">
269
                        <thead>
270
                            <tr class="nodrag nodrop">
271
                            <th>Search field</th>
272
                            <th>Sortable</th>
273
                            <th>Facetable</th>
274
                            <th>Suggestible</th>
275
                            <th>Searchable</th>
276
                            <th>Mapping</th>
277
                            <th>&nbsp;</th>
278
                            </tr>
152
                            </tr>
279
                        </thead>
153
                        </thead>
280
                        <tbody>
154
                        <tbody>
281
                            [% FOREACH mapping IN index.mappings %]
155
                            [% FOREACH search_field IN all_search_fields %]
282
                                [% IF mapping.search_field_mandatory && mapping.search_field_label != loop.next.search_field_label && mapping.search_field_label != loop.prev.search_field_label %]
283
                                <tr>
156
                                <tr>
284
                                    <td>
157
                                    <td data-order="[% search_field.name | html %]">
285
                                    <input type="hidden" name="mapping_index_name" value="[% index.index_name | html %]" />
158
                                        [% IF search_field.mandatory %]
286
                                    <input type="hidden" name="mapping_search_field_name" value="[% mapping.search_field_name | html %]">
159
                                            <input type="text" name="search_field_name" value="[% search_field.name | html %]" readonly />
287
                                    [% mapping.search_field_name | html %]
160
                                        [% ELSE %]
288
                                    [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %]
161
                                            <input type="text" name="search_field_name" value="[% search_field.name | html %]" />
162
                                        [% END %]
289
                                    </td>
163
                                    </td>
290
                                    <td>
164
                                    <td>
291
                                    [% IF mapping.sort == 0 %]
165
                                        [% search_field.aliases.join(', ') | html %]
292
                                        <input type="hidden" name="mapping_sort" value="0" readonly />No
293
                                    [% ELSE %]
294
                                        <input type="hidden" name="mapping_sort" value="1" readonly />Yes
295
                                    [% END %]
296
                                    </td>
166
                                    </td>
297
                                    <td>
167
                                    <td data-order="[% search_field.label | html %]">
298
                                    <input type="hidden" name="mapping_facet" value="[% mapping.facet | html %]" readonly />[% IF mapping.facet == 1 %]Yes[% ELSE %]No[% END %]
168
                                        [% IF search_field.mandatory %]
169
                                            <input type="text" name="search_field_label" value="[% search_field.label | html %]" readonly />
170
                                        [% ELSE %]
171
                                            <input type="text" name="search_field_label" value="[% search_field.label | html %]" />
172
                                        [% END %]
299
                                    </td>
173
                                    </td>
300
                                    <td>
174
                                    <td data-order="[% search_field.type | html %]">
301
                                    <input type="hidden" name="mapping_suggestible" value="[% mapping.suggestible | html %]" readonly />[% IF mapping.suggestible == 1 %]Yes[% ELSE %]No[% END %]
175
                                        [% IF search_field.mandatory %]
176
                                            <input type="hidden" name="search_field_type" value="[% search_field.type | html %]" />
177
                                            <select name="search_field_type" disabled>
178
                                        [% ELSE %]
179
                                            <select name="search_field_type">
180
                                        [% END %]
181
                                            <option value=""></option>
182
                                            [% IF search_field.type == "string" %]
183
                                                <option value="string" selected="selected">String</option>
184
                                            [% ELSE %]
185
                                                <option value="string">String</option>
186
                                            [% END %]
187
                                            [% IF search_field.type == "date" %]
188
                                                <option value="date" selected="selected">Date</option>
189
                                            [% ELSE %]
190
                                                <option value="date">Date</option>
191
                                            [% END %]
192
                                            [% IF search_field.type == "year" %]
193
                                                <option value="year" selected="selected">Year</option>
194
                                            [% ELSE %]
195
                                                <option value="year">Year</option>
196
                                            [% END %]
197
                                            [% IF search_field.type == "number" %]
198
                                                <option value="number" selected="selected">Number</option>
199
                                            [% ELSE %]
200
                                                <option value="number">Number</option>
201
                                            [% END %]
202
                                            [% IF search_field.type == "boolean" %]
203
                                                <option value="boolean" selected="selected">Boolean</option>
204
                                            [% ELSE %]
205
                                                <option value="boolean">Boolean</option>
206
                                            [% END %]
207
                                            [% IF search_field.type == "sum" %]
208
                                                <option value="sum" selected="selected">Sum</option>
209
                                            [% ELSE %]
210
                                                <option value="sum">Sum</option>
211
                                            [% END %]
212
                                            [% IF search_field.type == "isbn" %]
213
                                                <option value="isbn" selected="selected">ISBN</option>
214
                                            [% ELSE %]
215
                                                <option value="isbn">ISBN</option>
216
                                            [% END %]
217
                                            [% IF search_field.type == "stdno" %]
218
                                                <option value="stdno" selected="selected">Std. Number</option>
219
                                            [% ELSE %]
220
                                                <option value="stdno">Std. Number</option>
221
                                            [% END %]
222
                                            [% IF search_field.type == "callnumber" %]
223
                                                <option value="callnumber" selected="selected">Call Number</option>
224
                                            [% ELSE %]
225
                                                <option value="callnumber">Call Number</option>
226
                                            [% END %]
227
                                        </select>
302
                                    </td>
228
                                    </td>
229
                                        <td data-order="[% search_field.weight | html %]">
230
                                            [% IF search_field.mapped_biblios %]
231
                                                <input type="text" inputmode="decimal" pattern="[0-9\.]*" name="search_field_weight" value="[% search_field.weight | html %]" />
232
                                            [% ELSE %]
233
                                                <input type="text" name="search_field_weight" value="">
234
                                            [% END %]
235
                                        </td>
303
                                    <td>
236
                                    <td>
304
                                    <input type="hidden" name="mapping_search" value="[% mapping.search | html %]" readonly />[% IF mapping.search == 1 %]Yes[% ELSE %]No[% END %]
237
                                        <select name="search_field_staff_client">
238
                                            [% IF search_field.staff_client %]
239
                                                <option value="1" selected="selected">Yes</option>
240
                                                <option value="0">No</option>
241
                                            [% ELSE %]
242
                                                <option value="1">Yes</option>
243
                                                <option value="0" selected="selected">No</option>
244
                                            [% END %]
245
                                        </select>
305
                                    </td>
246
                                    </td>
306
                                    <td data-search="[% mapping.marc_field | html %]">
247
                                    <td>
307
                                        <input name="mapping_marc_field" type="text" value="[% mapping.marc_field | html %]" />
248
                                        <select name="search_field_opac">
249
                                            [% IF search_field.opac %]
250
                                                <option value="1" selected="selected">Yes</option>
251
                                                <option value="0">No</option>
252
                                            [% ELSE %]
253
                                                <option value="1">Yes</option>
254
                                                <option value="0" selected="selected">No</option>
255
                                            [% END %]
256
                                        </select>
308
                                    </td>
257
                                    </td>
309
                                    <td>&nbsp;</td>
310
                                </tr>
258
                                </tr>
311
                                [% ELSE %]
259
                            [% END %]
312
                                <tr>
260
                        </tbody>
261
                    </table>
262
                [% END %]
263
                [% FOREACH index IN indexes %]
264
                    [% WRAPPER tab_panel tabname="mapping_${ index.index_name }" %]
265
                        <table class="mappings" data-index_name="[% index.index_name | html %]" data-ordering="false" id="mapping_[% index.index_name | html %]_table">
266
                            <thead>
267
                                <tr class="nodrag nodrop">
268
                                <th>Search field</th>
269
                                <th>Sortable</th>
270
                                <th>Facetable</th>
271
                                <th>Suggestible</th>
272
                                <th>Searchable</th>
273
                                <th>Mapping</th>
274
                                <th>&nbsp;</th>
275
                                </tr>
276
                            </thead>
277
                            <tbody>
278
                                [% FOREACH mapping IN index.mappings %]
279
                                    [% IF mapping.search_field_mandatory && mapping.search_field_label != loop.next.search_field_label && mapping.search_field_label != loop.prev.search_field_label %]
280
                                        <tr>
281
                                            <td>
282
                                                <input type="hidden" name="mapping_index_name" value="[% index.index_name | html %]" />
283
                                                <input type="hidden" name="mapping_search_field_name" value="[% mapping.search_field_name | html %]">
284
                                                [% mapping.search_field_name | html %]
285
                                                [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %]
286
                                            </td>
287
                                            <td>
288
                                                [% IF mapping.sort == 0 %]
289
                                                    <input type="hidden" name="mapping_sort" value="0" readonly />No
290
                                                [% ELSE %]
291
                                                    <input type="hidden" name="mapping_sort" value="1" readonly />Yes
292
                                                [% END %]
293
                                            </td>
294
                                            <td>
295
                                                <input type="hidden" name="mapping_facet" value="[% mapping.facet | html %]" readonly />[% IF mapping.facet == 1 %]Yes[% ELSE %]No[% END %]
296
                                            </td>
297
                                            <td>
298
                                                <input type="hidden" name="mapping_suggestible" value="[% mapping.suggestible | html %]" readonly />[% IF mapping.suggestible == 1 %]Yes[% ELSE %]No[% END %]
299
                                            </td>
300
                                            <td>
301
                                                <input type="hidden" name="mapping_search" value="[% mapping.search | html %]" readonly />[% IF mapping.search == 1 %]Yes[% ELSE %]No[% END %]
302
                                            </td>
303
                                            <td data-search="[% mapping.marc_field | html %]">
304
                                                <input name="mapping_marc_field" type="text" value="[% mapping.marc_field | html %]" />
305
                                            </td>
306
                                            <td>&nbsp;</td>
307
                                        </tr>
308
                                    [% ELSE %]
309
                                        <tr>
310
                                            <td>
311
                                                <input type="hidden" name="mapping_index_name" value="[% index.index_name | html %]" />
312
                                                <input type="hidden" name="mapping_search_field_name" value="[% mapping.search_field_name | html %]">
313
                                                [% mapping.search_field_name | html %]
314
                                                [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %]
315
                                            </td>
316
                                            <td>
317
                                                <select name="mapping_sort">
318
                                                    [% IF mapping.sort == 0 %]
319
                                                        <option value="0" selected="selected">No</option>
320
                                                        <option value="1">Yes</option>
321
                                                    [% ELSE %]
322
                                                        <option value="0">No</option>
323
                                                        <option value="1" selected="selected">Yes</option>
324
                                                    [% END %]
325
                                                </select>
326
                                            </td>
327
                                            <td>
328
                                                [% IF mapping.is_facetable %]
329
                                                    <select name="mapping_facet">
330
                                                        [% IF mapping.facet %]
331
                                                            <option value="0">No</option>
332
                                                            <option value="1" selected="selected">Yes</option>
333
                                                        [% ELSE %]
334
                                                            <option value="0" selected="selected">No</option>
335
                                                            <option value="1">Yes</option>
336
                                                        [% END %]
337
                                                    </select>
338
                                                [% ELSE %]
339
                                                    <input type="hidden" name="mapping_facet" value="0" />
340
                                                    No
341
                                                [% END %]
342
                                            </td>
343
                                            <td>
344
                                                <select name="mapping_suggestible">
345
                                                    [% IF mapping.suggestible %]
346
                                                        <option value="0">No</option>
347
                                                        <option value="1" selected="selected">Yes</option>
348
                                                    [% ELSE %]
349
                                                        <option value="0" selected="selected">No</option>
350
                                                        <option value="1">Yes</option>
351
                                                    [% END %]
352
                                                </select>
353
                                            </td>
354
                                            <td>
355
                                            <select name="mapping_search">
356
                                                [% IF mapping.search %]
357
                                                    <option value="0">No</option>
358
                                                    <option value="1" selected="selected">Yes</option>
359
                                                [% ELSE %]
360
                                                    <option value="0" selected="selected">No</option>
361
                                                    <option value="1">Yes</option>
362
                                                [% END %]
363
                                            </select>
364
                                            </td>
365
                                            <td data-search="[% mapping.marc_field | html %]">
366
                                                <input name="mapping_marc_field" type="text" value="[% mapping.marc_field | html %]" />
367
                                            </td>
368
                                            [% IF mapping.search_field_mandatory %]
369
                                                <td><a class="btn btn-default btn-xs delete mandatory" data-field_name="[% mapping.search_field_name | html %]" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>
370
                                            [% ELSE %]
371
                                                <td><a class="btn btn-default btn-xs delete" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>
372
                                            [% END %]
373
                                        </tr>
374
                                    [% END %]
375
                                [% END %]
376
                            </tbody>
377
                            <tfoot>
378
                                <tr class="nodrag nodrop">
313
                                    <td>
379
                                    <td>
314
                                    <input type="hidden" name="mapping_index_name" value="[% index.index_name | html %]" />
380
                                        <input data-id="mapping_index_name" type="hidden" value="[% index.index_name | html %]" />
315
                                    <input type="hidden" name="mapping_search_field_name" value="[% mapping.search_field_name | html %]">
381
                                        <select data-id="mapping_search_field_name">
316
                                    [% mapping.search_field_name | html %]
382
                                            [% FOREACH f IN all_search_fields %]
317
                                    [% IF mapping.search_field_label != mapping.search_field_name %] ([% mapping.search_field_label | html %])[% END %]
383
                                                <option value="[% f.name | html %]">[% f.name | html %][% IF f.label != f.name %] ([% f.label | html %])[% END %]</option>
384
                                            [% END %]
385
                                        </select>
318
                                    </td>
386
                                    </td>
319
                                    <td>
387
                                    <td>
320
                                    <select name="mapping_sort">
388
                                        <select data-id="mapping_sort">
321
                                        [% IF mapping.sort == 0 %]
389
                                        <option value="undef">Undef</option>
322
                                        <option value="0" selected="selected">No</option>
390
                                        <option value="0">0</option>
323
                                        <option value="1">Yes</option>
391
                                        <option value="1">1</option>
324
                                        [% ELSE %]
392
                                        </select>
325
                                        <option value="0">No</option>
326
                                        <option value="1" selected="selected">Yes</option>
327
                                        [% END %]
328
                                    </select>
329
                                    </td>
393
                                    </td>
330
                                    <td>
394
                                    <td>
331
                                    [% IF mapping.is_facetable %]
395
                                        <select data-id="mapping_facet">
332
                                        <select name="mapping_facet">
396
                                            [% IF mapping.facet %]
333
                                        [% IF mapping.facet %]
397
                                                <option value="0">No</option>
334
                                            <option value="0">No</option>
398
                                                <option value="1" selected="selected">Yes</option>
335
                                            <option value="1" selected="selected">Yes</option>
399
                                            [% ELSE %]
336
                                        [% ELSE %]
400
                                                <option value="0" selected="selected">No</option>
337
                                            <option value="0" selected="selected">No</option>
401
                                                <option value="1">Yes</option>
338
                                            <option value="1">Yes</option>
402
                                            [% END %]
339
                                        [% END %]
340
                                        </select>
403
                                        </select>
341
                                    [% ELSE %]
342
                                        <input type="hidden" name="mapping_facet" value="0" />
343
                                        No
344
                                    [% END %]
345
                                    </td>
404
                                    </td>
346
                                    <td>
405
                                    <td>
347
                                    <select name="mapping_suggestible">
406
                                        <select data-id="mapping_suggestible">
348
                                        [% IF mapping.suggestible %]
407
                                            [% IF mapping.suggestible %]
349
                                        <option value="0">No</option>
408
                                                <option value="0">No</option>
350
                                        <option value="1" selected="selected">Yes</option>
409
                                                <option value="1" selected="selected">Yes</option>
351
                                        [% ELSE %]
410
                                            [% ELSE %]
352
                                        <option value="0" selected="selected">No</option>
411
                                                <option value="0" selected="selected">No</option>
353
                                        <option value="1">Yes</option>
412
                                                <option value="1">Yes</option>
354
                                        [% END %]
413
                                            [% END %]
355
                                    </select>
414
                                        </select>
356
                                    </td>
415
                                    </td>
357
                                    <td>
416
                                    <td>
358
                                    <select name="mapping_search">
417
                                        <select data-id="mapping_search">
359
                                        [% IF mapping.search %]
418
                                            [% IF mapping.search %]
360
                                        <option value="0">No</option>
419
                                                <option value="0">No</option>
361
                                        <option value="1" selected="selected">Yes</option>
420
                                                <option value="1" selected="selected">Yes</option>
362
                                        [% ELSE %]
421
                                            [% ELSE %]
363
                                        <option value="0" selected="selected">No</option>
422
                                                <option value="0" selected="selected">No</option>
364
                                        <option value="1">Yes</option>
423
                                                <option value="1">Yes</option>
365
                                        [% END %]
424
                                            [% END %]
366
                                    </select>
425
                                        </select>
367
                                    </td>
368
                                    <td data-search="[% mapping.marc_field | html %]">
369
                                        <input name="mapping_marc_field" type="text" value="[% mapping.marc_field | html %]" />
370
                                    </td>
426
                                    </td>
371
                                    [% IF mapping.search_field_mandatory %]
427
                                    <td><input data-id="mapping_marc_field" type="text" /></td>
372
                                        <td><a class="btn btn-default btn-xs delete mandatory" data-field_name="[% mapping.search_field_name | html %]" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>
428
                                    <td><a class="btn btn-default btn-xs add"><i class="fa fa-plus"></i> Add</a></td>
373
                                    [% ELSE %]
374
                                        <td><a class="btn btn-default btn-xs delete" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a></td>
375
                                    [% END %]
376
                                </tr>
429
                                </tr>
377
                                [% END %]
430
                            </tfoot>
378
                            [% END %]
379
                        </tbody>
380
                        <tfoot>
381
                            <tr class="nodrag nodrop">
382
                            <td>
383
                                <input data-id="mapping_index_name" type="hidden" value="[% index.index_name | html %]" />
384
                                <select data-id="mapping_search_field_name">
385
                                [% FOREACH f IN all_search_fields %]
386
                                <option value="[% f.name | html %]">[% f.name | html %][% IF f.label != f.name %] ([% f.label | html %])[% END %]</option>
387
                                [% END %]
388
                                </select>
389
                            </td>
390
                            <td>
391
                                <select data-id="mapping_sort">
392
                                <option value="undef">Undef</option>
393
                                <option value="0">0</option>
394
                                <option value="1">1</option>
395
                                </select>
396
                            </td>
397
                            <td>
398
                                <select data-id="mapping_facet">
399
                                [% IF mapping.facet %]
400
                                    <option value="0">No</option>
401
                                    <option value="1" selected="selected">Yes</option>
402
                                [% ELSE %]
403
                                    <option value="0" selected="selected">No</option>
404
                                    <option value="1">Yes</option>
405
                                [% END %]
406
                                </select>
407
                            </td>
408
                            <td>
409
                                <select data-id="mapping_suggestible">
410
                                [% IF mapping.suggestible %]
411
                                    <option value="0">No</option>
412
                                    <option value="1" selected="selected">Yes</option>
413
                                [% ELSE %]
414
                                    <option value="0" selected="selected">No</option>
415
                                    <option value="1">Yes</option>
416
                                [% END %]
417
                                </select>
418
                            </td>
419
                            <td>
420
                                <select data-id="mapping_search">
421
                                [% IF mapping.search %]
422
                                    <option value="0">No</option>
423
                                    <option value="1" selected="selected">Yes</option>
424
                                [% ELSE %]
425
                                    <option value="0" selected="selected">No</option>
426
                                    <option value="1">Yes</option>
427
                                [% END %]
428
                                </select>
429
                            </td>
430
                            <td><input data-id="mapping_marc_field" type="text" /></td>
431
                            <td><a class="btn btn-default btn-xs add"><i class="fa fa-plus"></i> Add</a></td>
432
                            </tr>
433
                        </tfoot>
434
                        </table>
431
                        </table>
435
432
436
                        [% IF index.index_name == 'biblios' %]
433
                        [% IF index.index_name == 'biblios' %]
Lines 478-487 a.add, a.delete { Link Here
478
                                </table>
475
                                </table>
479
                            </div>
476
                            </div>
480
                        [% END %]
477
                        [% END %]
481
                    </div>
478
                    [% END # /WRAPPER tab_panel#mapping_{ index.index_name} %]
482
                [% END %]
479
                [% END # /FOREACH index %]
483
            </div> <!-- /.tab-content -->
480
            [% END # /WRAPPER tab_panels %]
484
        </div> <!-- /#tabs -->
481
        [% END # /WRAPPER tabs %]
482
485
        <fieldset class="action">
483
        <fieldset class="action">
486
            <button class="btn btn-primary" type="submit" name="op" value="edit"><i class="fa fa-hdd-o" aria-hidden="true"></i> Save</button>
484
            <button class="btn btn-primary" type="submit" name="op" value="edit"><i class="fa fa-hdd-o" aria-hidden="true"></i> Save</button>
487
            <button class="btn btn-default" type="submit" name="op" value="reset_confirm"><i class="fa fa-refresh" aria-hidden="true"></i> Reset mappings</button>
485
            <button class="btn btn-default" type="submit" name="op" value="reset_confirm"><i class="fa fa-refresh" aria-hidden="true"></i> Reset mappings</button>
488
- 

Return to bug 33180