Bugzilla – Attachment 37364 Details for
Bug 7561
cannot fast catalog with fast cataloging permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7561: Fast cataloging - Allow add/edit items and delete record
Bug-7561-Fast-cataloging---Allow-addedit-items-and.patch (text/plain), 5.76 KB, created by
Jonathan Druart
on 2015-03-30 11:27:16 UTC
(
hide
)
Description:
Bug 7561: Fast cataloging - Allow add/edit items and delete record
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-03-30 11:27:16 UTC
Size:
5.76 KB
patch
obsolete
>From baba2cb575fbe1643c69e86431215760fb44f01d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 30 Mar 2015 13:17:26 +0200 >Subject: [PATCH] Bug 7561: Fast cataloging - Allow add/edit items and delete > record > >With the fast cataloging permission, a librarian was not able to >add/edit items and to delete a record with the FA framework. > >This patch fixes that. > >Test plan: >0/ Set the permission fast_cataloging (and only this one under >editcatalogue) to a librarian >1/ Log in with this account >2/ Go to Circulation > Fast cataloging >3/ Confirm you can create a record >4/ Save and confirm you can create items >5/ Confirm you are able to edit items, remove all of them and delete the >record. >6/ Make sure it only works for records with the FA framework code. >--- > cataloguing/addbiblio.pl | 7 ++++--- > koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 16 +++++++++------- > 2 files changed, 13 insertions(+), 10 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index 93ef3ef..9013a4e 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -727,14 +727,15 @@ my $fa_stickyduedate = $input->param('stickyduedate'); > my $fa_duedatespec = $input->param('duedatespec'); > > my $userflags = 'edit_catalogue'; >-if ($frameworkcode eq 'FA'){ >- $userflags = 'fast_cataloging'; >-} > > my $changed_framework = $input->param('changed_framework'); > $frameworkcode = &GetFrameworkCode($biblionumber) > if ( $biblionumber and not($frameworkcode) and $op ne 'addbiblio' ); > >+if ($frameworkcode eq 'FA'){ >+ $userflags = 'fast_cataloging'; >+} >+ > $frameworkcode = '' if ( $frameworkcode eq 'Default' ); > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >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 97da6c3..32992c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -27,7 +27,7 @@ > function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=[% biblionumber %]','Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes'); > } > function printBiblio() {window.print(); } >-[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >+[% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > function confirm_deletion() { > var count = [% count %]; > var holdcount = [% holdcount %]; >@@ -68,7 +68,7 @@ > } > [% END %] > >-[% IF ( CAN_user_editcatalogue_edit_items ) %] >+[% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > function confirm_items_deletion() { > var count = [% count %]; > var holdcount = [% holdcount %]; >@@ -163,11 +163,11 @@ CAN_user_serials_create_subscription ) %] > <div class="btn-group"> > <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button> > <ul class="dropdown-menu"> >- [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >+ [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > <li><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=">Edit record</a></li> > [% END %] > >- [% IF ( CAN_user_editcatalogue_edit_items ) %] >+ [% IF CAN_user_editcatalogue_edit_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > <li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]">Edit items</a></li> > [% END %] > >@@ -193,9 +193,11 @@ CAN_user_serials_create_subscription ) %] > [% IF ( LocalCoverImages || OPACLocalCoverImages) %][% IF ( CAN_user_tools_upload_local_cover_images ) %]<li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image">Upload image</a>[% END %][% END %] > > [% IF ( CAN_user_editcatalogue_edit_catalogue ) %] >- <li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=duplicate">Edit as new (duplicate)</a></li> >- <li><a href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li> >+ <li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=duplicate">Edit as new (duplicate)</a></li> >+ <li><a href="#" id="z3950copy">Replace record via Z39.50/SRU</a></li> >+ [% END %] > >+ [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > [% IF ( count ) %] > <li class="disabled"><a id="deletebiblio" data-toggle="tooltip" data-placement="left" title="[% count %] item(s) are attached to this record. You must delete all items before deleting this record." href="#">Delete record</a></li> > [% ELSE %] >@@ -203,7 +205,7 @@ CAN_user_serials_create_subscription ) %] > [% END %] > [% END %] > >- [% IF ( CAN_user_editcatalogue_delete_all_items ) %] >+ [% IF CAN_user_editcatalogue_delete_all_items or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > [% IF ( count ) %] > <li><a href="#" id="deleteallitems">Delete all items</a></li> > [% ELSE %] >-- >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 7561
:
37364
|
37378
|
37379
|
37380
|
37381
|
37515
|
37516