From 015cd2bf00eb52dcd1cee99df62764d9d35bbed6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 17 Dec 2010 08:36:52 -0500 Subject: [PATCH] Fix for Bug 3523 - Menu of existing lists limited to 10 Content-Type: text/plain; charset="utf-8" - adding "more" option to the search results dropdown - offering a scrolling list on the add-to-list popup - lists add popup shows the full list of all the patron's lists, divided into groups of private and public lists. Can be improved by a fix for Bug 5529 --- C4/VirtualShelves.pm | 25 ++++++++++- koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 2 +- .../prog/en/modules/opac-addbybiblionumber.tmpl | 15 +++++- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 13 ++++- opac/opac-addbybiblionumber.pl | 48 ++++++++------------ 5 files changed, 67 insertions(+), 36 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 77ae394..7257149 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -47,7 +47,7 @@ BEGIN { &GetBibliosShelves ); @EXPORT_OK = qw( - &GetShelvesSummary &GetRecentShelves + &GetShelvesSummary &GetRecentShelves &GetAllShelves &RefreshShelvesSummary &SetShelvesLimit ); } @@ -212,6 +212,29 @@ sub GetRecentShelves ($$$) { return ( \@shelflist, $total ); } +=head2 GetAllShelves + + ($shelflist) = GetAllShelves($owner) + +This function returns a references to an array of hashrefs containing all shelves sorted +by the shelf name. + +This function is intended to return a dataset reflecting all the shelves for +the submitted parameters. + +=cut + +sub GetAllShelves ($$) { + my ($category,$owner) = @_; + my (@shelflist); + my @params = ($category,$owner); + my $query = "SELECT * FROM virtualshelves WHERE category = ? AND owner = ? ORDER BY shelfname ASC"; + my $sth = $dbh->prepare($query); + $sth->execute(@params); + @shelflist = $sth->fetchall_arrayref({}); + return ( \@shelflist ); +} + =head2 GetShelf (shelfnumber,shelfname,owner,category,sortfield) = &GetShelf($shelfnumber); diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc index 3a3d4b9..df0b413 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc @@ -159,7 +159,7 @@ - +
Select a List -
+
" />
Cancel
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl index d7aff2e..0938dd5 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl @@ -105,9 +105,11 @@ $(document).ready(function(){ param1 += ""; param1 += ""+""+"