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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-110 / +110 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-337 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>
226
            <div class="modal hide" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
219
            <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
227
                <div class="modal-header">
220
              <li><a href="marctagstructure.pl?frameworkcode="><i class="fa fa-eye"></i> MARC structure</a></li>
228
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
221
              <!-- Trigger modal -->
229
                    <h3 id="exportLabelexportModal_default">Export default framework</h3>
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>
230
                </div>
223
              <!-- Trigger modal -->
231
                <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank"  class="form_export">
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>
232
                    <div class="modal-body">
225
            </ul>
233
                        <fieldset>
226
          </div>
234
                            <input type="hidden" name="frameworkcode" value="" />
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>
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>
247
248
        </td>
227
        </td>
249
        <td>
228
    </tr>
250
229
251
            <!-- Button to trigger modal -->
230
<!-- Modal to export default framework -->
252
            <a href="#" data-toggle="modal" data-target="#importModal_[% framework.frameworkcode %][% frameworks.count %]">Import</a>
231
<div class="modal hide" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
253
            <!-- Modal -->
232
  <div class="modal-header">
254
            <div class="modal hide" id="importModal_[% framework.frameworkcode %][% frameworks.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count %]" aria-hidden="true">
233
    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
255
                <div class="modal-header">
234
    <h3 id="exportLabelexportModal_default">Export default framework</h3>
256
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
235
  </div>
257
                    <h3 id="importLabelexportModal_[% framework.frameworkcode %][% frameworks.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3>
236
  <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank"  class="form_export">
258
                </div>
237
    <div class="modal-body">
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">
238
      <fieldset>
260
                    <div class="modal-body">
239
        <input type="hidden" name="frameworkcode" value="" />
261
                            <input type="hidden" name="frameworkcode" value="default" />
240
        <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>
262
                            <input type="hidden" name="action" value="import" />
241
        <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>
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>
242
        <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>
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>
243
      </fieldset>
265
                    </div>
244
    </div>
266
                    <div class="modal-footer">
245
    <div class="modal-footer">
267
                        <button type="submit" class="btn">Import</button>
246
      <button type="submit" class="btn">Export</button>
268
                        <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
247
      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
269
                    </div>
248
    </div>
270
                </form>
249
  </form>
271
            </div>
250
</div>
272
251
273
        </td>
252
<!-- Modal to import default framework -->
274
    </tr>
253
<div class="modal hide" id="importModal_[% framework.frameworkcode %][% frameworks.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count %]" aria-hidden="true">
254
  <div class="modal-header">
255
    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
256
    <h3 id="importLabelexportModal_[% framework.frameworkcode %][% frameworks.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h>
257
  </div>
258
  <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">
259
    <div class="modal-body">
260
      <input type="hidden" name="frameworkcode" value="default" />
261
      <input type="hidden" name="action" value="import" />
262
      <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
263
      <div id="importing_default" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
264
    </div>
265
    <div class="modal-footer">
266
      <button type="submit" class="btn">Import</button>
267
      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
268
    </div>
269
  </form>
270
</div>
275
271
276
    [% FOREACH loo IN frameworks %]
272
    [% FOREACH loo IN frameworks %]
277
        <tr>
273
        <tr>
278
            <td>[% loo.frameworkcode %]</td>
274
            <td>[% loo.frameworkcode %]</td>
279
            <td>[% loo.frameworktext %]</td>
275
            <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>
276
            <td>
277
              <div class="dropdown">
278
                <a class="btn btn-mini dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
279
                  Actions <b class="caret"></b>
280
                </a>
281
                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
282
                  <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]"><i class="fa fa-eye"></i> MARC structure</a></li>
283
                  <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>
284
                  <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>
285
                  <!-- Trigger modal -->
286
                  <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>
287
                  <!-- Trigger modal -->
288
                  <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>
289
                </ul>
290
              </div>
291
            </td>
292
        </tr>
284
293
285
                <!-- Button to trigger modal -->
294
<!-- Modal to export other framework -->
286
                <a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode %][% loop.count %]">Export</a>
295
<div class="modal hide" id="exportModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
287
                <!-- Modal -->
296
  <div class="modal-header">
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">
297
    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
289
                    <div class="modal-header">
298
    <h3 id="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Export [% loo.frameworktext %] framework</h3>
290
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
299
  </div>
291
                        <h3 id="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Export [% loo.frameworktext %] framework</h3>
300
  <form action="import_export_framework.pl" name="form_[% loo.frameworkcode %]" method="get" target="_blank"  class="form_export">
292
                    </div>
301
    <div class="modal-body">
293
                    <form action="import_export_framework.pl" name="form_[% loo.frameworkcode %]" method="get" target="_blank"  class="form_export">
302
      <fieldset>
294
                        <div class="modal-body">
303
        <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
295
                            <fieldset>
304
        <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>
296
                                <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
305
        <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>
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>
306
        <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>
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>
307
      </fieldset>
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>
308
    </div>
309
    <div class="modal-footer">
310
      <button type="submit" class="btn">Export</button>
311
      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
312
    </div>
313
  </form>
314
</div>
300
315
301
                            </fieldset>
316
<!-- Modal to import other framework -->
302
                        </div>
317
<div class="modal hide" id="importModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
303
                        <div class="modal-footer">
318
  <div class="modal-header">
304
                            <button type="submit" class="btn">Export</button>
319
    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
305
                            <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
320
    <h3 id="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Import [% loo.frameworkcode %] framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3>
306
                        </div>
321
  </div>
307
                    </form>
322
  <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">
308
                </div>
323
    <div class="modal-body">
309
            </td>
324
      <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
310
            <td>
325
      <input type="hidden" name="action" value="import" />
326
      <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>
327
      <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>
328
    </div>
329
    <div class="modal-footer">
330
      <button type="submit" class="btn">Import</button>
331
      <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
332
    </div>
333
  </form>
334
</div>
311
335
312
                <!-- Button to trigger modal -->
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">
316
                    <div class="modal-header">
317
                        <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>
319
                    </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">
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>
333
        </td>
334
        </tr>
335
    [% END %]
336
    [% END %]
336
</table>
337
</table>
337
338
338
- 

Return to bug 15966