[Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 6754, Improve breadcrumbs on lists pages

Nicole C. Engard nengard at bywatersolutions.com
Fri Aug 19 21:13:23 CEST 2011


From: Owen Leonard <oleonard at myacpl.org>

Breadcrumb navigation on the lists pages should give the user links back to the
category of list they're viewing, public or private.

Patch changes this:

Lists -> Contents of (Your list)

To this:

Lists -> Your lists -> Contents of (Your list)

Signed-off-by: Nicole C. Engard <nengard at bywatersolutions.com>
---
 C4/VirtualShelves/Page.pm                          |   16 +++++++++-------
 .../prog/en/modules/virtualshelves/shelves.tt      |    3 ++-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm
index 9e5ec3a..73a590d 100644
--- a/C4/VirtualShelves/Page.pm
+++ b/C4/VirtualShelves/Page.pm
@@ -241,13 +241,15 @@ sub shelfpage ($$$$$) {
                 my $i = 0;
                 my $manageshelf = ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' );
                 $template->param(
-                    shelfname   => $shelfname,
-                    shelfnumber => $shelfnumber,
-                    viewshelf   => $shelfnumber,
-                    authorsort  => $authorsort,
-                    yearsort    => $yearsort,
-                    manageshelf => $manageshelf,
-                    itemsloop   => $items,
+                    shelfname           => $shelfname,
+                    shelfnumber         => $shelfnumber,
+                    viewshelf           => $shelfnumber,
+                    authorsort          => $authorsort,
+                    yearsort            => $yearsort,
+                    manageshelf         => $manageshelf,
+                    "category$category" => 1,
+                    category            => $category,
+                    itemsloop           => $items,
                 );
             } else {
                 push @paramsloop, { nopermission => $shelfnumber };
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
index 3e2b3d9..65471a3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
@@ -115,7 +115,8 @@ function placeHold () {
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a> [% IF ( category1 ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your Lists</a> [% ELSE %] Your Lists [% END %] [% ELSIF ( category2 ) %] &rsaquo; [% IF ( viewshelf ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public Lists</a> [% ELSE %] Public Lists [% END %] [% ELSIF ( showprivateshelves ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=privateshelves">Your Lists</a> [% ELSE %] Your Lists [% END %] [% ELSIF ( showpublicshelves ) %] &rsaquo; [% IF ( viewshelf || edit ) %] <a href="/cgi-bin/koha/virtualshelves/shelves.pl?display=publicshelves">Public Lists</a> [% ELSE %] Public Lists [% END %] [% END %]
+
 [% IF ( viewshelf ) %]&rsaquo; Contents of <i>[% shelfname | html %]</i>[% END %][% IF ( shelves ) %] &rsaquo; Create New List[% END %][% IF ( edit ) %] &rsaquo; Edit List <i>[% shelfname | html %]</i>[% END %]</div>
 
 <div id="doc" class="yui-t7">
-- 
1.7.2.3



More information about the Koha-patches mailing list