Bug 22580: Remove deprecated delete_expired_opac_registrations.pl cronjob
[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
14 <div class="main container-fluid">
15     <div class="row">
16         <div class="col-sm-10 col-sm-push-2">
17             <main>
18
19             <h2>Keyword to MARC mapping</h2>
20             [% UNLESS ( fields.count ) %]
21                 <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>
22             [% END %]
23                         <form method="get" action="/cgi-bin/koha/admin/fieldmapping.pl" id="selectframework">
24                                 <label for="framework">Framework:</label>
25                 <select name="framework" id="framework" style="width:20em;">
26                     <option value="">Default</option>
27                 [% FOREACH f IN frameworks %]
28                     [% IF f.frameworkcode == framework.frameworkcode %]
29                     <option selected="selected" value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
30                     [% ELSE %]
31                     <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
32                     [% END %]
33                 [% END %]
34                 </select>
35                         <input type="submit" value="Go" />
36                         </form>
37
38
39                         <form method="post" action="" id="addfield">
40                 <input type="hidden" name="framework" value="[% framework.frameworkcode | html %]" />
41                                 <fieldset class="rows">
42                                 <legend>Add a mapping</legend>
43                                 <ol>
44                                         <li><label for="fieldname">Field name: </label><input type="text" id="fieldname" name="fieldname" /></li>
45                                         <li><label for="marcfield">MARC field: </label><input type="text" id="marcfield" name="marcfield" size="3" /></li>
46                                         <li><label for="marcsubfield">MARC subfield: </label><input type="text" id="marcsubfield" name="marcsubfield" size="1" /></li>
47                                 </ol>
48                                 <fieldset class="action">
49                                         <input type="submit" value="Submit" />
50                                 </fieldset>
51                                 </fieldset>
52                         </form>
53
54                 [% IF ( fields.count ) %]
55                     <table>
56                     <caption>Mappings for the [% IF framework.frameworktext %]<em>[% framework.frameworktext | html %]</em>[% ELSE %]default[% END %] framework</caption>
57                                                                         <tr>
58                                                                                 <th>Field</th>
59                                         <th>MARC field</th>
60                                         <th>MARC subfield</th>
61                                                                                 <th>&nbsp;</th>
62                                                                         </tr>
63                                                                         [% FOREACH field IN fields %]
64                                                                         <tr>
65                                         <td>[% field.field | html %]</td>
66                                                                                 <td>[% field.fieldcode | html %]</td>
67                                                                                 <td>[% field.subfieldcode | html %]</td>
68                                         <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>
69                                                                         </tr>
70                                                                         [% END %]
71                                                                 </table>[% END %]
72
73             </main>
74         </div> <!-- /.col-sm-10.col-sm-push-2 -->
75
76         <div class="col-sm-2 col-sm-pull-10">
77             <aside>
78                 [% INCLUDE 'admin-menu.inc' %]
79             </aside>
80         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
81      </div> <!-- /.row -->
82 [% MACRO jsinclude BLOCK %]
83     [% Asset.js("js/admin-menu.js") | $raw %]
84     <script type="text/javascript">
85     <script>
86         $(document).ready(function() {
87             $('#selectframework').find("input:submit").hide();
88             $('#framework').change(function() {
89                     $('#selectframework').submit();
90             });
91         });
92     </script>
93 [% END %]
94 [% INCLUDE 'intranet-bottom.inc' %]