Bug 9573: Lost items report - Add a new itemlost_on column
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marc_subfields_structure.tt
index a0177db..da640d1 100644 (file)
@@ -1,85 +1,55 @@
+[% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Administration &rsaquo;[% IF ( add_form ) %][% IF ( use_heading_flags_p ) %][% IF ( heading_edit_subfields_p ) %] MARC subfield structure &rsaquo; Edit MARC subfields constraints[% END %][% ELSE %] MARC subfield structure &rsaquo; [% action %][% END %][% END %]
 [% IF ( delete_confirm ) %] MARC subfield structure &rsaquo; Confirm deletion of subfield [% tagsubfield %][% END %][% IF ( delete_confirmed ) %] MARC subfield structure &rsaquo; Subfield deleted[% END %][% IF ( else ) %]MARC subfield structure[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-
-$(document).ready(function() {
-    $('#subfieldtabs').tabs();
-        $("a.displaymore").click(function(){
-        var link = $(this);
-        var constraints = $("#"+$(this).attr("href").replace("#",""));
-        constraints.toggle();
-            if($(constraints).is(':visible')){
-                link.html(_("Hide constraints"));
-            } else {
-                link.html(_("Display more constraints"));
-            }
-    });
-});
-
-/*function displayMoreConstraint(numlayer){
-    var thisdiv = document.getElementById(numlayer);
-    if(thisdiv.getAttribute("class") == "content_hidden"){
-        thisdiv.removeAttribute('class');
-        thisdiv.setAttribute("class","content_visible");
-    } else {
-        thisdiv.removeAttribute('class');
-        thisdiv.setAttribute("class","content_hidden");
-    }
-}*/
-
-//]]>
-</script>
 </head>
+
 <body id="admin_marc_subfields_structure" 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> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]&amp;searchfield=[% tagfield %]">[% frameworkcode %] framework structure</a> &rsaquo;
+  <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> &rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]&amp;searchfield=[% tagfield | uri %]">[% IF ( frameworkcode ) %][% frameworkcode %][% ELSE %]Default[% END %] framework structure</a> &rsaquo;
   [% IF ( add_form ) %]
   [% IF ( use_heading_flags_p ) %]
-  [% IF ( heading_edit_subfields_p ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] subfield structure</a> &rsaquo; Edit subfields constraints
+  [% IF ( heading_edit_subfields_p ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield | html %] subfield structure</a> &rsaquo; Edit subfields constraints
   [% END %]
-  [% ELSE %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield structure</a> &rsaquo; [% action %]
+  [% ELSE %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield | html %] Subfield structure</a> &rsaquo; [% action %]
   [% END %]
   [% END %]
-[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] Subfield structure</a> &rsaquo; Confirm deletion of subfield [% tagsubfield %]
+[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield | html %] Subfield structure</a> &rsaquo; Confirm deletion of subfield [% tagsubfield %]
 [% END %]
-[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield %] subfield structure</a> &rsaquo; Subfield deleted
+[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode %]">Tag [% tagfield | html %] subfield structure</a> &rsaquo; Subfield deleted
 [% END %]
-[% IF ( else ) %]Tag [% tagfield %] Subfield structure[% END %]
+[% IF ( else ) %]Tag [% tagfield | html %] Subfield structure[% END %]
 </div>
 
-<div id="doc" class="yui-t7">
-   
-   <div id="bd">
-       <div id="yui-main">
-       <div class="yui-g">
+<div id="doc3" class="yui-t2">
+
+    <div id="bd">
+    <div id="yui-main">
+    <div class="yui-b">
 
 [% IF ( add_form ) %]
     <h1>
         [% IF ( use_heading_flags_p ) %]
-            [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield %] Subfield constraints[% END %]
+            [% IF ( heading_edit_subfields_p ) %]Tag [% tagfield | html %] Subfield constraints[% END %]
         [% ELSE %]
             [% action %]
         [% END %]
     </h1>
     <form action="[% script_name %]" name="Aform" method="post">
     <input type="hidden" name="op" value="add_validate" />
-       <input type="hidden" name="tagfield" value="[% tagfield %]" />
+    <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
     <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
-    <input type="submit" value="Save changes" />
-    
     <div id="subfieldtabs" class="toptabs numbered">
    <ul>
         [% FOREACH loo IN loop %]
             [% IF ( loo.new_subfield ) %]
-                <li><a href="#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian %]">New</a></li>
+                <li><a href="#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian | html_entity %]">New</a></li>
             [% ELSE %]
-                <li><a href="#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian %]">
+                <li><a href="#sub[% loo.urisubfieldcode %]field" title="[% loo.liblibrarian | html_entity %]">
                     [% loo.subfieldcode %]
                </a></li>
             [% END %]
@@ -87,109 +57,219 @@ $(document).ready(function() {
     </ul>
     
     [% FOREACH loo IN loop %] 
-        <div id="sub[% loo.urisubfieldcode %]field">
-        
-               <fieldset class="rows" style="float:none;"><legend>[% IF ( loo.new_subfield ) %]Add new subfield[% ELSE %]Basic constraints[% END %]</legend>
+        <div class="constraints" id="sub[% loo.urisubfieldcode %]field">
+
+               <h3><a href="#basic[% loo.urisubfieldcode %]">Basic constraints</a></h3>
+                    <div id="basic[% loo.urisubfieldcode %]">
+                    <fieldset class="rows">
                        <ol>
                                [% IF ( subfieldcode == 0 || subfieldcode ) %] 
                                <li><span class="label">Subfield code:</span> [% loo.subfieldcode %] <input type="hidden" name="tagsubfield" value="[% loo.subfieldcode %]" /></li>
                                [% ELSE %]
                                <li><label for="tagsubfield[% loo.row %]">Subfield code:</label> <input type="text" id="tagsubfield[% loo.row %]" name="tagsubfield" value="[% loo.subfieldcode %]" /></li>
                                [% END %]
-                               <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian %]" size="40" maxlength="80" /></li>
-                               <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li>
-                               <li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]</li>
-                               <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li>
-                               <li><label for="tab[% loo.row %]">Managed in tab: </label>[% loo.tab %] (ignore means that the subfield does not display in the record editor)</li>
+                        <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian | html_entity %]" size="40" maxlength="80" /></li>
+                        <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac | html_entity %]" size="40" maxlength="80" /></li>
+                        <li>
+                            <label for="repeatable[% loo.row %]">Repeatable: </label>
+                            [% IF loo.repeatable %]
+                                <input type="checkbox" id="repeatable[% loo.row %]" name="repeatable[% loo.row %]" checked="checked" value="1" />
+                            [% ELSE %]
+                                <input type="checkbox" id="repeatable[% loo.row %]" name="repeatable[% loo.row %]" value="1" />
+                            [% END %]
+                        </li>
+                        <li>
+                            <label for="mandatory[% loo.row %]">Mandatory: </label>
+                            [% IF loo.mandatory %]
+                                <input type="checkbox" id="mandatory[% loo.row %]" name="mandatory[% loo.row %]" checked="checked" value="1" />
+                            [% ELSE %]
+                                <input type="checkbox" id="mandatory[% loo.row %]" name="mandatory[% loo.row %]" value="1" />
+                            [% END %]
+                        </li>
+                        <li><label for="tab[% loo.row %]">Managed in tab: </label>
+                            <select name="tab" tabindex="" size="1" id="tab[% loo.row %]">
+                            [%- IF ( loo.tab ==  -1 ) -%]
+                                <option value="-1" selected="selected">ignore</option>
+                            [%- ELSE -%]
+                                <option value="-1">ignore</option>
+                            [%- END -%]
+                            [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -%]
+                                [%- IF ( loo.tab ==  t ) -%]
+                                <option value="[%- t -%]" selected="selected">[%- t -%]</option>
+                                [%- ELSE -%]
+                                <option value="[%- t -%]">[%- t -%]</option>
+                                [%- END -%]
+                            [%- END -%]
+                            [%- IF ( loo.tab ==  10 ) -%]
+                                <option value="10" selected="selected">items (10)</option>
+                            [%- ELSE -%]
+                                <option value="10">items (10)</option>
+                            [%- END -%]
+                            </select>
+                            (ignore means that the subfield does not display in the record editor)
+                        </li>
                        </ol>
-            </fieldset>
-                       
-            <a class="displaymore" href="#more[% loo.urisubfieldcode %]">Display more constraints</a>
-            <div id="more[% loo.urisubfieldcode %]" style="display:none; clear: both">
-             <fieldset class="rows" style="float:none;">
-                               <legend>Advanced constraints:</legend>
+                    </fieldset>
+                    </div>
+
+
+            <h3><a href="#advanced[% loo.urisubfieldcode %]">Advanced constraints</a></h3>
+            <div id="advanced[% loo.urisubfieldcode %]">
+            <fieldset class="rows">
                 <ol><li><label for="defaultvalue[% loo.row %]">Default value:</label>
                     <input type="text" name="defaultvalue" id="defaultvalue[% loo.row %]" value="[% loo.defaultvalue %]" /></li>
                                <li><label for="maxlength[% loo.row %]">Max length:</label><input type="text" id="maxlength[% loo.row %]" name="maxlength" value="[% loo.maxlength %]" size="4" /> (see online help)</li>
-                <li><label for="hidden[% loo.row %]">hidden</label><input type="text" id="hidden[% loo.row %]" name="hidden" value="[% loo.hidden %]" size="2" /> (see online help)</li>
-                <li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li>
+                <li><input type="hidden" id="hidden-[% loo.row %]" name="hidden" value="[% loo.hidden %]" />
+                    <label for="hidden[% loo.row %]" style="float: none;">Visibility: </label>
+                    <input type="checkbox" id="hidden_opac_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_opac_[% loo.row %]"/>
+                    <label for="hidden_opac_[% loo.row %]" style="float: none;">OPAC</label>
+                    <input type="checkbox" id="hidden_intranet_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_intranet_[% loo.row %]"/>
+                    <label for="hidden_intranet_[% loo.row %]" style="float: none;">Intranet</label>
+                    <input type="checkbox" id="hidden_editor_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_editor_[% loo.row %]"/>
+                    <label for="hidden_editor_[% loo.row %]" style="float: none;">Editor</label>
+                    <input type="checkbox" id="hidden_collapsed_[% loo.row %]" class="inclusive_[% loo.row %]" name="hidden_collapsed_[% loo.row %]"/>
+                    <label for="hidden_collapsed_[% loo.row %]" style="float: none;">Collapsed</label>
+                    <input type="checkbox" id="hidden_flagged_[% loo.row %]" name="flagged_[% loo.row %]"/>
+                    <label for="hidden_flagged_[% loo.row %]" style="float: none;">Flagged</label>
+                </li>
+                <li>
+                    <label for="isurl[% loo.row %]">Is a URL:</label>
+                    [% IF loo.isurl %]
+                        <input type="checkbox" id="isurl[% loo.row %]" name="isurl[% loo.row %]" checked="checked" value="1" />
+                    [% ELSE %]
+                        <input type="checkbox" id="isurl[% loo.row %]" name="isurl[% loo.row %]" value="1" />
+                    [% END %]
+                    (if checked, it means that the subfield is a URL and can be clicked)
+                </li>
                 <li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li>
-                <li><label for="kohafield[% loo.row %]">Koha link:</label>[% loo.kohafield %]</li>
+                <li>
+                    <label for="kohafield[% loo.row %]">Koha link:</label>
+                    <!-- This select should be DISABLED; value is submitted by the following hidden input -->
+                    <select name="kohafield" id="kohafield[% loo.row %]" size="1" disabled>
+                    [% FOREACH value IN loo.kohafields %]
+                      [% IF ( value == loo.kohafield ) %]
+                        <option value="[% value %]" selected="selected">[% value %]</option>
+                      [% ELSE %]
+                        <option value="[% value %]">[% value %]</option>
+                      [% END %]
+                    [% END %]
+                    </select>
+                    <!-- Do NOT remove this next hidden input! We need it to save kohafield. -->
+                    <input type="hidden" name="kohafield" value="[% loo.kohafield %]"/>
+                </li>
                        </ol>
-       </fieldset>
-        <fieldset class="rows" style="float:none;">
-                <legend>Other Options: (choose one)</legend>
+            </fieldset>
+            </div>
+            <h3><a href="#oth[% loo.urisubfieldcode %]">Other options (choose one)</a></h3>
+            <div id="oth[% loo.urisubfieldcode %]">
+            <fieldset class="rows">
                        <ol>
-                               <li><label for="authorised_value[% loo.row %]">Authorized value:</label>[% loo.authorised_value %]</li>
-                               <li><label for="authtypecode[% loo.row %]">Thesaurus:</label>[% loo.authtypes %]</li>
-                               <li><label for="value_builder[% loo.row %]">Plugin:</label>[% loo.value_builder %]</li>
+                            <li>
+                                <label for="authorised_value[% loo.row %]">Authorized value:</label>
+                                <select name="authorised_value" id="authorised_value[% loo.row %]" size="1">
+                                <option value=""></option>
+                                [% FOREACH value IN loo.authorised_values %]
+                                    [% IF ( value == loo.authorised_value ) %]
+                                    <option value="[% value %]" selected="selected">[% value %]</option>
+                                    [% ELSE %]
+                                    <option value="[% value %]">[% value %]</option>
+                                    [% END %]
+                                [% END %]
+                                </select>
+                            </li>
+                            <li>
+                                <label for="authtypecode[% loo.row %]">Thesaurus:</label>
+                                <select name="authtypecode" id="authtypecode[% loo.row %]" size="1">
+                                [% FOREACH value IN loo.authtypes %]
+                                    [% IF ( value == loo.authtypecode ) %]
+                                    <option value="[% value %]" selected="selected">[% value %]</option>
+                                    [% ELSE %]
+                                    <option value="[% value %]">[% value %]</option>
+                                    [% END %]
+                                [% END %]
+                                </select>
+                            </li>
+                            <li>
+                                <label for="value_builder[% loo.row %]">Plugin:</label>
+                                <select name="value_builder" id="value_builder[% loo.row %]" size="1">
+                                [% FOREACH value IN loo.value_builders %]
+                                    [% IF ( value == loo.value_builder ) %]
+                                    <option value="[% value %]" selected="selected">[% value %]</option>
+                                    [% ELSE %]
+                                    <option value="[% value %]">[% value %]</option>
+                                    [% END %]
+                                [% END %]
+                                </select>
+                            </li>
                        </ol>
-                               </fieldset>
-            </div><br class="clear" /><!-- /more  -->
+            </fieldset>
+            </div>
         </div><!-- /content_sub -->
         [% END %]
                </div><!-- /content -->
+    <fieldset class="action">
+        <input type="submit" value="Save changes" /> <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield  | uri %]&amp;frameworkcode=[% frameworkcode %]" class="cancel">Cancel</a>
+    </fieldset>
     </form>
 [% END %]
 
 [% IF ( delete_confirm ) %]
 
-<h3>Confirm deletion of subfield [% tagsubfield %]?</h3>
-    <p>Subfield: [% tagsubfield %]</p>
-    <p>Description: [% liblibrarian %]</p>
-
-            <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
-                <input type="hidden" name="searchfield" value="[% searchfield %]" />
-                <input type="hidden" name="tagfield" value="[% tagfield %]" />
-                               <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
-                               <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
-                               <input type="submit" value="Yes, Delete this Subfield" />
-            </form>
-                       
-                       <form action="[% script_name %]" method="post">
-                       <input type="hidden" name="searchfield" value="[% searchfield %]" />
-                       <input type="hidden" name="tagfield" value="[% tagfield %]" />
-                       <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
-                       <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
-                       <input type="submit" value="No, Do Not Delete" />
-            </form>
+    <div class="dialog alert">
+        <h3>Confirm deletion of subfield [% tagsubfield %]?</h3>
+        <p>Subfield: [% tagsubfield %]</p>
+        <p>Description: [% liblibrarian | html_entity %]</p>
+
+        <form action="[% delete_link %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
+            <input type="hidden" name="searchfield" value="[% searchfield %]" />
+            <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
+            <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
+            <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
+            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
+        </form>
+
+
+        <form action="[% script_name %]" method="post">
+            <input type="hidden" name="searchfield" value="[% searchfield %]" />
+            <input type="hidden" name="tagfield" value="[% tagfield | html%]" />
+            <input type="hidden" name="tagsubfield" value="[% tagsubfield %]" />
+            <input type="hidden" name="frameworkcode" value="[% 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 ) %]
 
     <h3>Data deleted</h3>
     <form action="[% script_name %]" method="post">
-       <input type="hidden" name="tagfield" value="[% tagfield %]" />
+        <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
     <input type="submit" value="OK" />
     </form>
 [% END %]
 
 
 [% IF ( else ) %]
-<h1>MARC subfield structure admin for [% tagfield %] [% IF ( frameworkcode ) %](framework [% frameworkcode %])[% ELSE %](default framework)[% END %]</h1>
-<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
-<p>The column Koha field shows that the subfield is linked with a Koha field. Koha can manage a MARC interface, or a Koha interface. This link ensures that both DB are synchronized, thus you can change from a MARC to a Koha interface easily.</p>
+<h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode %])[% ELSE %](default framework)[% END %]</h1>
+<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p>
+<p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p>
 
 <table>
 <tr>
     <th>Subfield</th>
     <th>Text</th>
     <th>Constraints</th>
-    <th>Edit</th>
-    <th>Delete</th>
+    <th>Actions</th>
 </tr>
 [% FOREACH loo IN loop %]
-[% UNLESS ( loop.odd ) %]
-<tr class="highlight">
-[% ELSE %]
 <tr>
-[% END %]
     <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield %]&amp;frameworkcode=[% frameworkcode %]#sub[% loo.tagsubfield %]field">[% loo.tagsubfield %]</a></td>
     <td>
         [% IF ( loo.subfield_ignored ) %]
-            <i>[% loo.liblibrarian %]</i>
+            <i>[% loo.liblibrarian | html_entity %]</i>
         [% ELSE %]
-            [% loo.liblibrarian %]
+            [% loo.liblibrarian | html_entity %]
         [% END %]
     </td>
     <td>
@@ -209,8 +289,10 @@ $(document).ready(function() {
             [% IF ( loo.link ) %] | Link:[% loo.link %],[% END %]
         [% END %]
     </td>
-    <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield %]&amp;frameworkcode=[% frameworkcode %]#sub[% loo.tagsubfield %]field">Edit</a></td>
-    <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=delete_confirm&amp;tagfield=[% loo.tagfield %]&amp;tagsubfield=[% loo.tagsubfield %]&amp;frameworkcode=[% frameworkcode %]">Delete</a></td>
+    <td class="actions">
+        <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield %]&amp;frameworkcode=[% frameworkcode %]#sub[% loo.tagsubfield %]field" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
+        <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=delete_confirm&amp;tagfield=[% loo.tagfield %]&amp;tagsubfield=[% loo.tagsubfield %]&amp;frameworkcode=[% frameworkcode %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
+    </td>
 </tr>
 [% END %]
 </table>
@@ -219,8 +301,8 @@ $(document).ready(function() {
     <fieldset class="action"><input type="hidden" name="op" value="add_form" />
     <input type="hidden" name="tagfield" value="[% edit_tagfield %]" />
     <input type="hidden" name="frameworkcode" value="[% edit_frameworkcode %]" />
-    <input type="submit" value="Edit Subfields" />
-       <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield %]&amp;frameworkcode=[% frameworkcode %]">Cancel</a>
+    <input type="submit" value="Edit subfields" />
+        <a class="cancel" href="marctagstructure.pl?searchfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode %]">Cancel</a>
        </fieldset>
 </form>
 
@@ -230,5 +312,13 @@ $(document).ready(function() {
 
 </div>
 </div>
+<div class="yui-b noprint">
+    [% INCLUDE 'admin-menu.inc' %]
+</div>
 </div>
+
+[% MACRO jsinclude BLOCK %]
+    <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
+    <script type="text/javascript" src="[% interface %]/[% theme %]/js/marc_subfields_structure_[% KOHA_VERSION %].js"></script>
+[% END %]
 [% INCLUDE 'intranet-bottom.inc' %]