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