|
Lines 68-74
sub get {
Link Here
|
| 68 |
); |
68 |
); |
| 69 |
} else { |
69 |
} else { |
| 70 |
my $metadata = $biblio->metadata; |
70 |
my $metadata = $biblio->metadata; |
| 71 |
my $record = $metadata->record; |
71 |
my $record = $metadata->record( { embed_items => 1 } ); |
| 72 |
my $schema = $metadata->schema // C4::Context->preference("marcflavour"); |
72 |
my $schema = $metadata->schema // C4::Context->preference("marcflavour"); |
| 73 |
|
73 |
|
| 74 |
$c->respond_to( |
74 |
$c->respond_to( |
|
Lines 791-814
sub list {
Link Here
|
| 791 |
$c->res->headers->add( 'Content-Type', 'application/marcxml+xml' ); |
791 |
$c->res->headers->add( 'Content-Type', 'application/marcxml+xml' ); |
| 792 |
return $c->render( |
792 |
return $c->render( |
| 793 |
status => 200, |
793 |
status => 200, |
| 794 |
text => $biblios->print_collection('marcxml') |
794 |
text => $biblios->print_collection('marcxml', 1) |
| 795 |
); |
795 |
); |
| 796 |
} elsif ( $c->req->headers->accept =~ m/application\/marc-in-json(;.*)?$/ ) { |
796 |
} elsif ( $c->req->headers->accept =~ m/application\/marc-in-json(;.*)?$/ ) { |
| 797 |
$c->res->headers->add( 'Content-Type', 'application/marc-in-json' ); |
797 |
$c->res->headers->add( 'Content-Type', 'application/marc-in-json' ); |
| 798 |
return $c->render( |
798 |
return $c->render( |
| 799 |
status => 200, |
799 |
status => 200, |
| 800 |
data => $biblios->print_collection('mij') |
800 |
data => $biblios->print_collection('mij', 1) |
| 801 |
); |
801 |
); |
| 802 |
} elsif ( $c->req->headers->accept =~ m/application\/marc(;.*)?$/ ) { |
802 |
} elsif ( $c->req->headers->accept =~ m/application\/marc(;.*)?$/ ) { |
| 803 |
$c->res->headers->add( 'Content-Type', 'application/marc' ); |
803 |
$c->res->headers->add( 'Content-Type', 'application/marc' ); |
| 804 |
return $c->render( |
804 |
return $c->render( |
| 805 |
status => 200, |
805 |
status => 200, |
| 806 |
text => $biblios->print_collection('marc') |
806 |
text => $biblios->print_collection('marc', 1) |
| 807 |
); |
807 |
); |
| 808 |
} elsif ( $c->req->headers->accept =~ m/text\/plain(;.*)?$/ ) { |
808 |
} elsif ( $c->req->headers->accept =~ m/text\/plain(;.*)?$/ ) { |
| 809 |
return $c->render( |
809 |
return $c->render( |
| 810 |
status => 200, |
810 |
status => 200, |
| 811 |
text => $biblios->print_collection('txt') |
811 |
text => $biblios->print_collection('txt', 1) |
| 812 |
); |
812 |
); |
| 813 |
} else { |
813 |
} else { |
| 814 |
return $c->render( |
814 |
return $c->render( |
| 815 |
- |
|
|