|
Lines 124-130
if ( $op eq 'add_form' ) {
Link Here
|
| 124 |
$op = $referer; |
124 |
$op = $referer; |
| 125 |
my $sortfield = $query->param('sortfield'); |
125 |
my $sortfield = $query->param('sortfield'); |
| 126 |
$sortfield = 'title' |
126 |
$sortfield = 'title' |
| 127 |
unless grep { $_ eq $sortfield } qw( title author copyrightdate publicationyear itemcallnumber dateadded ); |
127 |
unless grep { $_ eq $sortfield } |
|
|
128 |
qw( title author copyrightdate publicationyear itemcallnumber dateadded dateaccessioned ); |
| 128 |
if ( $sortfield == 'copyrightdate' and C4::Context->preference('marcflavour') == 'UNIMARC' ) { |
129 |
if ( $sortfield == 'copyrightdate' and C4::Context->preference('marcflavour') == 'UNIMARC' ) { |
| 129 |
$sortfield = 'publicationyear'; |
130 |
$sortfield = 'publicationyear'; |
| 130 |
} |
131 |
} |
|
Lines 296-307
if ( $op eq 'view' ) {
Link Here
|
| 296 |
|| 'title'; # Passed in sorting overrides default sorting |
297 |
|| 'title'; # Passed in sorting overrides default sorting |
| 297 |
$sortfield = 'title' |
298 |
$sortfield = 'title' |
| 298 |
unless grep { $_ eq $sortfield } |
299 |
unless grep { $_ eq $sortfield } |
| 299 |
qw( title author copyrightdate publicationyear itemcallnumber dateadded ); |
300 |
qw( title author copyrightdate publicationyear itemcallnumber dateadded dateaccessioned ); |
| 300 |
if ( $sortfield == 'copyrightdate' and C4::Context->preference('marcflavour') == 'UNIMARC' ) { |
301 |
if ( $sortfield == 'copyrightdate' and C4::Context->preference('marcflavour') == 'UNIMARC' ) { |
| 301 |
$sortfield = 'publicationyear'; |
302 |
$sortfield = 'publicationyear'; |
| 302 |
} |
303 |
} |
| 303 |
my $direction = $query->param('direction') || 'asc'; |
304 |
my $direction = $query->param('direction') || 'asc'; |
| 304 |
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; |
305 |
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; |
|
|
306 |
|
| 307 |
# If sorting by dateaccessioned set direction to descending by default |
| 308 |
$direction = 'desc' if $sortfield eq 'dateaccessioned'; |
| 309 |
|
| 305 |
my $rows; |
310 |
my $rows; |
| 306 |
if ( $query->param('print') ) { |
311 |
if ( $query->param('print') ) { |
| 307 |
$page = ""; |
312 |
$page = ""; |
|
Lines 357-362
if ( $op eq 'view' ) {
Link Here
|
| 357 |
$this_item->{'normalized_ean'} = GetNormalizedEAN( $record, $marcflavour ); |
362 |
$this_item->{'normalized_ean'} = GetNormalizedEAN( $record, $marcflavour ); |
| 358 |
$this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour ); |
363 |
$this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour ); |
| 359 |
$this_item->{'normalized_isbn'} = GetNormalizedISBN( undef, $record, $marcflavour ); |
364 |
$this_item->{'normalized_isbn'} = GetNormalizedISBN( undef, $record, $marcflavour ); |
|
|
365 |
$this_item->{'dateaccessioned'} = $biblio->items->get_column("dateaccessioned"); |
| 360 |
|
366 |
|
| 361 |
unless ( defined $this_item->{size} ) { |
367 |
unless ( defined $this_item->{size} ) { |
| 362 |
|
368 |
|
| 363 |
- |
|
|