Bug 13618: Remove filter when assigning array
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / fieldmapping.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Administration &rsaquo; Keyword to MARC mapping</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 </head>
8
9 <body id="admin_fieldmapping" class="admin">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'prefs-admin-search.inc' %]
12 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; Keyword to MARC mapping</div>
13 <div id="doc3" class="yui-t2">
14         <div id="yui-main">
15                 <div class="yui-b">
16             <h2>Keyword to MARC mapping</h2>
17             [% UNLESS ( fields.count ) %]
18                 <div class="dialog message"><p>There are no mappings for the [% IF framework.frameworktext %]<em>[% framework.frameworktext | html %]</em>[% ELSE %]default[% END %] framework. </p></div>
19             [% END %]
20                         <form method="get" action="/cgi-bin/koha/admin/fieldmapping.pl" id="selectframework">
21                                 <label for="framework">Framework:</label>
22                 <select name="framework" id="framework" style="width:20em;">
23                     <option value="">Default</option>
24                 [% FOREACH f IN frameworks %]
25                     [% IF f.frameworkcode == framework.frameworkcode %]
26                     <option selected="selected" value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
27                     [% ELSE %]
28                     <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
29                     [% END %]
30                 [% END %]
31                 </select>
32                         <input type="submit" value="Go" />
33                         </form>
34
35
36                         <form method="post" action="" id="addfield">
37                 <input type="hidden" name="framework" value="[% framework.frameworkcode | html %]" />
38                                 <fieldset class="rows">
39                                 <legend>Add a mapping</legend>
40                                 <ol>
41                                         <li><label for="fieldname">Field name: </label><input type="text" id="fieldname" name="fieldname" /></li>
42                                         <li><label for="marcfield">MARC field: </label><input type="text" id="marcfield" name="marcfield" size="3" /></li>
43                                         <li><label for="marcsubfield">MARC subfield: </label><input type="text" id="marcsubfield" name="marcsubfield" size="1" /></li>
44                                 </ol>
45                                 <fieldset class="action">
46                                         <input type="submit" value="Submit" />
47                                 </fieldset>
48                                 </fieldset>
49                         </form>
50
51                 [% IF ( fields.count ) %]
52                     <table>
53                     <caption>Mappings for the [% IF framework.frameworktext %]<em>[% framework.frameworktext | html %]</em>[% ELSE %]default[% END %] framework</caption>
54                                                                         <tr>
55                                                                                 <th>Field</th>
56                                         <th>MARC field</th>
57                                         <th>MARC subfield</th>
58                                                                                 <th>&nbsp;</th>
59                                                                         </tr>
60                                                                         [% FOREACH field IN fields %]
61                                                                         <tr>
62                                         <td>[% field.field | html %]</td>
63                                                                                 <td>[% field.fieldcode | html %]</td>
64                                                                                 <td>[% field.subfieldcode | html %]</td>
65                                         <td><a class="btn btn-default btn-xs" href="?op=delete&amp;id=[% field.id | html %]&amp;framework=[% field.frameworkcode | html %]"><i class="fa fa-trash"></i> Delete</a></td>
66                                                                         </tr>
67                                                                         [% END %]
68                                                                 </table>[% END %]
69
70
71                 </div>
72         </div>
73
74         <div class="yui-b">
75                 [% INCLUDE 'admin-menu.inc' %]
76         </div>
77
78 [% MACRO jsinclude BLOCK %]
79     [% Asset.js("js/admin-menu.js") | $raw %]
80     <script type="text/javascript">
81         $(document).ready(function() {
82             $('#selectframework').find("input:submit").hide();
83             $('#framework').change(function() {
84                     $('#selectframework').submit();
85             });
86         });
87     </script>
88 [% END %]
89 [% INCLUDE 'intranet-bottom.inc' %]