Bug 33568: serialitem => serial_item
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
db74a8112a
commit
c48e632bf4
|
|
@ -470,13 +470,13 @@ sub checkout {
|
|||
return Koha::Checkout->_new_from_dbic( $checkout_rs );
|
||||
}
|
||||
|
||||
=head3 serialitem
|
||||
=head3 serial_item
|
||||
|
||||
=cut
|
||||
|
||||
sub serialitem {
|
||||
sub serial_item {
|
||||
my ( $self ) = @_;
|
||||
my $rs = $self->_result->serialitem;
|
||||
my $rs = $self->_result->serial_item;
|
||||
return unless $rs;
|
||||
return Koha::Serial::Item->_new_from_dbic($rs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1062,6 +1062,13 @@ __PACKAGE__->might_have(
|
|||
{ cascade_copy => 0, cascade_delete => 0 },
|
||||
);
|
||||
|
||||
__PACKAGE__->might_have(
|
||||
"serial_item",
|
||||
"Koha::Schema::Result::Serialitem",
|
||||
{ "foreign.itemnumber" => "self.itemnumber" },
|
||||
{ cascade_copy => 0, cascade_delete => 0 },
|
||||
);
|
||||
|
||||
use C4::Context;
|
||||
sub effective_itemtype {
|
||||
my ( $self ) = @_;
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ properties:
|
|||
type:
|
||||
- object
|
||||
- "null"
|
||||
serialitem:
|
||||
serial_item:
|
||||
type:
|
||||
- object
|
||||
- "null"
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@
|
|||
- analytics_count
|
||||
- cover_image_ids
|
||||
- item_group_item.item_group.description
|
||||
- serialitem.serial
|
||||
- serial_item.serial
|
||||
collectionFormat: csv
|
||||
- $ref: "../swagger.yaml#/parameters/match"
|
||||
- $ref: "../swagger.yaml#/parameters/order_by"
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@
|
|||
embed.push('item_group_item.item_group.description');
|
||||
[% END %]
|
||||
[% IF biblio.serial %]
|
||||
embed.push('serialitem.serial');
|
||||
embed.push('serial_item.serial');
|
||||
[% END %]
|
||||
[% IF Koha.Preference('UseRecalls') %]
|
||||
embed.push('recall', 'recall+strings', 'recall.patron')
|
||||
|
|
@ -428,7 +428,7 @@
|
|||
render: function (data, type, row, meta) {
|
||||
let nodes = "";
|
||||
[%# FIXME Previously we displayed the column if at least one item of the biblio had an enumchron/serial_issue_number. Now it's only if one item of the ones displayed on the current page, how is that bad? How can it be fixed in an elegant way? Should we display the column only if biblio.serial? %]
|
||||
let serial = row.serialitem ? row.serialitem.serial : null;
|
||||
let serial = row.serial_item ? row.serial_item.serial : null;
|
||||
if ( row.serial_issue_number && serial && serial.serialseq ) {
|
||||
nodes += '<span class="enum">%s</span>'.format(escape_str(row.serial_issue_number));
|
||||
if ( serial.serialseq && row.serial_issue_number != serial.serialseq ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue