From 308455fe8e3d4f467abff4637834664f20129502 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 20 Sep 2022 16:15:59 +0100 Subject: [PATCH] Bug 31028: Add concerns tab to biblio details display This patch adds a 'Concerns' tab to the catalogue/detail display --- Koha/Biblio.pm | 15 ++ .../prog/en/modules/catalogue/detail.tt | 170 ++++++++++++++++++ 2 files changed, 185 insertions(+) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 3c8e5cb4b2..451361428f 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -35,6 +35,7 @@ use Koha::ArticleRequests; use Koha::Biblio::Metadatas; use Koha::Biblio::ItemGroups; use Koha::Biblioitems; +use Koha::Catalog::Concerns; use Koha::Checkouts; use Koha::CirculationRules; use Koha::Item::Transfer::Limits; @@ -119,6 +120,20 @@ sub active_orders { return $self->orders->search({ datecancellationprinted => undef }); } +=head3 concerns + + my $concerns = $biblio->concerns(); + +Returns all concerns linked to the biblio + +=cut + +sub concerns { + my ( $self ) = @_; + my $rs = $self->_result->catalog_concerns; + return Koha::Catalog::Concerns->_new_from_dbic( $rs ); +} + =head3 item_groups my $item_groups = $biblio->item_groups(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 022c126190..cbcd139692 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -294,6 +294,7 @@ [% IF Koha.Preference('AcquisitionDetails') %]
  • Acquisition details
  • [% END %] [% IF suggestions.count %]
  • Suggestion details
  • [% END %] [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
  • Editions
  • [% END %][% END %] +[% IF ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) %]
  • Concerns ([% biblio.concerns.count | html %])
  • [% END %] [% IF ( LocalCoverImages ) %]
  • Images ([% localimages.count || 0 | html %]) @@ -995,6 +996,59 @@ Note that permanent location is a code, and location may be an authval. [% END %] [% END %] +[% IF ( Koha.Prefernce('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) %] +
    +
    + Hide resolved + | Show all +
    + + + + + + + + + + +
    ReportedDetailsStatusActions
    + + + +
    +[% END %] + [% IF ( LocalCoverImages ) %]
    [% IF localimages.count %] @@ -1308,6 +1362,122 @@ Note that permanent location is a code, and location may be an authval. [% Asset.js("js/modals/add_catalog_concern.js") | $raw %] [% END %] -- 2.20.1