|
Lines 33-42
use C4::Members;
Link Here
|
| 33 |
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); |
33 |
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers ); |
| 34 |
use C4::Search qw( enabled_staff_search_views ); |
34 |
use C4::Search qw( enabled_staff_search_views ); |
| 35 |
use Koha::Biblios; |
35 |
use Koha::Biblios; |
|
|
36 |
use Koha::BiblioFrameworks; |
| 36 |
use Koha::Item::Templates; |
37 |
use Koha::Item::Templates; |
| 37 |
use Koha::ItemTypes; |
38 |
use Koha::ItemTypes; |
| 38 |
use Koha::Items; |
39 |
use Koha::Items; |
| 39 |
use Koha::Items; |
|
|
| 40 |
use Koha::Libraries; |
40 |
use Koha::Libraries; |
| 41 |
use Koha::Patrons; |
41 |
use Koha::Patrons; |
| 42 |
use Koha::SearchEngine::Indexer; |
42 |
use Koha::SearchEngine::Indexer; |
|
Lines 143-156
my $display_order = $input->param('item_group_display_order');
Link Here
|
| 143 |
|
143 |
|
| 144 |
our $frameworkcode = &GetFrameworkCode($biblionumber); |
144 |
our $frameworkcode = &GetFrameworkCode($biblionumber); |
| 145 |
|
145 |
|
|
|
146 |
my $is_fast_add = |
| 147 |
defined $frameworkcode && $frameworkcode ne '' |
| 148 |
? Koha::BiblioFrameworks->find($frameworkcode)->is_fast_add |
| 149 |
: 0; |
| 150 |
|
| 146 |
# Defining which userflag is needing according to the framework currently used |
151 |
# Defining which userflag is needing according to the framework currently used |
| 147 |
my $userflags; |
152 |
my $userflags; |
| 148 |
if ( defined $input->param('frameworkcode') ) { |
153 |
if ( defined $input->param('frameworkcode') ) { |
| 149 |
$userflags = ( $input->param('frameworkcode') eq 'FA' ) ? "fast_cataloging" : "edit_items"; |
154 |
$userflags = ( $input->param('frameworkcode') eq 'FA' || $is_fast_add ) ? "fast_cataloging" : "edit_items"; |
| 150 |
} |
155 |
} |
| 151 |
|
156 |
|
| 152 |
if ( not defined $userflags ) { |
157 |
if ( not defined $userflags ) { |
| 153 |
$userflags = ( $frameworkcode eq 'FA' ) ? "fast_cataloging" : "edit_items"; |
158 |
$userflags = ( $frameworkcode eq 'FA' || $is_fast_add ) ? "fast_cataloging" : "edit_items"; |
| 154 |
} |
159 |
} |
| 155 |
|
160 |
|
| 156 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
161 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
|
Lines 188-194
$restrictededition = 0 if ( $restrictededition != 0 && C4::Context->IsSuperLibra
Link Here
|
| 188 |
# In case user has fast cataloging permission (and we're in fast cataloging), editing is not restricted |
193 |
# In case user has fast cataloging permission (and we're in fast cataloging), editing is not restricted |
| 189 |
$restrictededition = 0 |
194 |
$restrictededition = 0 |
| 190 |
if ( $restrictededition != 0 |
195 |
if ( $restrictededition != 0 |
| 191 |
&& $frameworkcode eq 'FA' |
196 |
&& ( $frameworkcode eq 'FA' || $is_fast_add ) |
| 192 |
&& haspermission( $uid, { 'editcatalogue' => 'fast_cataloging' } ) ); |
197 |
&& haspermission( $uid, { 'editcatalogue' => 'fast_cataloging' } ) ); |
| 193 |
|
198 |
|
| 194 |
our $tagslib = &GetMarcStructure( 1, $frameworkcode ); |
199 |
our $tagslib = &GetMarcStructure( 1, $frameworkcode ); |
|
Lines 488-494
if ( $op eq "cud-additem" ) {
Link Here
|
| 488 |
undef($current_item); |
493 |
undef($current_item); |
| 489 |
} |
494 |
} |
| 490 |
} |
495 |
} |
| 491 |
if ( $frameworkcode eq 'FA' && $fa_circborrowernumber ) { |
496 |
if ( ( $frameworkcode eq 'FA' || $is_fast_add ) && $fa_circborrowernumber ) { |
| 492 |
print $input->redirect( '/cgi-bin/koha/circ/circulation.pl?' |
497 |
print $input->redirect( '/cgi-bin/koha/circ/circulation.pl?' |
| 493 |
. 'borrowernumber=' |
498 |
. 'borrowernumber=' |
| 494 |
. $fa_circborrowernumber |
499 |
. $fa_circborrowernumber |
|
Lines 781-787
my $subfields =
Link Here
|
| 781 |
} |
786 |
} |
| 782 |
); |
787 |
); |
| 783 |
|
788 |
|
| 784 |
if ( $frameworkcode eq 'FA' ) { |
789 |
if ( $frameworkcode eq 'FA' || $is_fast_add ) { |
| 785 |
my ($barcode_field) = grep { $_->{kohafield} eq 'items.barcode' } @$subfields; |
790 |
my ($barcode_field) = grep { $_->{kohafield} eq 'items.barcode' } @$subfields; |
| 786 |
$barcode_field->{marc_value}->{value} ||= $input->param('barcode'); |
791 |
$barcode_field->{marc_value}->{value} ||= $input->param('barcode'); |
| 787 |
} |
792 |
} |
|
Lines 811-817
$template->param(
Link Here
|
| 811 |
); |
816 |
); |
| 812 |
$template->{'VARS'}->{'searchid'} = $searchid; |
817 |
$template->{'VARS'}->{'searchid'} = $searchid; |
| 813 |
|
818 |
|
| 814 |
if ( $frameworkcode eq 'FA' ) { |
819 |
if ( $frameworkcode eq 'FA' || $is_fast_add ) { |
| 815 |
|
820 |
|
| 816 |
# fast cataloguing datas |
821 |
# fast cataloguing datas |
| 817 |
$template->param( |
822 |
$template->param( |