Bug 33568: Restore host records
Signed-off-by: Owen Leonard <oleonard@myacpl.org> 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
1d8a6fa3fd
commit
09934c0160
4 changed files with 12 additions and 10 deletions
|
@ -242,6 +242,10 @@ properties:
|
||||||
type:
|
type:
|
||||||
- object
|
- object
|
||||||
- "null"
|
- "null"
|
||||||
|
biblio:
|
||||||
|
type:
|
||||||
|
- object
|
||||||
|
- "null"
|
||||||
checkout:
|
checkout:
|
||||||
type:
|
type:
|
||||||
- object
|
- object
|
||||||
|
|
|
@ -423,6 +423,7 @@
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- +strings
|
- +strings
|
||||||
|
- biblio.title
|
||||||
- checkout
|
- checkout
|
||||||
- checkout.patron
|
- checkout.patron
|
||||||
- transfer
|
- transfer
|
||||||
|
|
|
@ -198,9 +198,6 @@ my $items_params = {
|
||||||
my $all_items = $biblio->items($items_params);
|
my $all_items = $biblio->items($items_params);
|
||||||
my $items_to_display = $all_items->search({ $include_lost_items ? () : ( itemlost => 0 ) });
|
my $items_to_display = $all_items->search({ $include_lost_items ? () : ( itemlost => 0 ) });
|
||||||
|
|
||||||
# flag indicating existence of at least one item linked via a host record
|
|
||||||
my $hostrecords = $biblio->host_items->count;
|
|
||||||
|
|
||||||
my $dat = &GetBiblioData($biblionumber);
|
my $dat = &GetBiblioData($biblionumber);
|
||||||
|
|
||||||
#is biblio a collection and are bundles enabled
|
#is biblio a collection and are bundles enabled
|
||||||
|
@ -354,7 +351,6 @@ $template->param(
|
||||||
$template->param(
|
$template->param(
|
||||||
MARCNOTES => !$invalid_marc_record ? $biblio->get_marc_notes() : undef,
|
MARCNOTES => !$invalid_marc_record ? $biblio->get_marc_notes() : undef,
|
||||||
z3950_search_params => C4::Search::z3950_search_args($dat),
|
z3950_search_params => C4::Search::z3950_search_args($dat),
|
||||||
hostrecords => $hostrecords,
|
|
||||||
C4::Search::enabled_staff_search_views,
|
C4::Search::enabled_staff_search_views,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,7 @@
|
||||||
<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>
|
<th id="[% tab | html %]_materials" data-colname="[% tab | html %]_materials">Materials specified</th>
|
||||||
<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>
|
<th id="[% tab | html %]_itemnotes" data-colname="[% tab | html %]_itemnotes">Public notes</th>
|
||||||
<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>
|
<th id="[% tab | html %]_itemnotes_nonpublic" data-colname="[% tab | html %]_itemnotes_nonpublic">Non-public notes</th>
|
||||||
[% IF ( hostrecords ) %]<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>[% END %]
|
<th id="[% tab | html %]_hostrecord" data-colname="[% tab | html %]_hostrecord">Host records</th>
|
||||||
[% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
|
[% IF ( analyze ) %]<th id="[% tab | html %]_usedin" data-colname="[% tab | html %]_usedin">Used in</th><th></th>[% END %]
|
||||||
[% IF Koha.Preference('UseCourseReserves') %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
|
[% IF Koha.Preference('UseCourseReserves') %]<th id="[% tab | html %]_course_reserves" data-colname="[% tab | html %]_course_reserves">Course reserves</th>[% END %]
|
||||||
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
|
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab | html %]_spinelabel" data-colname="[% tab | html %]_spinelabel" class="NoSort">Spine label</th>[% END %]
|
||||||
|
@ -2194,6 +2194,9 @@
|
||||||
embed.push('course_item.course_reserves.course');
|
embed.push('course_item.course_reserves.course');
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
|
// For host records
|
||||||
|
embed.push('biblio.title');
|
||||||
|
|
||||||
let items_table_settings = {
|
let items_table_settings = {
|
||||||
holdings: [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %],
|
holdings: [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %],
|
||||||
otherholdings: [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %],
|
otherholdings: [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %],
|
||||||
|
@ -2589,17 +2592,15 @@
|
||||||
return escape_str(row.internal_notes);
|
return escape_str(row.internal_notes);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[% IF ( hostrecords ) %]
|
|
||||||
{
|
{
|
||||||
data: "biblio.biblio_id",
|
data: "biblio.title",
|
||||||
searchable: false, // FIXME
|
searchable: false,
|
||||||
orderable: true,
|
orderable: true,
|
||||||
render: function (data, type, row, meta) {
|
render: function (data, type, row, meta) {
|
||||||
if ( row.biblio_id == [% biblio.biblionumber | html %] ) return "";
|
if ( row.biblio_id == [% biblio.biblionumber | html %] ) return "";
|
||||||
return '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=%s>%s</a>'.format(row.biblio_id, row.biblio.title);
|
return '<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=%s">%s</a>'.format(row.biblio_id, row.biblio.title);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[% END %]
|
|
||||||
[% IF ( analyze ) %]
|
[% IF ( analyze ) %]
|
||||||
{
|
{
|
||||||
data: "",
|
data: "",
|
||||||
|
|
Loading…
Reference in a new issue