https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502
--- Comment #19 from David Nind <[email protected]> --- Created attachment 201130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201130&action=edit Bug 37502: Add ERM tab to catalog detail page Adds an "ERM (N)" tab to the bibliographic record detail page in the staff interface. The tab appears when the ERMModule system preference is enabled and the record has at least one local ERM title linked via biblio_id. Implementation uses the Vue island pattern with a dedicated REST API endpoint GET /api/v1/biblios/{biblio_id}/erm_holdings that requires only catalogue permission, so the tab is visible to all staff users regardless of their ERM module access. The endpoint returns a single nested JSON payload with titles, resources, packages, vendor and agreements (including licenses), avoiding multiple round-trips from the component. The tab handles N packages per title and N ERM titles per biblio. It is strictly read-only and introduces no MARC record writes. Links to ERM titles, packages, agreements and licenses are shown only to users with the erm permission. The vendor link requires the acquisition vendors_manage permission. New files: - Koha/REST/V1/Biblios/ERMHoldings.pm - api/v1/swagger/paths/biblios_erm_holdings.yaml - koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue Modified files: - api/v1/swagger/swagger.yaml - catalogue/detail.pl - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts To test: 1. Enable ERMModule system preference. 2. Go to ERM > eHoldings > Local > Titles, create a title and link it to a bibliographic record (check "Create bibliographic record"). 3. Add one or more packages to the title via the Packages section. 4. Optionally link an agreement to a package, and a license to that agreement. 5. Open the linked bibliographic record in the staff catalog (Cataloging > search for the record). 6. Verify an "ERM (1)" tab appears between Acquisition details and the next tab. 7. Click the ERM tab. Verify the table shows one row per package with package name, vendor, start/end dates and agreements. 8. If an agreement has a license, click "Licenses (N)" and verify the license details expand inline. 9. Log in as a user without the 'erm' permission. Verify the tab is still visible but package/agreement/license names appear as plain text without links. 10. Log in as a user without 'acquisition > vendors_manage'. Verify vendor names appear as plain text. Signed-off-by: Adolfo RodrÃguez <[email protected]> Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
