Lines 54-60
use URI::Escape qw( uri_escape_utf8 );
Link Here
|
54 |
our $dbh = C4::Context->dbh; |
54 |
our $dbh = C4::Context->dbh; |
55 |
|
55 |
|
56 |
sub add_item_to_item_group { |
56 |
sub add_item_to_item_group { |
57 |
my ( $biblionumber, $itemnumber, $item_group, $item_group_description ) = @_; |
57 |
my ( $biblionumber, $itemnumber, $item_group, $item_group_description, $display_order ) = @_; |
58 |
|
58 |
|
59 |
return unless $item_group; |
59 |
return unless $item_group; |
60 |
|
60 |
|
Lines 64-69
sub add_item_to_item_group {
Link Here
|
64 |
{ |
64 |
{ |
65 |
biblio_id => $biblionumber, |
65 |
biblio_id => $biblionumber, |
66 |
description => $item_group_description, |
66 |
description => $item_group_description, |
|
|
67 |
display_order => $display_order, |
67 |
} |
68 |
} |
68 |
)->store(); |
69 |
)->store(); |
69 |
|
70 |
|
Lines 136-141
my $fa_stickyduedate = $input->param('stickyduedate');
Link Here
|
136 |
my $fa_duedatespec = $input->param('duedatespec'); |
137 |
my $fa_duedatespec = $input->param('duedatespec'); |
137 |
my $item_group = $input->param('item_group'); |
138 |
my $item_group = $input->param('item_group'); |
138 |
my $item_group_description = $input->param('item_group_description'); |
139 |
my $item_group_description = $input->param('item_group_description'); |
|
|
140 |
my $display_order = $input->param('item_group_display_order'); |
139 |
|
141 |
|
140 |
our $frameworkcode = &GetFrameworkCode($biblionumber); |
142 |
our $frameworkcode = &GetFrameworkCode($biblionumber); |
141 |
|
143 |
|
Lines 332-338
if ($op eq "cud-additem") {
Link Here
|
332 |
} |
334 |
} |
333 |
unless ( @errors ) { |
335 |
unless ( @errors ) { |
334 |
$item->store->discard_changes; |
336 |
$item->store->discard_changes; |
335 |
add_item_to_item_group( $item->biblionumber, $item->itemnumber, $item_group, $item_group_description ); |
337 |
add_item_to_item_group( $item->biblionumber, $item->itemnumber, $item_group, $item_group_description, $display_order ); |
336 |
|
338 |
|
337 |
# This is a bit tricky : if there is a cookie for the last created item and |
339 |
# This is a bit tricky : if there is a cookie for the last created item and |
338 |
# we just added an item, the cookie value is not correct yet (it will be updated |
340 |
# we just added an item, the cookie value is not correct yet (it will be updated |
Lines 445-451
if ($op eq "cud-additem") {
Link Here
|
445 |
$current_item = $current_item->unblessed; |
447 |
$current_item = $current_item->unblessed; |
446 |
add_item_to_item_group( |
448 |
add_item_to_item_group( |
447 |
$item->biblionumber, $item->itemnumber, $item_group, |
449 |
$item->biblionumber, $item->itemnumber, $item_group, |
448 |
$item_group_description |
450 |
$item_group_description, $display_order |
449 |
); |
451 |
); |
450 |
|
452 |
|
451 |
# We count the item only if it was really added |
453 |
# We count the item only if it was really added |