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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-99 / +97 lines)
Lines 17-23 Link Here
17
    $(document).ready(function() {
17
    $(document).ready(function() {
18
        $("#table_biblio_frameworks").dataTable($.extend(true, {}, dataTablesDefaults, {
18
        $("#table_biblio_frameworks").dataTable($.extend(true, {}, dataTablesDefaults, {
19
            "aoColumnDefs": [
19
            "aoColumnDefs": [
20
                { "aTargets": [ -1, -2, -3, -4, -5 ], "bSortable": false, "bSearchable": false },
20
                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
21
                { "aTargets": [ 0, 1 ], "sType": "natural" },
21
                { "aTargets": [ 0, 1 ], "sType": "natural" },
22
            ],
22
            ],
23
            "bSort": true,
23
            "bSort": true,
Lines 205-275 Link Here
205
        <th>Code</th>
205
        <th>Code</th>
206
        <th>Description</th>
206
        <th>Description</th>
207
        <th>&nbsp;</th>
207
        <th>&nbsp;</th>
208
        <th>Edit</th>
209
        <th>Delete</th>
210
        <th title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)">Export</th>
211
        <th title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)">Import</th>
212
    </tr>
208
    </tr>
213
    </thead>
209
    </thead>
214
    <tbody>
210
    <tbody>
215
    <tr>
211
    <tr>
216
        <td>&nbsp;</td>
212
        <td>&nbsp;</td>
217
        <td>Default framework</td>
213
        <td>Default framework</td>
218
        <td><a href="marctagstructure.pl?frameworkcode=">MARC structure</a></td>
219
        <td>&nbsp;</td>
220
        <td>&nbsp;</td>
221
        <td>
214
        <td>
222
215
          <div class="dropdown">
223
            <!-- Button to trigger modal -->
216
            <a class="btn btn-mini dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
224
            <a href="#" data-toggle="modal" data-target="#exportModal_default">Export</a>
217
              Actions <b class="caret"></b>
225
            <!-- Modal -->
218
            </a>
219
            <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
220
              <li><a href="marctagstructure.pl?frameworkcode="><i class="fa fa-eye"></i> MARC structure</a></li>
221
              <!-- Trigger modal -->
222
              <li><a href="#" data-toggle="modal" data-target="#exportModal_default" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li>
223
              <!-- Trigger modal -->
224
              <li><a href="#" data-toggle="modal" data-target="#importModal_[% framework.frameworkcode %][% frameworks.count %]" title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-download"></i> Import</a></li>
225
            </ul>
226
            <!-- Modal to export default framework -->
226
            <div class="modal hide" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
227
            <div class="modal hide" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
227
                <div class="modal-header">
228
              <div class="modal-header">
228
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
229
                <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
229
                    <h3 id="exportLabelexportModal_default">Export default framework</h3>
230
                <h3 id="exportLabelexportModal_default">Export default framework</h3>
231
              </div>
232
              <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank"  class="form_export">
233
                <div class="modal-body">
234
                  <fieldset>
235
                    <input type="hidden" name="frameworkcode" value="" />
236
                    <p><label for="csv_type_export_default"><input type="radio" name="type_export_default" value="csv" id="csv_type_export_default" checked="checked" /> Export to CSV spreadsheet</label></p>
237
                    <p><label for="xml_type_export_default"><input type="radio" name="type_export_default" value="excel" id="xml_type_export_default" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p>
238
                    <p><label for="ods_type_export_default"><input type="radio" name="type_export_default" value="ods" id="ods_type_export_default" /> Export to OpenDocument spreadsheet format</label></p>
239
                  </fieldset>
230
                </div>
240
                </div>
231
                <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank"  class="form_export">
241
                <div class="modal-footer">
232
                    <div class="modal-body">
242
                  <button type="submit" class="btn">Export</button>
233
                        <fieldset>
243
                  <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
234
                            <input type="hidden" name="frameworkcode" value="" />
244
                </div>
235
                            <p><label for="csv_type_export_default"><input type="radio" name="type_export_defaul" value="csv" id="csv_type_export_default" checked="checked" /> Export to CSV spreadsheet</label></p>
245
              </form>
236
                            <p><label for="xml_type_export_default"><input type="radio" name="type_export_default" value="excel" id="xml_type_export_default" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p>
237
                            <p><label for="ods_type_export_default"><input type="radio" name="type_export_default" value="ods" id="ods_type_export_default" /> Export to OpenDocument spreadsheet format</label></p>
238
239
                        </fieldset>
240
                    </div>
241
                    <div class="modal-footer">
242
                        <button type="submit" class="btn">Export</button>
243
                        <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
244
                    </div>
245
                </form>
246
            </div>
246
            </div>
247
247
248
        </td>
248
            <!-- Modal to import default framework -->
249
        <td>
250
251
            <!-- Button to trigger modal -->
252
            <a href="#" data-toggle="modal" data-target="#importModal_[% framework.frameworkcode %][% frameworks.count %]">Import</a>
253
            <!-- Modal -->
254
            <div class="modal hide" id="importModal_[% framework.frameworkcode %][% frameworks.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count %]" aria-hidden="true">
249
            <div class="modal hide" id="importModal_[% framework.frameworkcode %][% frameworks.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count %]" aria-hidden="true">
255
                <div class="modal-header">
250
              <div class="modal-header">
256
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
251
                <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
257
                    <h3 id="importLabelexportModal_[% framework.frameworkcode %][% frameworks.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3>
252
                <h3 id="importLabelexportModal_[% framework.frameworkcode %][% frameworks.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h>
253
              </div>
254
              <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_default" id="form_i_default" method="post" enctype="multipart/form-data" class="form_import">
255
                <div class="modal-body">
256
                  <input type="hidden" name="frameworkcode" value="default" />
257
                  <input type="hidden" name="action" value="import" />
258
                  <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
259
                    <div id="importing_default" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
258
                </div>
260
                </div>
259
                <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_default" id="form_i_default" method="post" enctype="multipart/form-data" class="form_import">
261
                <div class="modal-footer">
260
                    <div class="modal-body">
262
                  <button type="submit" class="btn">Import</button>
261
                            <input type="hidden" name="frameworkcode" value="default" />
263
                  <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
262
                            <input type="hidden" name="action" value="import" />
264
                </div>
263
                            <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
265
              </form>
264
                            <div id="importing_default" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
265
                    </div>
266
                    <div class="modal-footer">
267
                        <button type="submit" class="btn">Import</button>
268
                        <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
269
                    </div>
270
                </form>
271
            </div>
266
            </div>
272
267
          </div>
273
        </td>
268
        </td>
274
    </tr>
269
    </tr>
275
270
Lines 277-337 Link Here
277
        <tr>
272
        <tr>
278
            <td>[% loo.frameworkcode %]</td>
273
            <td>[% loo.frameworkcode %]</td>
279
            <td>[% loo.frameworktext %]</td>
274
            <td>[% loo.frameworktext %]</td>
280
            <td><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]" >MARC structure</a></td>
281
            <td><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&amp;frameworkcode=[% loo.frameworkcode |html %]">Edit</a></td>
282
            <td><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&amp;frameworkcode=[% loo.frameworkcode |html %]">Delete</a></td>
283
            <td>
275
            <td>
284
276
              <div class="dropdown">
285
                <!-- Button to trigger modal -->
277
                <a class="btn btn-mini dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
286
                <a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode %][% loop.count %]">Export</a>
278
                  Actions <b class="caret"></b>
287
                <!-- Modal -->
279
                </a>
280
                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
281
                  <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]"><i class="fa fa-eye"></i> MARC structure</a></li>
282
                  <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&amp;frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-pencil"></i> Edit</a></li>
283
                  <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&amp;frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-trash"></i> Delete</a></li>
284
                  <!-- Trigger modal -->
285
                  <li><a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode %][% loop.count %]" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li>
286
                  <!-- Trigger modal -->
287
                  <li><a href="#" data-toggle="modal" data-target="#importModal_[% loo.frameworkcode %][% loop.count %]" title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-download"></i> Import</a></li>
288
                </ul>
289
                <!-- Modal to export other framework -->
288
                <div class="modal hide" id="exportModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
290
                <div class="modal hide" id="exportModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
289
                    <div class="modal-header">
291
                  <div class="modal-header">
290
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
292
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
291
                        <h3 id="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Export [% loo.frameworktext %] framework</h3>
293
                    <h3 id="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Export [% loo.frameworktext %] framework</h3>
294
                  </div>
295
                  <form action="import_export_framework.pl" name="form_[% loo.frameworkcode %]" method="get" target="_blank"  class="form_export">
296
                    <div class="modal-body">
297
                      <fieldset>
298
                        <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
299
                        <p><label for="csv_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="csv" id="csv_type_export_[% loo.frameworkcode %][% loop.count %]" checked="checked" /> Export to CSV spreadsheet</label></p>
300
                        <p><label for="xml_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="excel" id="xml_type_export_[% loo.frameworkcode %][% loop.count %]" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p>
301
                        <p><label for="ods_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="ods" id="ods_type_export_[% loo.frameworkcode %][% loop.count %]" /> Export to OpenDocument spreadsheet format</label></p>
302
                      </fieldset>
292
                    </div>
303
                    </div>
293
                    <form action="import_export_framework.pl" name="form_[% loo.frameworkcode %]" method="get" target="_blank"  class="form_export">
304
                    <div class="modal-footer">
294
                        <div class="modal-body">
305
                      <button type="submit" class="btn">Export</button>
295
                            <fieldset>
306
                      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
296
                                <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
307
                    </div>
297
                                <p><label for="csv_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="csv" id="csv_type_export_[% loo.frameworkcode %][% loop.count %]" checked="checked" /> Export to CSV spreadsheet</label></p>
308
                  </form>
298
                                <p><label for="xml_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="excel" id="xml_type_export_[% loo.frameworkcode %][% loop.count %]" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p>
299
                                <p><label for="ods_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="ods" id="ods_type_export_[% loo.frameworkcode %][% loop.count %]" /> Export to OpenDocument spreadsheet format</label></p>
300
301
                            </fieldset>
302
                        </div>
303
                        <div class="modal-footer">
304
                            <button type="submit" class="btn">Export</button>
305
                            <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
306
                        </div>
307
                    </form>
308
                </div>
309
                </div>
309
            </td>
310
            <td>
311
310
312
                <!-- Button to trigger modal -->
311
                <!-- Modal to import other framework -->
313
                <a href="#" data-toggle="modal" data-target="#importModal_[% loo.frameworkcode %][% loop.count %]">Import</a>
314
                <!-- Modal -->
315
                <div class="modal hide" id="importModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
312
                <div class="modal hide" id="importModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
316
                    <div class="modal-header">
313
                  <div class="modal-header">
317
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
314
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
318
                        <h3 id="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Import [% loo.frameworkcode %] framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3>
315
                    <h3 id="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Import [% loo.frameworkcode %] framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3>
316
                  </div>
317
                  <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_[% loo.frameworkcode %]" id="form_i_[% loo.frameworkcode %]" method="post" enctype="multipart/form-data" class="form_import">
318
                    <div class="modal-body">
319
                      <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
320
                      <input type="hidden" name="action" value="import" />
321
                      <p><label for="file_import_[% loo.frameworkcode %]">Upload file:</label> <input type="file" name="file_import_[% loo.frameworkcode %]" id="file_import_[% loo.frameworkcode %]" class="input_import" /></p>
322
                      <div id="importing_[% loo.frameworkcode %]" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
323
                    </div>
324
                    <div class="modal-footer">
325
                      <button type="submit" class="btn">Import</button>
326
                      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
319
                    </div>
327
                    </div>
320
                    <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_[% loo.frameworkcode %]" id="form_i_[% loo.frameworkcode %]" method="post" enctype="multipart/form-data" class="form_import">
328
                  </form>
321
                        <div class="modal-body">
322
                                <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
323
                                <input type="hidden" name="action" value="import" />
324
                                <p><label for="file_import_[% loo.frameworkcode %]">Upload file:</label> <input type="file" name="file_import_[% loo.frameworkcode %]" id="file_import_[% loo.frameworkcode %]" class="input_import" /></p>
325
                                <div id="importing_[% loo.frameworkcode %]" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
326
                        </div>
327
                        <div class="modal-footer">
328
                            <button type="submit" class="btn">Import</button>
329
                            <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
330
                        </div>
331
                    </form>
332
                </div>
329
                </div>
333
        </td>
330
              </div>
331
            </td>
334
        </tr>
332
        </tr>
333
335
    [% END %]
334
    [% END %]
336
</table>
335
</table>
337
336
338
- 

Return to bug 15966