Bug 29609 - Links to guess the biblio default view need to be centralized
Summary: Links to guess the biblio default view need to be centralized
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 29601
Blocks: 30512 30566
  Show dependency treegraph
 
Reported: 2021-12-01 14:10 UTC by Jonathan Druart
Modified: 2022-04-19 15:26 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 29609: Centralized code to build the link to a biblio detail page (41.37 KB, patch)
2021-12-01 14:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29609: Centralized code to build the link to a biblio detail page (41.39 KB, patch)
2022-01-19 15:50 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29609: Centralized code to build the link to a biblio detail page (41.50 KB, patch)
2022-03-28 08:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29609: Centralized code to build the link to a biblio detail page (41.51 KB, patch)
2022-03-28 22:10 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 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 🦄