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.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b3183f16e5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
parent
b8348370af
commit
804d434971
|
|
@ -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(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 %];
|
||||
|
|
@ -159,15 +159,15 @@ CAN_user_serials_create_subscription ) %]
|
|||
</div>
|
||||
[% END %]
|
||||
|
||||
[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) %]
|
||||
[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel ) or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %]
|
||||
<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 %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue