Bug 29609

Summary: Links to guess the biblio default view need to be centralized
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, kyle, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00
Circulation function:
Bug Depends on: 29601    
Bug Blocks: 30512, 30566    
Attachments: Bug 29609: Centralized code to build the link to a biblio detail page
Bug 29609: Centralized code to build the link to a biblio detail page
Bug 29609: Centralized code to build the link to a biblio detail page
Bug 29609: Centralized code to build the link to a biblio detail page

Description Jonathan Druart 2021-12-01 14:10:10 UTC
It's spread in different places, we could have a BLOCK in an include file to avoid code to be duplicated.
Comment 1 Jonathan Druart 2021-12-01 14:15:25 UTC
Created attachment 128129 [details] [review]
Bug 29609: Centralized code to build the link to a biblio detail page

There are 2 prefs that control the default view of biblio detail pages:
IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC.
There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't
allow access to those page for staff members.

This code need to be in a single place to avoid discrepancy.

Test plan:
Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm
that the links of biblio point to the correct view.
Comment 2 Fridolin Somers 2022-01-18 18:46:03 UTC
Whaoo super to remove duplicated code.
I'll test it.
Comment 3 Martin Renvoize (ashimema) 2022-01-19 15:50:17 UTC
Created attachment 129618 [details] [review]
Bug 29609: Centralized code to build the link to a biblio detail page

There are 2 prefs that control the default view of biblio detail pages:
IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC.
There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't
allow access to those page for staff members.

This code need to be in a single place to avoid discrepancy.

Test plan:
Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm
that the links of biblio point to the correct view.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2022-01-19 15:50:40 UTC
Nice bit of clean up here.. signing off
Comment 5 Katrin Fischer 2022-03-26 23:36:51 UTC
Some parsing errors in the QA test tools:

 FAIL	koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
   FAIL	  filters
		missing_filter at line 82 (    [%- this_biblio_href %][% biblionumber | url -%])

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt
   FAIL	  valid_template
		parse error - /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt line 158: unexpected end of input

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt
   FAIL	  valid_template
		parse error - /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt line 88: unexpected token (ELSE)
  [% ELSE %]

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc
   FAIL	  filters
		missing_filter at line 34 (    [%- this_biblio_href %][% biblionumber | url -%])
Comment 6 Jonathan Druart 2022-03-28 08:46:52 UTC
Created attachment 132297 [details] [review]
Bug 29609: Centralized code to build the link to a biblio detail page

There are 2 prefs that control the default view of biblio detail pages:
IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC.
There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't
allow access to those page for staff members.

This code need to be in a single place to avoid discrepancy.

Test plan:
Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm
that the links of biblio point to the correct view.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Katrin Fischer 2022-03-28 22:10:17 UTC
Created attachment 132372 [details] [review]
Bug 29609: Centralized code to build the link to a biblio detail page

There are 2 prefs that control the default view of biblio detail pages:
IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC.
There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't
allow access to those page for staff members.

This code need to be in a single place to avoid discrepancy.

Test plan:
Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm
that the links of biblio point to the correct view.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Fridolin Somers 2022-04-08 13:52:57 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑