Bug #2531 Cannot delete private shelf
authorAllen Reinmeyer <allen.reinmeyer@liblime.com>
Mon, 17 Nov 2008 21:10:27 +0000 (15:10 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Thu, 20 Nov 2008 14:33:59 +0000 (08:33 -0600)
commit25eb36f21fe952118327d2c84dfef5d38eee31a7
tree835854f448fd4f13c225267def057783f14cc135
parent53a0ed93db20b426d1643dab1ee2fdebf9e94ece
Bug #2531 Cannot delete private shelf

Added logic to create a list of private lists to check on deletion.  Multiple pages have the ability to delete lists, both private and public.  Default option of retrieving a user's lists is retrieving the public ones.  Now private lists of the owner are retrieved as well and checked upon deletion request.  This allows any method of deletion to delete the correct list without examining the myriad of options currently used to indicate display of privateshelves and expect all pages to know whether a shelf number comes from a private or public list.  Since deletion occurs based on shelf number and the virtualshelves table has a primary key on shelf number, this will not cause unwanted deletion of shelves.

UPDATE:  added logic for conditional creation of shelves.  Also note change in staff side as deletions worked except for viewing a populated shelf, then deleting.  The confirm message showed, but the display was of public shelves, not private.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/VirtualShelves/Page.pm
koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl