1 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Administration ›
5 [% IF ( add_form ) %]MARC frameworks › [% action %] [% searchfield %][% END %]
6 [% IF ( delete_confirm ) %]MARC frameworks › Confirm deletion of tag '[% searchfield %]'[% END %]
7 [% IF ( delete_confirmed ) %]MARC frameworks › Data deleted[% END %]
8 [% IF ( else ) %]MARC frameworks[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
13 <body id="admin_marctagstructure" class="admin">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'prefs-admin-search.inc' %]
17 <div id="breadcrumbs">
18 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
20 › <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
22 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END%]</a>
23 › [% action %] [% searchfield %]
25 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
26 [% ELSIF ( delete_confirm ) %]
27 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
28 › Confirm deletion of tag '[% searchfield %]'
29 [% ELSIF ( delete_confirmed ) %]
30 › <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
35 <div id="doc3" class="yui-t2">
41 <div id="toolbar" class="btn-toolbar">
42 <a class="btn btn-default btn-sm" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&frameworkcode=[% framework.frameworkcode %]"><i class="fa fa-plus"></i> New tag</a>
45 <h1>MARC Framework for [% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
49 <form action="[% script_name %]" name="Aform" method="post" class="validated">
51 <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action %][% END %]</legend> <input type="hidden" name="op" value="add_validate" />
52 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
56 [% IF ( heading_modify_tag_p ) %]
57 <input type="hidden" name="tagfield" value="[% searchfield %]" />
58 <span class="label">Tag:</span>
61 <label for="tagfield" class="required">Tag: </label>
62 <input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" />
63 <span class="required">Required</span>
66 <li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
67 <li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
68 <li><label for="repeatable">Repeatable: </label>
69 [% IF ( repeatable ) %]
70 <input type="checkbox" name="repeatable" id="repeatable" value="1" checked="checked" />
72 <input type="checkbox" name="repeatable" id="repeatable" value="1" />
75 <li><label for="mandatory">Mandatory: </label>
76 [% IF ( mandatory ) %]
77 <input type="checkbox" name="mandatory" id="mandatory" value="1" checked="checked" />
79 <input type="checkbox" name="mandatory" id="mandatory" value="1" />
82 <li><label for="authorised_value">Authorized value: </label>
83 <select name="authorised_value" id="authorised_value" size="1">
84 <option value=""></option>
85 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
87 (if you select a value here, the indicators will be limited to the authorized value list)</li>
89 <fieldset class="action">
90 <input type="submit" value="Save changes" />
91 <a class="cancel" href="[% script_name %]?frameworkcode=[% framework.frameworkcode %]">Cancel</a>
97 [% IF ( delete_confirm ) %]
98 <div class="dialog alert">
99 <h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
100 <p>Tag: [% searchfield %]</p>
101 <p>Description: [% liblibrarian %]</p>
102 <form action="[% script_name %]" method="post">
103 <input type="hidden" name="op" value="delete_confirmed" />
104 <input type="hidden" name="searchfield" value="[% searchfield %]" />
105 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
106 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
108 <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
109 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
114 [% IF ( delete_confirmed ) %]
116 <div class="dialog message"><h3>Tag deleted</h3>
117 <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
118 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
121 [% IF ( framework_create ) %]
123 <form action="[% script_name %]" method="post">
124 <input type="hidden" name="op" value="framework_create_confirm" />
125 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
126 Create framework for [% frameworkcode %] ([% framework.frameworktext |html %]) using
127 <select name="existingframeworkcode">
128 <option value="">Default</option>
129 [% FOREACH existingframeworkloo IN existingframeworkloop %]
130 <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext |html %]</option>
133 <input type="submit" value="OK" />
139 <form name="f" action="[% script_name %]" method="post">
140 <fieldset style="padding:.5em;">
141 <label for="searchfield"><strong>Search for tag:</strong> </label>
142 <input type="text" name="searchfield" id="searchfield" size="4" value="[% searchfield %]" />
144 <label for="frameworkcode"><strong>In framework:</strong> </label>
145 <select id="frameworkcode" name="frameworkcode">
146 <option value="">Default</option>
147 [% FOREACH f IN frameworks %]
148 [% IF f.frameworkcode == framework.frameworkcode %]
149 <option value="[% f.frameworkcode %]" selected="selected">[% f.frameworktext |html %]</option>
151 <option value="[% f.frameworkcode %]">[% f.frameworktext |html %]</option>
155 <input type="submit" value="Search" />
156 <p> <label for="select_display">Display only used tags/subfields</label>
157 [% IF ( select_display ) %]
158 <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
160 <input type="checkbox" name="select_display" id="select_display" value="True" />
165 <table id="table_marctagstructure">
177 [% IF ( select_display ) %]
178 [% FOREACH loo IN loop %]
180 <td>[% loo.tagfield %]</td>
182 [% loo.liblibrarian %]
183 [% FOREACH subfield IN loo.subfields %]
185 Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
186 [% subfield.liblibrarian %] [% IF ( subfield.kohafield ) %][% subfield.kohafield %][% END %][% IF ( subfield.repeatable ) %], repeatable[% END %][% IF ( subfield.mandatory ) %], Mandatory[% END %][% IF ( subfield.seealso ) %], See [% subfield.seealso %][% END %][% IF ( subfield.authorised_value ) %], [% subfield.authorised_value %][% END %][% IF ( subfield.authtypecode ) %], [% subfield.authtypecode %][% END %][% IF ( subfield.value_builder ) %], [% subfield.value_builder %][% END %]
190 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
191 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
192 <td>[% loo.authorised_value %]</td>
194 <div class="dropdown">
195 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield %]" role="button" data-toggle="dropdown" href="#">
196 Actions <b class="caret"></b></a>
197 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield %]">
198 <li><a href="[% loo.subfield_link %]"><i class="fa fa-eye"></i> Subfields</a></li>
199 <li><a href="[% loo.edit %]"><i class="fa fa-pencil"></i> Edit</a></li>
200 <li><a href="[% loo.delete %]"><i class="fa fa-trash"></i> Delete</a></li>
207 [% FOREACH loo IN loop %]
209 <td>[% loo.tagfield %]</td>
210 <td>[% loo.liblibrarian %]</td>
211 <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
212 <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
213 <td>[% loo.authorised_value %]</td>
215 <div class="dropdown">
216 <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield %]" role="button" data-toggle="dropdown" href="#">
217 Actions <b class="caret"></b></a>
218 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield %]">
219 <li><a href="[% loo.subfield_link %]"><i class="fa fa-eye"></i> Subfields</a></li>
220 <li><a href="[% loo.edit %]"><i class="fa fa-pencil"></i> Edit</a></li>
221 <li><a href="[% loo.delete %]"><i class="fa fa-trash"></i> Delete</a></li>
239 [% INCLUDE 'admin-menu.inc' %]
243 [% MACRO jsinclude BLOCK %]
244 [% INCLUDE 'datatables.inc' %]
245 <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script>
246 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
247 <script type="text/javascript">
248 $(document).ready(function() {
249 $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
251 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
253 "sPaginationType": "four_button"
255 $("#select_display").on("change",function(){
256 var checked = $(this).prop("checked") ? 1: 0;
257 $.cookie('marctagstructure_selectdisplay', checked);
263 [% INCLUDE 'intranet-bottom.inc' %]