Bugzilla – Attachment 41716 Details for
Bug 14544
Move the list related code to Koha::Virtualshelves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves
Bug-14544-Add-KohaVirtualshelf-and-KohaVirtualshel.patch (text/plain), 5.05 KB, created by
Jonathan Druart
on 2015-08-20 13:39:23 UTC
(
hide
)
Description:
Bug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-08-20 13:39:23 UTC
Size:
5.05 KB
patch
obsolete
>From 0927e3b89574c9db5ca60179a14226269d5a47b4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Jul 2015 14:21:01 +0100 >Subject: [PATCH] Bug 14544: Add Koha::Virtualshelf and Koha::Virtualshelves > >The 2 modules C4::VirtualShelves and C4::VirtualShelves::Page are really badly >coded and buggy. >It became complicated to fix and enhance them. >This rewrite will make the code more robust and the list feature will be easier >to change. > >Some new modules are added to the Koha namespace (Koha::Virtualshelf, >Koha::Virtualshelves, Koha::Virtualshelfshare[s] and Koha::Virtualshelfcontent[s]) >to take advantage of Dbix::Class. > >The patchset fixes some bugs: >1/ Bug 6279 - Can't delete lists from the second page of lists in the OPAC >2/ The owner of a list should not need any permission to remove content from >his lists. >3/ No feedback messages when actions are done > >Test plan: >A) Intranet and OPAC >1/ Create more than 20 private and public lists with different users >2/ Edit some and confirm that the changes are taken into account >3/ Share some lists with other users >4/ Add / remove contents >Be sure you have some lists with more than 20 items (to test the pagination) >5/ Play with permissions and confirm it works as expected. >For private lists: >They should not be viewed by anyone else, if they are not shared >If they are shared (OPAC only): >a. "Allow anyone else to add entries" > Should allow the user with whom the list is shared to add entries. >b. "Allow anyone to remove his own contributed entries." > Should allow the user with whom the list is shared to remove his own entries. >c. "Allow anyone to remove other contributed entries." > Should allow the user with whom the list is shared to remove any entries. > >For public lists: >They should be viewed by anyone else. >a. "Allow anyone else to add entries" > Should allow any user to add entries. >b. "Allow anyone to remove his own contributed entries." > Should allow any user to remove his own entries. >c. "Allow anyone to remove other contributed entries." > Should allow any user to remove any entries. > >6/ Download and sent lists. > >7/ Confirm that the "Add to" feature works as expected. > >8/ Confirm that the "Add an item to" works as expected. > >9/ Delete some lists. > >10/ Print some lists and subscribe to the RSS feed (OPAC only) (with more than >20 items). > >11/ Use the remove "Remove share" links. >--- > Koha/Virtualshelf.pm | 44 ++++++++++++++++++++++++++++++++++++++++++++ > Koha/Virtualshelves.pm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 94 insertions(+) > create mode 100644 Koha/Virtualshelf.pm > create mode 100644 Koha/Virtualshelves.pm > >diff --git a/Koha/Virtualshelf.pm b/Koha/Virtualshelf.pm >new file mode 100644 >index 0000000..98877a1 >--- /dev/null >+++ b/Koha/Virtualshelf.pm >@@ -0,0 +1,44 @@ >+package Koha::Virtualshelf; >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+use Modern::Perl; >+ >+use Carp; >+ >+use Koha::Database; >+ >+use base qw(Koha::Object); >+ >+=head1 NAME >+ >+Koha::Virtualshelf - Koha Virtualshelf Object class >+ >+=head1 API >+ >+=head2 Class Methods >+ >+=cut >+ >+=head3 type >+ >+=cut >+ >+sub type { >+ return 'Virtualshelf'; >+} >+ >+1; >diff --git a/Koha/Virtualshelves.pm b/Koha/Virtualshelves.pm >new file mode 100644 >index 0000000..5cffdfe >--- /dev/null >+++ b/Koha/Virtualshelves.pm >@@ -0,0 +1,50 @@ >+package Koha::Virtualshelves; >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+use Modern::Perl; >+ >+use Carp; >+ >+use Koha::Database; >+ >+use Koha::Virtualshelf; >+ >+use base qw(Koha::Objects); >+ >+=head1 NAME >+ >+Koha::Virtualshelf - Koha Virtualshelf Object class >+ >+=head1 API >+ >+=head2 Class Methods >+ >+=cut >+ >+=head3 type >+ >+=cut >+ >+sub type { >+ return 'Virtualshelf'; >+} >+ >+sub object_class { >+ return 'Koha::Virtualshelf'; >+} >+ >+1; >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14544
:
41034
|
41035
|
41036
|
41037
|
41038
|
41039
|
41040
|
41041
|
41042
|
41403
|
41404
|
41405
|
41406
|
41407
|
41408
|
41409
|
41410
|
41411
|
41412
|
41584
|
41585
|
41586
|
41587
|
41588
|
41589
|
41590
|
41591
|
41592
|
41593
|
41594
|
41595
|
41596
|
41597
|
41598
|
41599
|
41600
|
41601
|
41716
|
41717
|
41718
|
41719
|
41720
|
41721
|
41722
|
41723
|
41724
|
41725
|
41726
|
41727
|
41728
|
41729
|
41730
|
41731
|
41732
|
41733
|
41766
|
41909
|
41910
|
41913
|
41914
|
41915
|
41917
|
41918
|
41919
|
41924
|
41927
|
41931
|
41932
|
41953
|
41954
|
41955
|
41956
|
41957
|
41958
|
41959
|
41960
|
41961
|
41962
|
41963
|
41964
|
41965
|
41966
|
41967
|
41968
|
41969
|
41970
|
41973
|
41974
|
41975
|
41976
|
41977
|
41978
|
41979
|
41980
|
41981
|
41982
|
41983
|
41986
|
41988
|
42192
|
42199
|
42200
|
42201
|
42202
|
42203
|
42204
|
42205
|
42206
|
42207
|
42208
|
42209
|
42210
|
42211
|
42212
|
42213
|
42214
|
42215
|
42216
|
42217
|
42218
|
42219
|
42638
|
43223
|
43224
|
43225
|
43226
|
43227
|
43228
|
43229
|
43230
|
43231
|
43232
|
43233
|
43234
|
43235
|
43236
|
43237
|
43238
|
43239
|
43240
|
43241
|
43242
|
43243
|
43296
|
43334
|
43335
|
43403
|
43456
|
43457
|
43458
|
43459
|
43460
|
43461
|
43462
|
43463
|
43464
|
43465
|
43466
|
43467
|
43469
|
43470
|
43471
|
43472
|
43473
|
43474
|
43475
|
43476
|
43477
|
43478
|
43479
|
43480
|
43481
|
43482
|
43485
|
43486
|
43487
|
44467
|
44468
|
44469
|
44470
|
44471
|
44472
|
44473
|
44474
|
44475
|
44476
|
44477
|
44478
|
44479
|
44480
|
44481
|
44482
|
44483
|
44484
|
44485
|
44486
|
44487
|
44758
|
44845
|
44852
|
44863
|
44872