Lines 113-119
if ( $op eq 'add_form' ) {
Link Here
|
113 |
if ( $shelf ) { |
113 |
if ( $shelf ) { |
114 |
$op = $referer; |
114 |
$op = $referer; |
115 |
my $sortfield = $query->param('sortfield'); |
115 |
my $sortfield = $query->param('sortfield'); |
116 |
$sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded ); |
116 |
$sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded dateaccessioned ); |
117 |
if ( $shelf->can_be_managed( $loggedinuser ) ) { |
117 |
if ( $shelf->can_be_managed( $loggedinuser ) ) { |
118 |
$shelf->shelfname( scalar $query->param('shelfname') ); |
118 |
$shelf->shelfname( scalar $query->param('shelfname') ); |
119 |
$shelf->sortfield( $sortfield ); |
119 |
$shelf->sortfield( $sortfield ); |
Lines 268-274
if ( $op eq 'view' ) {
Link Here
|
268 |
if ( $shelf ) { |
268 |
if ( $shelf ) { |
269 |
if ( $shelf->can_be_viewed( $loggedinuser ) ) { |
269 |
if ( $shelf->can_be_viewed( $loggedinuser ) ) { |
270 |
my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title'; # Passed in sorting overrides default sorting |
270 |
my $sortfield = $query->param('sortfield') || $shelf->sortfield || 'title'; # Passed in sorting overrides default sorting |
271 |
$sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded ); |
271 |
$sortfield = 'title' unless grep { $_ eq $sortfield } qw( title author copyrightdate itemcallnumber dateadded dateaccessioned ); |
272 |
my $direction = $query->param('direction') || 'asc'; |
272 |
my $direction = $query->param('direction') || 'asc'; |
273 |
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; |
273 |
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; |
274 |
my ( $rows, $page ); |
274 |
my ( $rows, $page ); |
Lines 314-319
if ( $op eq 'view' ) {
Link Here
|
314 |
$this_item->{part_name} = $biblio->part_name; |
314 |
$this_item->{part_name} = $biblio->part_name; |
315 |
$this_item->{author} = $biblio->author; |
315 |
$this_item->{author} = $biblio->author; |
316 |
$this_item->{dateadded} = $content->dateadded; |
316 |
$this_item->{dateadded} = $content->dateadded; |
|
|
317 |
$this_item->{dateaccessioned} = $biblio->items->get_column("dateaccessioned"); |
317 |
$this_item->{imageurl} = $itemtype ? C4::Koha::getitemtypeimagelocation( 'intranet', $itemtype->imageurl ) : q{}; |
318 |
$this_item->{imageurl} = $itemtype ? C4::Koha::getitemtypeimagelocation( 'intranet', $itemtype->imageurl ) : q{}; |
318 |
$this_item->{description} = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ? |
319 |
$this_item->{description} = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ? |
319 |
$this_item->{notforloan} = $itemtype->notforloan if $itemtype; |
320 |
$this_item->{notforloan} = $itemtype->notforloan if $itemtype; |
320 |
- |
|
|