Bugzilla – Attachment 2572 Details for
Bug 4849
Cannot delete records from Labeled MARC view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-4849-Cannot-delete-records-from-Labeled-.patch (text/plain), 2.50 KB, created by
Owen Leonard
on 2010-08-25 18:38:09 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-08-25 18:38:09 UTC
Size:
2.50 KB
patch
obsolete
>From cf075309c181d377eb7905cbd05af17c06a2ca4b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 25 Aug 2010 14:33:09 -0400 >Subject: [PATCH] Fix for Bug 4849 - Cannot delete records from Labeled MARC view > >The template checks for a "count" variable (item count) to see >whether it should allow deletion of the biblio record. For some >reason labeledMARCdetail.pl hard-coded this as 1, which meant >the template always thought was 1 item. > >This patch also adds an item count check on the display of >"Delete all items," disabling it if there are no items. >--- > catalogue/labeledMARCdetail.pl | 6 +++++- > .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- > 2 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/catalogue/labeledMARCdetail.pl b/catalogue/labeledMARCdetail.pl >index de67677..e72a6d1 100755 >--- a/catalogue/labeledMARCdetail.pl >+++ b/catalogue/labeledMARCdetail.pl >@@ -25,6 +25,7 @@ use C4::Auth; > use C4::Context; > use C4::Output; > use C4::Biblio; >+use C4::Items; > use C4::Search; # enabled_staff_search_views > > my $query = new CGI; >@@ -51,7 +52,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >-$template->param( count => 1, bibliotitle => $biblio->{title} ); >+#count of item linked >+my $itemcount = GetItemsCount($biblionumber); >+$template->param( count => $itemcount, >+ bibliotitle => $biblio->{title}, ); > > #Getting the list of all frameworks > my $queryfwk = >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 eda7985..228ebf3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -87,7 +87,7 @@ function confirm_items_deletion() { > { text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" }, > { text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=duplicate" }, > { text: _("Delete Record"), onclick: {fn: confirm_deletion }<!-- TMPL_IF NAME="count" -->,id:'disabled'<!-- /TMPL_IF --> }, >- { text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } } >+ { text: _("Delete all Items"), onclick: {fn: confirm_items_deletion }<!-- TMPL_UNLESS NAME="count" -->,id:'disabled'<!-- /TMPL_UNLESS --> } > ]; > > var savemenu = [ >-- >1.7.0.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 4849
: 2572