Bugzilla – Attachment 68512 Details for
Bug 13952
Import and export of authority types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13952: Import and export authority types
Bug-13952-Import-and-export-authority-types.patch (text/plain), 27.39 KB, created by
Katrin Fischer
on 2017-10-25 06:23:04 UTC
(
hide
)
Description:
Bug 13952: Import and export authority types
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-10-25 06:23:04 UTC
Size:
27.39 KB
patch
obsolete
>From 6f5562662bcd86ca571c2772da93092c65c506fb Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Tue, 26 Jan 2016 23:39:26 +0000 >Subject: [PATCH] Bug 13952: Import and export authority types > >This patch amends C4::ImportExportFramework to work for authority types as well as MARC frameworks. >New file: admin/import_export_authtype.pl >Update: Ensuring we are passing the right column to the right tables. >Update2: Making the error messages the same to be consistent with patch on Bug 15665 >Update3: Fixing merge conflicts >Update4: Fixing merge conflicts and removing tabs >Update5: Getting rid of warns, making sure Import and Export of default >authority will work >Update6: Merge conflicts and making sure export of default auth type >works >Update7: Fixing merge conflicts and updating buttons to bootstrap3 > >To test: >1) Go to Admin -> Authority types >2) Confirm there are two new columns 'Export' and 'Import' in the table >3) Click 'Export' on an existing authority type and choose a file type, click 'Export' >4) Confirm that the authority type is exported as your chosen file type. Save the file >5) Create a new authority type >6) Import into your new authority type using the file you just exported >7) Confirm you are taken to auth_tag_structure.pl >8) Go back to Authority types >9) Export your new authority type. View the exported file and confirm >the authtypecode has been updated to match the code you set for the new >auth type >10) Click 'Import' next to any existing authority type and attempt to import a file that is not XML, CSV or ODS. Confirm that this fails and you are asked to import a file of the correct file type >11) Confirm Export and Import work for the Default authority type >12) Go to Admin -> MARC bibliographic framework >13) Confirm that the 'Export' and 'Import' functions still work here as well > >Sponsored-by: Catalyst IT > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/ImportExportFramework.pm | 65 ++++++---- > admin/import_export_authtype.pl | 102 +++++++++++++++ > admin/import_export_framework.pl | 10 +- > .../prog/en/modules/admin/authtypes.tt | 141 +++++++++++++++++++-- > 4 files changed, 283 insertions(+), 35 deletions(-) > create mode 100755 admin/import_export_authtype.pl > >diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm >index bc02cca..ff3cec8 100644 >--- a/C4/ImportExportFramework.pm >+++ b/C4/ImportExportFramework.pm >@@ -193,7 +193,7 @@ Functions for handling import/export. > > =head2 ExportFramework > >-Export all the information of a Framework to an excel "xml" file or OpenDocument SpreadSheet "ods" file. >+Export all the information of a MARC or Authority Type Framework to an excel "xml" file, comma separated values "csv" file or OpenDocument SpreadSheet "ods" file. > > return : > succes >@@ -202,7 +202,7 @@ succes > > sub ExportFramework > { >- my ($frameworkcode, $xmlStrRef, $mode) = @_; >+ my ($frameworkcode, $xmlStrRef, $mode, $frameworktype) = @_; > > my $dbh = C4::Context->dbh; > if ($dbh) { >@@ -229,8 +229,15 @@ sub ExportFramework > } > } > >- if (_export_table('marc_tag_structure', $dbh, ($mode eq 'csv')?$xmlStrRef:$dom, ($mode eq 'ods')?$elementSS:$root, $frameworkcode, $mode)) { >- if (_export_table('marc_subfield_structure', $dbh, ($mode eq 'csv')?$xmlStrRef:$dom, ($mode eq 'ods')?$elementSS:$root, $frameworkcode, $mode)) { >+ my $table = 'marc_tag_structure'; >+ my $subtable = 'marc_subfield_structure'; >+ if ($frameworktype eq "authority") { >+ $table = 'auth_tag_structure'; >+ $subtable = 'auth_subfield_structure'; >+ } >+ >+ if (_export_table($table, $dbh, ($mode eq 'csv')?$xmlStrRef:$dom, ($mode eq 'ods')?$elementSS:$root, $frameworkcode, $mode, $frameworktype)) { >+ if (_export_table($subtable, $dbh, ($mode eq 'csv')?$xmlStrRef:$dom, ($mode eq 'ods')?$elementSS:$root, $frameworkcode, $mode, $frameworktype)) { > $$xmlStrRef = $dom->toString(1) if ($mode eq 'ods' || $mode eq 'excel'); > return 1; > } >@@ -245,20 +252,20 @@ sub ExportFramework > # Export all the data from a mysql table to an spreadsheet. > sub _export_table > { >- my ($table, $dbh, $dom, $root, $frameworkcode, $mode) = @_; >+ my ($table, $dbh, $dom, $root, $frameworkcode, $mode, $frameworktype) = @_; > if ($mode eq 'csv') { >- _export_table_csv($table, $dbh, $dom, $root, $frameworkcode); >+ _export_table_csv($table, $dbh, $dom, $root, $frameworkcode, $frameworktype); > } elsif ($mode eq 'ods') { >- _export_table_ods($table, $dbh, $dom, $root, $frameworkcode); >+ _export_table_ods($table, $dbh, $dom, $root, $frameworkcode, $frameworktype); > } else { >- _export_table_excel($table, $dbh, $dom, $root, $frameworkcode); >+ _export_table_excel($table, $dbh, $dom, $root, $frameworkcode, $frameworktype); > } > } > > # Export the mysql table to an csv file > sub _export_table_csv > { >- my ($table, $dbh, $strCSV, $root, $frameworkcode) = @_; >+ my ($table, $dbh, $strCSV, $root, $frameworkcode, $frameworktype) = @_; > > eval { > # First row with the name of the columns >@@ -274,6 +281,9 @@ sub _export_table_csv > $$strCSV .= chr(10); > # Populate rows with the data from mysql > $query = 'SELECT * FROM ' . $table . ' WHERE frameworkcode=?'; >+ if ($frameworktype eq "authority") { >+ $query = 'SELECT * FROM ' . $table . ' WHERE authtypecode=?'; >+ } > $sth = $dbh->prepare($query); > $sth->execute($frameworkcode); > my $data; >@@ -306,7 +316,7 @@ sub _export_table_csv > # Export the mysql table to an ods file > sub _export_table_ods > { >- my ($table, $dbh, $dom, $root, $frameworkcode) = @_; >+ my ($table, $dbh, $dom, $root, $frameworkcode, $frameworktype) = @_; > > eval { > my $elementTable = $dom->createElement('table:table'); >@@ -335,6 +345,9 @@ sub _export_table_ods > } > # Populate rows with the data from mysql > $query = 'SELECT * FROM ' . $table . ' WHERE frameworkcode=?'; >+ if ($frameworktype eq "authority") { >+ $query = 'SELECT * FROM ' . $table . ' WHERE authtypecode=?'; >+ } > $sth = $dbh->prepare($query); > $sth->execute($frameworkcode); > my $data; >@@ -370,7 +383,7 @@ sub _export_table_ods > # Export the mysql table to an excel-xml (openoffice/libreoffice compatible) file > sub _export_table_excel > { >- my ($table, $dbh, $dom, $root, $frameworkcode) = @_; >+ my ($table, $dbh, $dom, $root, $frameworkcode, $frameworktype) = @_; > > eval { > my $elementWS = $dom->createElement('Worksheet'); >@@ -400,6 +413,9 @@ sub _export_table_excel > } > # Populate rows with the data from mysql > $query = 'SELECT * FROM ' . $table . ' WHERE frameworkcode=?'; >+ if ($frameworktype eq "authority") { >+ $query = 'SELECT * FROM ' . $table . ' WHERE authtypecode=?'; >+ } > $sth = $dbh->prepare($query); > $sth->execute($frameworkcode); > my $data; >@@ -429,12 +445,6 @@ sub _export_table_excel > return 1; > }#_export_table_excel > >- >- >- >- >- >- > # Format chars problematics to a correct format for xml. > sub _parseContent2Xml > { >@@ -619,7 +629,7 @@ sub _getMeta > > =head2 ImportFramework > >-Import all the information of a Framework from a excel-xml/ods file. >+Import all the information of a MARC or Authority Type Framework from a excel-xml/ods file. > > return : > success >@@ -628,7 +638,7 @@ success > > sub ImportFramework > { >- my ($filename, $frameworkcode, $deleteFilename) = @_; >+ my ($filename, $frameworkcode, $deleteFilename, $frameworktype) = @_; > > my $tempdir; > my $ok = -1; >@@ -658,13 +668,21 @@ sub ImportFramework > # They are text files, so open it to read > open($dom, '<', $filename); > } >+ >+ my $table = 'marc_tag_structure'; >+ my $subtable = 'marc_subfield_structure'; >+ if ($frameworktype eq "authority") { >+ $table = 'auth_tag_structure'; >+ $subtable = 'auth_subfield_structure'; >+ } >+ > if ($dom) { > # Process both tables > my $numDeleted = 0; > my $numDeletedAux = 0; >- if (($numDeletedAux = _import_table($dbh, 'marc_tag_structure', $frameworkcode, $dom, ['frameworkcode', 'tagfield'], $extension)) >= 0) { >+ if (($numDeletedAux = _import_table($dbh, $table, $frameworkcode, $dom, ['frameworkcode', 'tagfield'], $extension, $frameworktype)) >= 0) { > $numDeleted += $numDeletedAux if ($numDeletedAux > 0); >- if (($numDeletedAux = _import_table($dbh, 'marc_subfield_structure', $frameworkcode, $dom, ['frameworkcode', 'tagfield', 'tagsubfield'], $extension)) >= 0) { >+ if (($numDeletedAux = _import_table($dbh, $subtable, $frameworkcode, $dom, ['frameworkcode', 'tagfield', 'tagsubfield'], $extension, $frameworktype)) >= 0) { > $numDeleted += $numDeletedAux if ($numDeletedAux > 0); > $ok = ($numDeleted > 0)?$numDeleted:0; > } >@@ -785,7 +803,7 @@ sub _check_validity_worksheet > # Import the data from an excel-xml/ods to mysql tables. > sub _import_table > { >- my ($dbh, $table, $frameworkcode, $dom, $PKArray, $format) = @_; >+ my ($dbh, $table, $frameworkcode, $dom, $PKArray, $format, $frameworktype) = @_; > my %fields2Delete; > my $query; > my @fields; >@@ -794,6 +812,9 @@ sub _import_table > @fields = @$PKArray; > shift @fields; > $query = 'SELECT ' . join(',', @fields) . ' FROM ' . $table . ' WHERE frameworkcode=?'; >+ if ($frameworktype eq "authority") { >+ $query = 'SELECT ' . join(',', @fields) . ' FROM ' . $table . ' WHERE authtypecode=?'; >+ } > my $sth = $dbh->prepare($query); > $sth->execute($frameworkcode); > my $field; >diff --git a/admin/import_export_authtype.pl b/admin/import_export_authtype.pl >new file mode 100755 >index 0000000..cbf4a16 >--- /dev/null >+++ b/admin/import_export_authtype.pl >@@ -0,0 +1,102 @@ >+#!/usr/bin/perl >+ >+# Copyright 2016 Aleisha Amohia <aleisha@catalyst.net.nz> >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+ >+use strict; >+use warnings; >+use CGI qw ( -utf8 ); >+use CGI::Cookie; >+use C4::Context; >+use C4::Auth qw/check_cookie_auth/; >+use C4::ImportExportFramework; >+ >+my %cookies = CGI::Cookie->fetch(); >+my $authenticated = 0; >+my ($auth_status, $sessionID); >+if (exists $cookies{'CGISESSID'}) { >+ ($auth_status, $sessionID) = check_cookie_auth( >+ $cookies{'CGISESSID'}->value, >+ { parameters => 'parameters_remaining_permissions' }, >+ ); >+} >+if ($auth_status eq 'ok') { >+ $authenticated = 1; >+} >+ >+my $input = new CGI; >+ >+unless ($authenticated) { >+ print $input->header(-type => 'text/plain', -status => '403 Forbidden'); >+ exit 0; >+} >+ >+my $authtypecode = $input->param('authtypecode') || 'default'; >+my $action = $input->param('action') || 'export'; >+ >+## Exporting >+if ($action eq 'export' && $input->request_method() eq 'GET') { >+ my $strXml = ''; >+ my $format = $input->param('type_export_' . $authtypecode); >+ if ($authtypecode eq 'default') { >+ $format = $input->param('type_export_'); >+ ExportFramework('', \$strXml, $format, 'authority'); >+ } else { >+ ExportFramework($authtypecode, \$strXml, $format, 'authority'); >+ } >+ >+ if ($format eq 'csv') { >+ # CSV file >+ >+ # Correctly set the encoding to output plain text in UTF-8 >+ binmode(STDOUT,':encoding(UTF-8)'); >+ print $input->header(-type => 'application/vnd.ms-excel', -attachment => 'export_' . $authtypecode . '.csv'); >+ print $strXml; >+ } elsif ($format eq 'excel') { >+ # Excel-xml file >+ print $input->header(-type => 'application/excel', -attachment => 'export_' . $authtypecode . '.xml'); >+ print $strXml; >+ } else { >+ # ODS file >+ my $strODS = ''; >+ createODS($strXml, 'en', \$strODS); >+ print $input->header(-type => 'application/vnd.oasis.opendocument.spreadsheet', -attachment => 'export_' . $authtypecode . '.ods'); >+ print $strODS; >+ } >+## Importing >+} elsif ($input->request_method() eq 'POST') { >+ my $ok = -1; >+ my $fieldname = 'file_import_' . $authtypecode; >+ my $filename = $input->param($fieldname); >+ # upload the input file >+ if ($filename && $filename =~ /\.(csv|ods|xml)$/i) { >+ my $extension = $1; >+ my $uploadFd = $input->upload($fieldname); >+ if ($uploadFd && !$input->cgi_error) { >+ my $tmpfilename = $input->tmpFileName($input->param($fieldname)); >+ $filename = $tmpfilename . '.' . $extension; # rename the tmp file with the extension >+ $ok = ImportFramework($filename, $authtypecode, 1, 'authority') if (rename($tmpfilename, $filename)); >+ } >+ } >+ if ($ok >= 0) { # If everything went ok go to the authority type marc structure >+ print $input->redirect( -location => '/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=' . $authtypecode); >+ } else { >+ # If something failed go to the list of authority types and show message >+ print $input->redirect( -location => '/cgi-bin/koha/admin/authtypes.pl?error_import_export=' . $authtypecode); >+ } >+} >diff --git a/admin/import_export_framework.pl b/admin/import_export_framework.pl >index de1f195..6ffeac7 100755 >--- a/admin/import_export_framework.pl >+++ b/admin/import_export_framework.pl >@@ -53,8 +53,12 @@ my $action = $input->param('action') || 'export'; > ## Exporting > if ($action eq 'export' && $input->request_method() eq 'GET') { > my $strXml = ''; >- my $format = $input->param('type_export_' . $framework_name); >- ExportFramework($frameworkcode, \$strXml, $format); >+ my $format = $input->param('type_export_' . $frameworkcode); >+ if ($frameworkcode eq 'default') { >+ ExportFramework('', \$strXml, $format, 'biblio'); >+ } else { >+ ExportFramework($frameworkcode, \$strXml, $format, 'biblio'); >+ } > > if ($format eq 'csv') { > # CSV file >@@ -86,7 +90,7 @@ if ($action eq 'export' && $input->request_method() eq 'GET') { > if ($uploadFd && !$input->cgi_error) { > my $tmpfilename = $input->tmpFileName(scalar $input->param($fieldname)); > $filename = $tmpfilename . '.' . $extension; # rename the tmp file with the extension >- $ok = ImportFramework($filename, $frameworkcode, 1) if (rename($tmpfilename, $filename)); >+ $ok = ImportFramework($filename, $frameworkcode, 1, 'biblio') if (rename($tmpfilename, $filename)); > } > } > if ($ok >= 0) { # If everything went ok go to the framework marc structure >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt >index 2f69f53..ddec06f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt >@@ -11,18 +11,85 @@ > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ >+ >+ /* Import/Export from/to spreadsheet */ >+ >+ var importing = false; >+ > $(document).ready(function() { > $("#authtypes").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ > { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ { "aTargets": [ 0, 1 ], "sType": "natural" }, > ], >+ "bSort": true, > "sPaginationType": "four_button" > })); > $("#authtypecode").on("blur",function(){ > toUC(this); >+ >+ $("body").css("cursor", "auto"); >+ $('.import_export_options').hide(); >+ $('a.import_export_fw').click(function() { >+ if (!importing) { >+ $('.import_export_options').hide(); >+ $(this).next().show('slide'); >+ } >+ return false; >+ }); >+ $('.import_export_close').click(function() { >+ if (!importing) { >+ $('.import_export_options').fadeOut('fast'); >+ $("body").css("cursor", "auto"); >+ return false; >+ } >+ }); >+ $('.input_import').val(""); >+ >+ var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search); >+ if (matches && matches.length > 1) { >+ alert(_("Error importing the authority type %s").format(decodeURIComponent(matches[1]))); >+ } >+ >+ $('input.input_import').change( function() { >+ var filename = $(this).val(); >+ if ( ! /(?:\.csv|\.ods|\.xml)$/.test(filename)) { >+ $(this).css("background-color","yellow"); >+ alert(_("Please select a CSV (.csv), ODS (.ods) or XML (.xml) spreadsheet file.")); >+ $(this).val(""); >+ $(this).css("background-color","white"); >+ } >+ }); >+ $('form.form_export').submit(function() { >+ $('.modal').modal("hide"); >+ return true; >+ }); >+ $('form.form_import').submit(function() { >+ var id = $(this).attr('id'); >+ var obj = $('#' + id + ' input:file'); >+ if (/(?:\.csv|\.ods|\.xml)$/.test(obj.val())) { >+ if (confirm(_("Do you really want to import the authority type fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup"))) { >+ var authtypecode = $('#' + id + ' input:hidden[name=authtypecode]').val(); >+ $('#importing_' + authtypecode).find("span").html(_("Importing to authority type: %s. Importing from file: %s").format("<strong>" + authtypecode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>")); >+ if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) { >+ var timestamp = new Date().getTime(); >+ $('#importing_' + authtypecode).find("img").attr('src', '[% interface %]/[% theme %]/img/loading-small.gif' + '?' +timestamp); >+ } >+ $('#importing_' + authtypecode).css('display', 'block'); >+ if (navigator.userAgent.toLowerCase().indexOf('firefox') == -1) $("body").css("cursor", "progress"); >+ importing = true; >+ $(".modal-footer,.closebtn").hide(); >+ return true; >+ } else >+ return false; >+ } >+ obj.css("background-color","yellow"); >+ alert(_("Please select a CSV (.csv), ODS (.ods) or XML (.xml) spreadsheet file.")); >+ obj.val(""); >+ obj.css("background-color","white"); >+ return false; > }); > }); >-//]]> > </script> > </head> > >@@ -164,15 +231,69 @@ > <td>[% authority_type.summary |html %]</td> > <td>[% authority_type.auth_tag_to_report %]</td> > <td> >- <div class="dropdown"> >- <a class="btn btn-default btn-xs dropdown-toggle" id="authtypeactions[% authority_type.authtypecode %]" role="button" data-toggle="dropdown" href="#"> >- Actions <b class="caret"></b></a> >- <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtypeactions[% authority_type.authtypecode %]"> >- <li><a href="auth_tag_structure.pl?authtypecode=[% authority_type.authtypecode %]" class="button parameters"><i class="fa fa-eye"></i> MARC structure</a></li> >- <li><a href="/cgi-bin/koha/admin/authtypes.pl?op=add_form&authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-pencil"></i> Edit</a></li> >- [% IF authority_type.authtypecode %]<li><a href="/cgi-bin/koha/admin/authtypes.pl?op=delete_confirm&authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-trash"></i> Delete</a></li>[% END %] >- </ul> >- </div> >+ <div class="dropdown"> >+ <a class="btn btn-default btn-xs dropdown-toggle" id="authtypeactions[% authority_type.authtypecode %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b></a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtypeactions[% authority_type.authtypecode %]"> >+ <li><a href="auth_tag_structure.pl?authtypecode=[% authority_type.authtypecode %]" class="button parameters"><i class="fa fa-eye"></i> MARC structure</a></li> >+ <li><a href="/cgi-bin/koha/admin/authtypes.pl?op=add_form&authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-pencil"></i> Edit</a></li> >+ [% IF authority_type.authtypecode %]<li><a href="/cgi-bin/koha/admin/authtypes.pl?op=delete_confirm&authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-trash"></i> Delete</a></li>[% END %] >+ <!-- Button to trigger modal --> >+ <li><a href="#" data-toggle="modal" data-target="#exportModal_[% authority_type.authtypecode %][% loop.count %]" title="Export authority type (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li> >+ <!-- Button to trigger modal --> >+ <li><a href="#" data-toggle="modal" data-target="#importModal_[% authority_type.authtypecode %][% loop.count %]" title="Import authority type (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-download"></i> Import</a></li> >+ </ul> >+ >+ <!-- Modal for export --> >+ <div class="modal" id="exportModal_[% authority_type.authtypecode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% authority_type.authtypecode %][% loop.count %]" aria-hidden="true"> >+ <div class="modal-dialog"> >+ <div class="modal-content"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="exportLabelexportModal_[% authority_type.authtypecode %][% loop.count %]">Export [% authority_type.authtypetext %] authority type</h3> >+ </div> >+ <form action="import_export_authtype.pl" name="form_[% authority_type.authtypecode %]" method="get" target="_blank" class="form_export"> >+ <div class="modal-body"> >+ <fieldset> >+ <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode %]" /> >+ <p><label for="csv_type_export_[% authority_type.authtypecode %][% loop.count %]"><input type="radio" name="type_export_[% authority_type.authtypecode %]" value="csv" id="csv_type_export_[% authority_type.authtypecode %][% loop.count %]" checked="checked" /> Export to CSV spreadsheet</label></p> >+ <p><label for="xml_type_export_[% authority_type.authtypecode %][% loop.count %]"><input type="radio" name="type_export_[% authority_type.authtypecode %]" value="excel" id="xml_type_export_[% authority_type.authtypecode %][% loop.count %]" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p> >+ <p><label for="ods_type_export_[% authority_type.authtypecode %][% loop.count %]"><input type="radio" name="type_export_[% authority_type.authtypecode %]" value="ods" id="ods_type_export_[% authority_type.authtypecode %][% loop.count %]" /> Export to OpenDocument spreadsheet format</label></p> >+ </fieldset> >+ </div> >+ <div class="modal-footer"> >+ <button type="submit" class="btn btn-default">Export</button> >+ <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> >+ </div> >+ </form> >+ </div> >+ </div> >+ </div> >+ >+ <!-- Modal for import --> >+ <div class="modal" id="importModal_[% authority_type.authtypecode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% authority_type.authtypecode %][% loop.count %]" aria-hidden="true"> >+ <div class="modal-dialog"> >+ <div class="modal-content"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="importLabelexportModal_[% authority_type.authtypecode %][% loop.count %]">Import [% authority_type.authtypecode %] authority type (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3> >+ </div> >+ <form action="/cgi-bin/koha/admin/import_export_authtype.pl" name="form_i_[% authority_type.authtypecode %]" id="form_i_[% authority_type.authtypecode %]" method="post" enctype="multipart/form-data" class="form_import"> >+ <div class="modal-body"> >+ <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode %]" /> >+ <input type="hidden" name="action" value="import" /> >+ <p><label for="file_import_[% authority_type.authtypecode %]">Upload file:</label> <input type="file" name="file_import_[% authority_type.authtypecode %]" id="file_import_[% authority_type.authtypecode %]" class="input_import" /></p> >+ <div id="importing_[% authority_type.authtypecode %]" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div> >+ </div> >+ <div class="modal-footer"> >+ <button type="submit" class="btn btn-default">Import</button> >+ <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button> >+ </div> >+ </form> >+ </div> >+ </div> >+ </div> >+ </div> > </td> > </tr> > [% END %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13952
:
44770
|
47326
|
47360
|
47364
|
50046
|
53065
|
53066
|
54840
|
54899
|
54900
|
57873
|
59831
|
64421
|
67914
|
67915
|
68299
|
68300
|
68301
|
68502
|
68512
|
68513
|
68514
|
68515
|
68556
|
69940
|
69941
|
69942
|
69943
|
69944
|
76665
|
76666
|
76667
|
76668
|
80794
|
80795
|
80796
|
80797
|
81248
|
82853
|
82854
|
82855
|
82856
|
82895
|
83024
|
83025
|
83026
|
83027
|
83028
|
85073
|
86549
|
86550
|
86551
|
86552
|
86553
|
86554
|
86555
|
103610
|
103611
|
103612
|
103613
|
103614
|
103615
|
103616
|
114170
|
114171
|
114172
|
114173
|
114174
|
114175
|
114176
|
114177
|
115379
|
115381
|
115382
|
115383
|
115384
|
115385
|
115386
|
115387
|
115388
|
125383
|
125384
|
125385
|
125386
|
125387
|
125388
|
125389
|
125390
|
128316
|
128317
|
128318
|
128319
|
128320
|
128321
|
128322
|
128323
|
128324
|
128325
|
128326
|
128327
|
128328
|
128329
|
128330
|
128331
|
130587
|
130917
|
130918
|
130919
|
130920
|
130921
|
130922
|
130923
|
130924
|
130925