3 [% USE AuthorisedValues %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Administration ›
7 [% IF ( add_form ) %]MARC frameworks › [% IF heading_add_tag_p %]Add tag[% ELSE %]Modify tag[% END %] [% 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' %]
14 <body id="admin_marctagstructure" class="admin">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'prefs-admin-search.inc' %]
18 <div id="breadcrumbs">
19 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
21 › <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
23 › <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>
24 › [% IF heading_add_tag_p %]Add tag[% ELSE %]Modify tag[% END %] [% searchfield | html %]
26 › <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>
27 [% ELSIF ( delete_confirm ) %]
28 › <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>
29 › Confirm deletion of tag '[% searchfield | html %]'
30 [% ELSIF ( delete_confirmed ) %]
31 › <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>
36 <div class="main container-fluid">
38 <div class="col-sm-10 col-sm-push-2">
42 <div id="toolbar" class="btn-toolbar">
43 <a class="btn btn-default" 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>
46 <h1>MARC Framework for [% IF framework %][% framework.frameworktext | html %] ([% framework.frameworkcode | html %])[% ELSE %]default MARC framework[% END %]</h1>
50 <form action="[% script_name | html %]" name="Aform" method="post" class="validated">
52 <fieldset class="rows">
54 [% IF heading_add_tag_p %]
57 Modify tag <input type="hidden" name="modif" value="1" />[% searchfield | html %]
60 <input type="hidden" name="op" value="add_validate" />
61 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
64 [% IF ( heading_modify_tag_p ) %]
65 <input type="hidden" name="tagfield" value="[% searchfield | html %]" />
66 <span class="label">Tag:</span>
67 [% searchfield | html %]
69 <label for="tagfield" class="required">Tag: </label>
70 <input id="tagfield" type="text" name="tagfield" value="[% searchfield | html %]" maxlength="3" size="3" required="required" class="required" />
71 <span class="required">Required</span>
74 <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian | html %]" size="40" maxlength="100" /></li>
75 <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac | html %]" size="40" maxlength="100" /></li>
76 <li><label for="repeatable">Repeatable: </label>
77 [% IF ( repeatable ) %]
78 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
80 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
83 <li><label for="mandatory">Mandatory: </label>
84 [% IF ( mandatory ) %]
85 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
87 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
90 <li><label for="important">Important: </label>
91 [% IF ( important ) %]
92 <input type="checkbox" name="important" id="important" value="1" checked="checked" />
94 <input type="checkbox" name="important" id="important" value="1" />
97 <li><label for="ind1_defaultvalue">First indicator default value: </label>
98 <input id="ind1_defaultvalue" type="text" name="ind1_defaultvalue" value="[% ind1_defaultvalue | html %]" maxlength="1" size="1" />
100 <li><label for="ind2_defaultvalue">Second indicator default value: </label>
101 <input id="ind2_defaultvalue" type="text" name="ind2_defaultvalue" value="[% ind2_defaultvalue | html %]" maxlength="1" size="1" />
103 <li><label for="authorised_value">Authorized value: </label>
104 <select name="authorised_value" id="authorised_value" size="1">
105 <option value=""></option>
106 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
108 (if you select a value here, the indicators will be limited to the authorized value list)</li>
110 <fieldset class="action">
111 <input type="submit" value="Save changes" />
112 <a class="cancel" href="[% script_name | url %]?frameworkcode=[% framework.frameworkcode | uri %]">Cancel</a>
118 [% IF ( delete_confirm ) %]
119 <div class="dialog alert">
120 <h3>Confirm deletion of tag <span class="ex">'[% searchfield | html %]'</span>?</h3>
121 <p>Tag: [% searchfield | html %]</p>
122 <p>Description: [% liblibrarian | html %]</p>
123 <form action="[% script_name | html %]" method="post">
124 <input type="hidden" name="op" value="delete_confirmed" />
125 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
126 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
127 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
129 <form action="[% script_name | html %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
130 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
135 [% IF ( delete_confirmed ) %]
137 <div class="dialog message"><h3>Tag deleted</h3>
138 <form action="[% script_name | html %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
139 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
142 [% IF ( framework_create ) %]
144 <form action="[% script_name | html %]" method="post">
145 <input type="hidden" name="op" value="framework_create_confirm" />
146 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
147 Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using
148 <select name="existingframeworkcode">
149 <option value="">Default</option>
150 [% FOREACH existingframeworkloo IN existingframeworkloop %]
151 <option value="[% existingframeworkloo.value | html %]">[% existingframeworkloo.frameworktext | html %]</option>
154 <input type="submit" value="OK" />
160 <form name="f" action="[% script_name | html %]" method="post">
161 <fieldset style="padding:.5em;">
162 <label for="tag_search"><strong>Search for tag:</strong> </label>
163 <input type="text" name="searchfield" id="tag_search" size="4" value="[% searchfield | html %]" />
165 <label for="frameworkcode"><strong>In framework:</strong> </label>
166 <select id="frameworkcode" name="frameworkcode">
167 <option value="">Default</option>
168 [% FOREACH f IN frameworks %]
169 [% IF f.frameworkcode == framework.frameworkcode %]
170 <option value="[% f.frameworkcode | html %]" selected="selected">[% f.frameworktext | html %]</option>
172 <option value="[% f.frameworkcode | html %]">[% f.frameworktext | html %]</option>
176 <input type="submit" value="Search" />
177 <p> <label for="select_display">Display only used tags/subfields</label>
178 [% IF ( select_display ) %]
179 <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
181 <input type="checkbox" name="select_display" id="select_display" value="True" />
186 <table id="table_marctagstructure">
201 [% FOREACH loo IN loop %]
203 <td>[% loo.tagfield | html %]</td>
205 [% loo.liblibrarian | html %]
206 [% IF ( select_display ) %]
207 [% FOREACH subfield IN loo.subfields %]
209 Tab:[% subfield.tab | html %] | $[% subfield.tagsubfield | html %]
210 [% 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 %]
215 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
216 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
217 <td>[% IF ( loo.important ) %]Yes[% ELSE %]No[% END %]</td>
218 <td>[% loo.authorised_value | html %]</td>
219 <td>[% loo.ind1_defaultvalue | html %]</td>
220 <td>[% loo.ind2_defaultvalue | html %]</td>
222 <div class="btn-group dropup">
223 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
224 Actions <b class="caret"></b></a>
225 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield | html %]">
226 <li><a href="?op=add_form&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit tag</a></li>
227 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-eye"></i> View subfields</a></li>
228 <li><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit subfields</a></li>
229 <li><a href="?op=delete_confirm&searchfield=[% loo.tagfield | uri %]&frameworkcode=[% framework.frameworkcode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
240 </div> <!-- /.col-sm-10.col-sm-push-2 -->
242 <div class="col-sm-2 col-sm-pull-10">
244 [% INCLUDE 'admin-menu.inc' %]
246 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
247 </div> <!-- /.row -->
249 [% MACRO jsinclude BLOCK %]
250 [% INCLUDE 'datatables.inc' %]
251 [% Asset.js("js/admin-menu.js") | $raw %]
253 $(document).ready(function() {
254 $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
256 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
258 "sPaginationType": "full"
260 $("#select_display").on("change",function(){
261 var checked = $(this).prop("checked") ? 1: 0;
262 Cookies.set("marctagstructure_selectdisplay", checked);
268 [% INCLUDE 'intranet-bottom.inc' %]