Jonathan Druart
afe3fa1d07
The 3 subroutines GetFieldMapping, SetFieldMapping and DeleteFieldMapping from the C4::Biblio module were only used from the field mappings admin page. They can easily replaced with new packages Koha::FieldMappings based on Koha::Object[s] Test plan: Add and delete field mappings (admin/fieldmapping.pl, Home › Administration › Keyword to MARC mapping). Add an existing mapping > Nothing should be added Note that this page has not been rewritten and you will not get any feedbacks, but it's not the goal of this page to improve it. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
88 lines
3.4 KiB
Text
88 lines
3.4 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Administration › Keyword to MARC mapping</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function() {
|
|
$('#selectframework').find("input:submit").hide();
|
|
$('#framework').change(function() {
|
|
$('#selectframework').submit();
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
|
<body id="admin_fieldmapping" class="admin">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'prefs-admin-search.inc' %]
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Keyword to MARC mapping</div>
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<h2>Keyword to MARC mapping</h2>
|
|
[% UNLESS ( fields.count ) %]
|
|
<div class="dialog message"><p>There are no mappings for the [% IF framework.frameworktext %]<em>[% framework.frameworktext %]</em>[% ELSE %]default[% END %] framework. </p></div>
|
|
[% END %]
|
|
<form method="get" action="/cgi-bin/koha/admin/fieldmapping.pl" id="selectframework">
|
|
<label for="framework">Framework:</label>
|
|
<select name="framework" id="framework" style="width:20em;">
|
|
<option value="">Default</option>
|
|
[% FOREACH f IN frameworks %]
|
|
[% IF f.frameworkcode == framework.frameworkcode %]
|
|
<option selected="selected" value="[% f.frameworkcode %]">[% f.frameworktext %]</option>
|
|
[% ELSE %]
|
|
<option value="[% f.frameworkcode %]">[% f.frameworktext %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<input type="submit" value="Go" />
|
|
</form>
|
|
|
|
|
|
<form method="post" action="" id="addfield">
|
|
<input type="hidden" name="framework" value="[% framework.frameworkcode %]" />
|
|
<fieldset class="rows">
|
|
<legend>Add a mapping</legend>
|
|
<ol>
|
|
<li><label for="fieldname">Field name: </label><input type="text" id="fieldname" name="fieldname" /></li>
|
|
<li><label for="marcfield">MARC field: </label><input type="text" id="marcfield" name="marcfield" size="3" /></li>
|
|
<li><label for="marcsubfield">MARC subfield: </label><input type="text" id="marcsubfield" name="marcsubfield" size="1" /></li>
|
|
</ol>
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" />
|
|
</fieldset>
|
|
</fieldset>
|
|
</form>
|
|
|
|
[% IF ( fields.count ) %]
|
|
<table>
|
|
<caption>Mappings for the [% IF framework.frameworktext %]<em>[% framework.frameworktext %]</em>[% ELSE %]default[% END %] framework</caption>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>MARC field</th>
|
|
<th>MARC subfield</th>
|
|
<th> </th>
|
|
</tr>
|
|
[% FOREACH field IN fields %]
|
|
<tr>
|
|
<td>[% field.field %]</td>
|
|
<td>[% field.fieldcode %]</td>
|
|
<td>[% field.subfieldcode %]</td>
|
|
<td><a class="btn btn-default btn-xs" href="?op=delete&id=[% field.id %]&framework=[% field.frameworkcode %]"><i class="fa fa-trash"></i> Delete</a></td>
|
|
</tr>
|
|
[% END %]
|
|
</table>[% END %]
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yui-b">
|
|
[% INCLUDE 'admin-menu.inc' %]
|
|
</div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|