3 [% USE AuthorisedValues %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration ›
7 [% IF ( add_form ) %]MARC frameworks › [% action | html %] [% searchfield | html %][% END %]
8 [% IF ( delete_confirm ) %]MARC frameworks › Confirm deletion of tag '[% searchfield | html %]'[% END %]
9 [% IF ( delete_confirmed ) %]MARC frameworks › Data deleted[% END %]
10 [% IF ( else ) %]MARC frameworks[% END %]</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% Asset.css("css/datatables.css") | $raw %]
15 <body id="admin_marctagstructure" class="admin">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'prefs-admin-search.inc' %]
19 <div id="breadcrumbs">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
22 › <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
24 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END%]</a>
25 › [% action | html %] [% searchfield | html %]
27 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END %]</a>
28 [% ELSIF ( delete_confirm ) %]
29 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END %]</a>
30 › Confirm deletion of tag '[% searchfield | html %]'
31 [% ELSIF ( delete_confirmed ) %]
32 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]Default MARC framework[% END %]</a>
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
43 <div id="toolbar" class="btn-toolbar">
44 <a class="btn btn-default btn-sm" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-plus"></i> New tag</a>
47 <h1>MARC Framework for [% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]default MARC framework[% END %]</h1>
51 <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
53 <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield | html %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action | html %][% END %]</legend> <input type="hidden" name="op" value="add_validate" />
54 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
58 [% IF ( heading_modify_tag_p ) %]
59 <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
60 <span class="label">Tag:</span>
61 [% searchfield | html %]
63 <label for="tagfield" class="required">Tag: </label>
64 <input id="tagfield" type="text" name="tagfield" value="[% searchfield | html %]" maxlength="3" size="3" required="required" class="required" />
65 <span class="required">Required</span>
68 <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
69 <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
70 <li><label for="repeatable">Repeatable: </label>
71 [% IF ( repeatable ) %]
72 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
74 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
77 <li><label for="mandatory">Mandatory: </label>
78 [% IF ( mandatory ) %]
79 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
81 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
84 <li><label for="ind1_defaultvalue">First indicator default value: </label>
85 <input id="ind1_defaultvalue" type="text" name="ind1_defaultvalue" value="[% ind1_defaultvalue | html %]" maxlength="1" size="1" />
87 <li><label for="ind2_defaultvalue">Second indicator default value: </label>
88 <input id="ind2_defaultvalue" type="text" name="ind2_defaultvalue" value="[% ind2_defaultvalue | html %]" maxlength="1" size="1" />
90 <li><label for="authorised_value">Authorized value: </label>
91 <select name="authorised_value" id="authorised_value" size="1">
92 <option value=""></option>
93 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
95 (if you select a value here, the indicators will be limited to the authorized value list)</li>
97 <fieldset class="action">
98 <input type="submit" value="Save changes" />
99 <a class="cancel" href="[% script_name | url %]?frameworkcode=[% framework.frameworkcode | html %]">Cancel</a>
105 [% IF ( delete_confirm ) %]
106 <div class="dialog alert">
107 <h3>Confirm deletion of tag <span class="ex">'[% searchfield | html %]'</span>?</h3>
108 <p>Tag: [% searchfield | html %]</p>
109 <p>Description: [% liblibrarian | html %]</p>
110 <form action="[% script_name | html %]" method="post">
111 <input type="hidden" name="op" value="delete_confirmed" />
112 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
113 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
114 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
116 <form action="[% script_name | html %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
117 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
122 [% IF ( delete_confirmed ) %]
124 <div class="dialog message"><h3>Tag deleted</h3>
125 <form action="[% script_name | html %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
126 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
129 [% IF ( framework_create ) %]
131 <form action="[% script_name | html %]" method="post">
132 <input type="hidden" name="op" value="framework_create_confirm" />
133 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
134 Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using
135 <select name="existingframeworkcode">
136 <option value="">Default</option>
137 [% FOREACH existingframeworkloo IN existingframeworkloop %]
138 <option value="[% existingframeworkloo.value | html %]">[% existingframeworkloo.frameworktext | html %]</option>
141 <input type="submit" value="OK" />
147 <form name="f" action="[% script_name | html %]" method="post">
148 <fieldset style="padding:.5em;">
149 <label for="searchfield"><strong>Search for tag:</strong> </label>
150 <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield | html %]" />
152 <label for="frameworkcode"><strong>In framework:</strong> </label>
153 <select id="frameworkcode" name="frameworkcode">
154 <option value="">Default</option>
155 [% FOREACH f IN frameworks %]
156 [% IF f.frameworkcode == framework.frameworkcode %]
157 <option value="[% f.frameworkcode | html %]" selected="selected">[% f.frameworktext | html %]</option>
159 <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
163 <input type="submit" value="Search" />
164 <p> <label for="select_display">Display only used tags/subfields</label>
165 [% IF ( select_display ) %]
166 <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
168 <input type="checkbox" name="select_display" id="select_display" value="True" />
173 <table id="table_marctagstructure">
187 [% FOREACH loo IN loop %]
189 <td>[% loo.tagfield | html %]</td>
191 [% loo.liblibrarian | html %]
192 [% IF ( select_display ) %]
193 [% FOREACH subfield IN loo.subfields %]
195 Tab:[% subfield.tab | html %] | $[% subfield.tagsubfield | html %]
196 [% subfield.liblibrarian | html %] [% IF ( subfield.kohafield ) %][% subfield.kohafield | html %][% END %][% IF ( subfield.repeatable ) %], repeatable[% END %][% IF ( subfield.mandatory ) %], Mandatory[% END %][% IF ( subfield.seealso ) %], See [% subfield.seealso | html %][% END %][% IF ( subfield.authorised_value ) %], [% subfield.authorised_value | html %][% END %][% IF ( subfield.authtypecode ) %], [% subfield.authtypecode | html %][% END %][% IF ( subfield.value_builder ) %], [% subfield.value_builder | html %][% END %]
201 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
202 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
203 <td>[% loo.authorised_value | html %]</td>
204 <td>[% loo.ind1_defaultvalue | html %]</td>
205 <td>[% loo.ind2_defaultvalue | html %]</td>
207 <div class="dropdown">
208 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
209 Actions <b class="caret"></b></a>
210 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">
211 <li><a href="marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-eye"></i> Subfields</a></li>
212 <li><a href="?op=add_form&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
213 <li><a href="?op=delete_confirm&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
224 </div> <!-- /.col-sm-10.col-sm-push-2 -->
226 <div class="col-sm-2 col-sm-pull-10">
228 [% INCLUDE 'admin-menu.inc' %]
230 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
231 </div> <!-- /.row -->
233 [% MACRO jsinclude BLOCK %]
234 [% INCLUDE 'datatables.inc' %]
235 [% Asset.js("js/admin-menu.js") | $raw %]
236 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
238 $(document).ready(function() {
239 $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
241 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
243 "sPaginationType": "four_button"
245 $("#select_display").on("change",function(){
246 var checked = $(this).prop("checked") ? 1: 0;
247 $.cookie('marctagstructure_selectdisplay', checked);
253 [% INCLUDE 'intranet-bottom.inc' %]