Bug 32787: Patron restrictions admin page has patron categories search bar
authorOwen Leonard <oleonard@myacpl.org>
Thu, 2 Feb 2023 14:43:38 +0000 (14:43 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 3 Feb 2023 13:34:55 +0000 (10:34 -0300)
This patch updates the patron restriction administration page to correct
the markup around the header and breadcrumbs: Using the header WRAPPER,
using the sub-header WRAPPER, and switching to the system preferences
search bar.

The patch also corrects the page title to prevent a leading "rsaquo;"
in some cases.

Note: This patch contains indentation changes, so ignore whitespace when
viewing the diff.

To test, apply the patch and go to Administration -> Patron
restrictions. The system preferences search should be preselected in the
header search bar, and everything should look correct.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/restrictions.tt

index 0a2855a..c225fc9 100644 (file)
@@ -4,64 +4,68 @@
 [% PROCESS 'restriction-types.inc' %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]'[% ELSE %]New restriction[% END %][% END %]
-[% IF op == 'delete_confirm' %]Confirm deletion of restriction '[% PROCESS restriction_type_description restriction_type=restriction %]'[% END %] &rsaquo; Patron restrictions &rsaquo; Administration &rsaquo; Koha
+<title>[% IF op == 'add_form' %][% IF ( restriction ) %]Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' &rsaquo; [% ELSE %]New restriction &rsaquo; [% END %][% END %]
+[% IF op == 'delete_confirm' %]Confirm deletion of restriction '[% PROCESS restriction_type_description restriction_type=restriction %]' &rsaquo; [% END %]Patron restrictions &rsaquo; Administration &rsaquo; Koha
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 <body id="admin_restrictions" class="admin">
-[% INCLUDE 'header.inc' %]
-[% INCLUDE 'patrons-admin-search.inc' %]
-
-<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
-    <ol>
-    <li>
-        <a href="/cgi-bin/koha/mainpage.pl">Home</a>
-    </li>
-    <li>
-        <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
-    </li>
-
-    [% IF op == 'list' %]
+[% WRAPPER 'header.inc' %]
+    [% INCLUDE 'prefs-admin-search.inc' %]
+[% END %]
+
+[% WRAPPER 'sub-header.inc' %]
+    <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+        <ol>
         <li>
-            <a href="#" aria-current="page">
-                Patron restrictions
-            </a>
+            <a href="/cgi-bin/koha/mainpage.pl">Home</a>
         </li>
-    [% END %]
-
-    [% IF op == 'add_form' %]
         <li>
-            <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
+            <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
         </li>
-        [% IF restriction %]
+
+        [% IF op == 'list' %]
             <li>
                 <a href="#" aria-current="page">
-                    Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]'
+                    Patron restrictions
                 </a>
             </li>
-        [% ELSE %]
+        [% END %]
+
+        [% IF op == 'add_form' %]
+            <li>
+                <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
+            </li>
+            [% IF restriction %]
+                <li>
+                    <a href="#" aria-current="page">
+                        Modify restriction '[% PROCESS restriction_type_description restriction_type=restriction %]'
+                    </a>
+                </li>
+            [% ELSE %]
+                <li>
+                    <a href="#" aria-current="page">
+                        New restriction
+                    </a>
+                </li>
+            [% END %]
+        [% END %]
+
+        [% IF op == 'delete_confirm' %]
+            <li>
+                <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
+            </li>
             <li>
                 <a href="#" aria-current="page">
-                    New restriction
+                    Delete restriction?
                 </a>
             </li>
         [% END %]
-    [% END %]
+        </ol>
+    </nav>
+[% END %]
 
-    [% IF op == 'delete_confirm' %]
-        <li>
-            <a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a>
-        </li>
-        <li>
-            <a href="#" aria-current="page">
-                Delete restriction?
-            </a>
-        </li>
-    [% END %]
-    </ol>
-</nav>
 
 <div class="main container-fluid">
     <div class="row">