+[% USE AuthorisedValues %]
+[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Administration ›
[% IF ( add_form ) %]MARC frameworks › [% action %] [% searchfield %][% END %]
[% IF ( delete_confirmed ) %]MARC frameworks › Data deleted[% END %]
[% IF ( else ) %]MARC frameworks[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-[% INCLUDE 'datatables.inc' %]
-
-<script type="text/javascript">
-//<![CDATA[
-
-$(document).ready(function() {
- $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
- "aoColumnDefs": [
- { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
- ],
- "sPaginationType": "four_button"
- }));
-});
-
-//]]>
-</script>
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
</head>
+
<body id="admin_marctagstructure" class="admin">
[% INCLUDE 'header.inc' %]
-[% INCLUDE 'cat-search.inc' %]
+[% INCLUDE 'prefs-admin-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
› <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
[% IF ( add_form ) %]
-› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
+› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END%]</a>
› [% action %] [% searchfield %]
[% ELSIF ( else ) %]
-› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
+› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
[% ELSIF ( delete_confirm ) %]
-› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
+› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
› Confirm deletion of tag '[% searchfield %]'
[% ELSIF ( delete_confirmed ) %]
-› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
+› <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
› Data deleted
[% END %]
</div>
[% IF ( else ) %]
<div id="toolbar" class="btn-toolbar">
- <a class="btn btn-small" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&frameworkcode=[% frameworkcode %]"><i class="icon-plus"></i> New tag</a>
+ <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>
</div>[% END %]
-<h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
+<h1>MARC Framework for [% IF framework %][% framework.frameworktext |html %] ([% framework.frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
[% IF ( add_form ) %]
<form action="[% script_name %]" name="Aform" method="post" class="validated">
-
+
<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" />
- <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
+ <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
- <ol> <li><label for="tagfield" class="required">Tag: </label><input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" /> <span class="required">Required</span></li>
+ <ol>
+ <li>
+ [% IF ( heading_modify_tag_p ) %]
+ <input type="hidden" name="tagfield" value="[% searchfield %]" />
+ <span class="label">Tag:</span>
+ [% searchfield %]
+ [% ELSE %]
+ <label for="tagfield" class="required">Tag: </label>
+ <input id="tagfield" type="text" name="tagfield" value="[% searchfield %]" maxlength="3" size="3" required="required" class="required" />
+ <span class="required">Required</span>
+ [% END %]
+ </li>
<li><label for="liblibrarian">Label for lib: </label><input type="text" id="liblibrarian" name="liblibrarian" value="[% liblibrarian |html %]" size="40" maxlength="100" /></li>
<li><label for="libopac">Label for opac: </label><input type="text" id="libopac" name="libopac" value="[% libopac |html %]" size="40" maxlength="100" /></li>
<li><label for="repeatable">Repeatable: </label>
<input type="checkbox" name="mandatory" id="mandatory" value="1" />
[% END %]
</li>
- <li><label for="authorised_value">Authorized value: </label>[% authorised_value %] (if you select a value here, the indicators will be limited to the authorized value list)</li>
+ <li><label for="authorised_value">Authorized value: </label>
+ <select name="authorised_value" id="authorised_value" size="1">
+ <option value=""></option>
+ [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => authorised_value ) %]
+ </select>
+ (if you select a value here, the indicators will be limited to the authorized value list)</li>
</ol></fieldset>
<fieldset class="action">
<input type="submit" value="Save changes" />
- <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
+ <a class="cancel" href="[% script_name %]?frameworkcode=[% framework.frameworkcode %]">Cancel</a>
</fieldset>
</form>
[% END %]
[% IF ( delete_confirm ) %]
-
-<div class="dialog alert"><h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
- <p>Tag: [% searchfield %]</p>
- <p>Description: [% liblibrarian %]</p>
- <form action="[% script_name %]" method="post">
- <input type="hidden" name="op" value="delete_confirmed" />
- <input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
- <input type="submit" class="approve" value="Yes, Delete this Tag" /></form>
-
- <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" value="No, Do Not Delete" class="deny" /></form></div>
+ <div class="dialog alert">
+ <h3>Confirm deletion of tag <span class="ex">'[% searchfield %]'</span>?</h3>
+ <p>Tag: [% searchfield %]</p>
+ <p>Description: [% liblibrarian %]</p>
+ <form action="[% script_name %]" method="post">
+ <input type="hidden" name="op" value="delete_confirmed" />
+ <input type="hidden" name="searchfield" value="[% searchfield %]" />
+ <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
+ <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
+ </form>
+ <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
+ <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
+ </form>
+ </div>
[% END %]
[% IF ( delete_confirmed ) %]
<div class="dialog message"><h3>Tag deleted</h3>
- <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
- <input type="submit" value="OK" class="approve" />
+ <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
+ <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
</form></div>
[% END %]
[% IF ( framework_create ) %]
<form action="[% script_name %]" method="post">
<input type="hidden" name="op" value="framework_create_confirm" />
- <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
- Create framework for [% frameworkcode %] ([% frameworktext %]) using
+ <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
+ Create framework for [% frameworkcode %] ([% framework.frameworktext |html %]) using
<select name="existingframeworkcode">
<option value="">Default</option>
[% FOREACH existingframeworkloo IN existingframeworkloop %]
- <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext %]</option>
+ <option value="[% existingframeworkloo.value %]">[% existingframeworkloo.frameworktext |html %]</option>
[% END %]
</select>
<input type="submit" value="OK" />
<label for="frameworkcode"><strong>In framework:</strong> </label>
<select id="frameworkcode" name="frameworkcode">
<option value="">Default</option>
- [% FOREACH frameworkloo IN frameworkloop %]
- [% IF ( frameworkloo.selected ) %]
- <option value="[% frameworkloo.value %]" selected="selected">[% frameworkloo.frameworktext %]</option>
+ [% FOREACH f IN frameworks %]
+ [% IF f.frameworkcode == framework.frameworkcode %]
+ <option value="[% f.frameworkcode %]" selected="selected">[% f.frameworktext |html %]</option>
[% ELSE %]
- <option value="[% frameworkloo.value %]">[% frameworkloo.frameworktext %]</option>
+ <option value="[% f.frameworkcode %]">[% f.frameworktext |html %]</option>
[% END %]
[% END %]
</select>
<input type="submit" value="Search" />
<p> <label for="select_display">Display only used tags/subfields</label>
[% IF ( select_display ) %]
- <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" onchange="this.form.submit();" />
+ <input type="checkbox" name="select_display" id="select_display" value="True" checked="checked" />
[% ELSE %]
- <input type="checkbox" name="select_display" id="select_display" value="True" onchange="this.form.submit();" />
+ <input type="checkbox" name="select_display" id="select_display" value="True" />
[% END %]</p>
</fieldset>
</form>
<th>Repeatable</th>
<th>Mandatory</th>
<th>Auth value</th>
- <th>Subfields</th>
- <th>Edit</th>
- <th>Delete</th>
+ <th> </th>
</tr>
- </thead>
+ </thead>
<tbody>
[% IF ( select_display ) %]
[% FOREACH loo IN loop %]
- [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
+ <tr>
<td>[% loo.tagfield %]</td>
- <td>[% loo.liblibrarian %]</td>
- <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
- <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
- <td>[% loo.authorised_value %]</td>
- <td><a href="[% loo.subfield_link %]">subfields</a></td>
- <td><a href="[% loo.edit %]">Edit</a></td>
- <td><a href="[% loo.delete %]">Delete</a></td>
- </tr>
- [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
- <td> </td>
- <td colspan="7">
+ <td>
+ [% loo.liblibrarian %]
[% FOREACH subfield IN loo.subfields %]
- <p> Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
- [% 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 %]
+ <p>
+ Tab:[% subfield.tab %] | $[% subfield.tagsubfield %]
+ [% 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 %]
</p>
[% END %]
</td>
+ <td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
+ <td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
+ <td>[% loo.authorised_value %]</td>
+ <td>
+ <div class="dropdown">
+ <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield %]" role="button" data-toggle="dropdown" href="#">
+ Actions <b class="caret"></b></a>
+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield %]">
+ <li><a href="[% loo.subfield_link %]"><i class="fa fa-eye"></i> Subfields</a></li>
+ <li><a href="[% loo.edit %]"><i class="fa fa-pencil"></i> Edit</a></li>
+ <li><a href="[% loo.delete %]"><i class="fa fa-trash"></i> Delete</a></li>
+ </ul>
+ </div>
+ </td>
</tr>
[% END %]
[% ELSE %]
[% FOREACH loo IN loop %]
- [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
+ <tr>
<td>[% loo.tagfield %]</td>
<td>[% loo.liblibrarian %]</td>
<td>[% IF ( loo.repeatable ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% IF ( loo.mandatory ) %]Yes[% ELSE %]No[% END %]</td>
<td>[% loo.authorised_value %]</td>
- <td><a href="[% loo.subfield_link %]">Subfields</a></td>
- <td><a href="[% loo.edit %]">Edit</a></td>
- <td><a href="[% loo.delete %]">Delete</a></td>
+ <td>
+ <div class="dropdown">
+ <a class="btn btn-default btn-xs dropdown-toggle" id="marctagactions[% loo.tagfield %]" role="button" data-toggle="dropdown" href="#">
+ Actions <b class="caret"></b></a>
+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="marctagactions[% loo.tagfield %]">
+ <li><a href="[% loo.subfield_link %]"><i class="fa fa-eye"></i> Subfields</a></li>
+ <li><a href="[% loo.edit %]"><i class="fa fa-pencil"></i> Edit</a></li>
+ <li><a href="[% loo.delete %]"><i class="fa fa-trash"></i> Delete</a></li>
+ </ul>
+ </div>
+ </td>
</tr>
[% END %]
[% END %]
[% INCLUDE 'admin-menu.inc' %]
</div>
</div>
+
+[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script>
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
+ "aoColumnDefs": [
+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+ ],
+ "sPaginationType": "four_button"
+ }));
+ $("#select_display").on("change",function(){
+ var checked = $(this).prop("checked") ? 1: 0;
+ $.cookie('marctagstructure_selectdisplay', checked);
+ this.form.submit();
+ });
+ });
+ </script>
+[% END %]
[% INCLUDE 'intranet-bottom.inc' %]