Bugzilla – Attachment 13096 Details for
Bug 8801
Offer to batch delete items of a bibliographic record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8801: Remove 'Delete all items' menu entry
Bug-8801-Remove-Delete-all-items-menu-entry.patch (text/plain), 4.81 KB, created by
Julian Maurice
on 2012-10-29 12:46:37 UTC
(
hide
)
Description:
Bug 8801: Remove 'Delete all items' menu entry
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-10-29 12:46:37 UTC
Size:
4.81 KB
patch
obsolete
>From 45ca8dfd646cdda8498b7b593cce73cef8b61977 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 11 Oct 2012 09:09:14 +0200 >Subject: [PATCH] Bug 8801: Remove 'Delete all items' menu entry > >and code in catalogue/additem.pl related to 'delallitems' operation. >--- > cataloguing/additem.pl | 38 -------------------- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 18 +--------- > 2 files changed, 1 insertion(+), 55 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 7b7dbac..68ad877 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -535,44 +535,6 @@ if ($op eq "additem") { > $nextop="additem"; > } > #------------------------------------------------------------------------------- >-} elsif ($op eq "delallitems") { >-#------------------------------------------------------------------------------- >- my @biblioitems = &GetBiblioItemByBiblioNumber($biblionumber); >- my $errortest=0; >- my $itemfail; >- foreach my $biblioitem (@biblioitems) { >- my $items = &GetItemsByBiblioitemnumber( $biblioitem->{biblioitemnumber} ); >- >- foreach my $item (@$items) { >- $error =&DelItemCheck( $dbh, $biblionumber, $item->{itemnumber} ); >- $itemfail =$item; >- if($error == 1){ >- next >- } >- else { >- push @errors,$error; >- $errortest++ >- } >- } >- if($errortest > 0){ >- $nextop="additem"; >- } >- else { >- my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); >- my $views = { C4::Search::enabled_staff_search_views }; >- if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { >- print $input->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber"); >- } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { >- print $input->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber"); >- } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { >- print $input->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber"); >- } else { >- print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); >- } >- exit; >- } >- } >-#------------------------------------------------------------------------------- > } elsif ($op eq "saveitem") { > #------------------------------------------------------------------------------- > # rebuild >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index ae9a7e4..4135387 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -46,21 +46,6 @@ function confirm_deletion() { > } > } > [% END %] >-[% IF ( CAN_user_editcatalogue_edit_items ) %] >-function confirm_items_deletion() { >- var count = [% count %]; >- if(count > 0){ >- if(confirm(_('Are you sure you want to delete the ' + count + ' attached items? '))){ >- window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]"; >- }else{ >- return false; >- } >- } else { >- alert(_("This record has no items.")); >- return false; >- } >-} >-[% END %] > // prepare DOM for YUI Toolbar > > $(document).ready(function() { >@@ -117,8 +102,7 @@ function confirm_items_deletion() { > [% IF ( LocalCoverImages || OPACLocalCoverImages) %][% IF ( CAN_user_tools_upload_local_cover_images ) %]{ text: _("Upload image"), url: "/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image" },[% END %][% END %] > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as new (duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] },[% END %] >- [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all items"), onclick: {fn: confirm_items_deletion }[% UNLESS ( count ) %],id:'disabled'[% END %] }[% END %] >+ [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] }[% END %] > ]; > if(editmenu.length){ > new YAHOO.widget.Button({ >-- >1.7.10.4
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 8801
:
12428
|
12459
|
12767
|
13096