2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Administration › Koha to MARC mapping</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 <body id="admin_koha2marclinks" class="admin">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'prefs-admin-search.inc' %]
12 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC Mapping</a></div>
14 <div id="doc3" class="yui-t2">
20 <h1>Koha to MARC mapping</h1>
22 <form action="/cgi-bin/koha/admin/koha2marclinks.pl" method="post" id="koha2marc">
25 <div class="dialog alert">Failed to add mapping for [% error_info %]</div>
28 <table id="kohafields">
37 [% FOREACH loo IN loop %]
39 <td>[% loo.kohafield %]</td>
40 <td>[% loo.tagfield %]</td>
41 <td>[% loo.tagsubfield %]</td>
42 <td>[% loo.liblibrarian %]</td>
44 [% IF !loo.readonly %]
45 <a onclick="AddFld('[% loo.kohafield %]');" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</a>
46 [% IF loo.tagfield %] <a onclick="RemFld('[% loo.tagfield %]','[% loo.tagsubfield %]');" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Remove</a> [% END %]
55 <input id="remove_field" name="remove_field" type="hidden" value=""/>
56 <input id="add_field" name="add_field" type="hidden" value=""/>
64 [% INCLUDE 'admin-menu.inc' %]
69 [% MACRO jsinclude BLOCK %]
70 [% INCLUDE 'datatables.inc' %]
71 <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script>
72 <script type="text/javascript">
73 function AddFld(kohafield) {
74 var fieldstr = prompt( _("Adding a mapping for: ") + kohafield + ".\n" + _("Please enter field tag and subfield code, separated by a comma. (For control fields: add '@' as subfield code.)\nThe change will be applied immediately.") );
75 var temp = fieldstr.split(',');
76 if( temp.length == 2 ) {
77 $('#add_field').val( kohafield+','+fieldstr );
78 $('#koha2marc').submit();
80 alert( "Invalid input. Enter something like: 245,a" );
84 function RemFld(tagfield, subfield ) {
85 if( confirm( _("Mapping will be removed for: ") + tagfield + subfield + ".\n" + _("The change will be applied immediately." ))) {
86 $('#remove_field').val(tagfield+','+subfield);
87 $('#koha2marc').submit();
90 $(document).ready(function() {
91 $("#kohafields").dataTable($.extend(true, {}, dataTablesDefaults, {
93 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
101 [% INCLUDE 'intranet-bottom.inc' %]