[Bug 21280] New: Unify MARC tab HTML generation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Bug ID: 21280 Summary: Unify MARC tab HTML generation Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: pasi.kallinen@joensuu.fi QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Bug 11885 improved the MARC detail tab view, so it it easier to style with CSS, but the authority MARC tabs are still in a sorry state. We can unify the code into a single include file, and reuse that from both. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pasi.kallinen@joensuu.fi |ity.org | Status|NEW |Needs Signoff --- Comment #1 from paxed <pasi.kallinen@joensuu.fi> --- Created attachment 78214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78214&action=edit Bug 21280: Unify MARC tab HTML generation Bug 11885 improved the MARC detail tab view, so it it easier to style with CSS, but the authority MARC tabs are still in a sorry state. We can unify the code into a single include file, and reuse that from both. Test plan: 1) Apply the patch 2) Look at the biblio MARC detail view, check the tabs look the same as before 3) Look at an authority MARC detail view, check the tabs look the same as the biblio view -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=11885 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=13406 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |black23@gmail.com --- Comment #2 from Michal Denar <black23@gmail.com> --- Hi, I get error: Applying: Bug 21280: Unify MARC tab HTML generation Using index info to reconstruct a base tree... M authorities/detail.pl M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt M koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt Falling back to patching base and 3-way merge... error: The following untracked working tree files would be overwritten by merge: koha-tmpl/intranet-tmpl/prog/en/includes/marc_tab_html.inc Please, rebase on master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ere.maijala@helsinki.fi Assignee|pasi.kallinen@koha-suomi.fi |ere.maijala@helsinki.fi Status|Patch doesn't apply |ASSIGNED --- Comment #3 from Ere Maijala <ere.maijala@helsinki.fi> --- With paxed's approval I'm taking over and extending the scope to include unifying the underlying perl code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #78214|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Unify MARC tab HTML |Unify MARC editor in |generation |biblios and authorities -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20447 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #4 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85502 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85502&action=edit Bug 21280: Move MARC editor code to a common class Combines the MARC editor code from addbiblio.pl and authorities.pl to a common class. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #5 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85503&action=edit Bug 21280: Move MARC editor tabs to an include file Moves the tabs code from addbiblio.tt to marc_editor.inc and changes authorities.tt to use it too. Minor changes in the tabs code were needed to support both functions. Adds support for toggling docs and tags for authorities and updates default documentation links. Test plan: 1. Test adding and editing biblio records and authority records. 2. Make sure visibility of fields is correct initially and when values are added. 3. Make sure settings for tags and documentation links work and stick across edits, also for authorities. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #6 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85504&action=edit Bug 21280: Unify field types -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85502|0 |1 is obsolete| | --- Comment #7 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85517&action=edit Bug 21280: Move MARC editor code to a common class Combines the MARC editor code from addbiblio.pl and authorities.pl to a common class. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85503|0 |1 is obsolete| | --- Comment #8 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85518 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85518&action=edit Bug 21280: Move MARC editor tabs to an include file Moves the tabs code from addbiblio.tt to marc_editor.inc and changes authorities.tt to use it too. Minor changes in the tabs code were needed to support both functions. Adds support for toggling docs and tags for authorities and updates default documentation links. Test plan: 1. Test adding and editing biblio records and authority records. 2. Make sure visibility of fields is correct initially and when values are added. 3. Make sure settings for tags and documentation links work and stick across edits, also for authorities. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85504|0 |1 is obsolete| | --- Comment #9 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85519 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85519&action=edit Bug 21280: Unify field types -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #10 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 85520 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85520&action=edit Bug 21280: Add pref for MARC authority documentation url Makes the documentation url for authorities separately configurable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #11 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 85517 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=85517 Bug 21280: Move MARC editor code to a common class Review of attachment 85517: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21280&attachment=85517) ----------------------------------------------------------------- I just quickly go through code and found only small issues, great job Ere. ::: Koha/MarcEditor.pm @@ +22,5 @@
+use Modern::Perl; + +use Readonly; + +use C4::ClassSource;
use Koha::ClassSources instead @@ +31,5 @@
+use base qw(Class::Accessor); + +# Constants to refer to the standard editor types +Readonly our $EDITOR_BIBLIO => 'biblio'; +Readonly our $EDITOR_AUTHORITY => 'authority';
use constant instead of Readonly. See https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL25:_Read_only_var... @@ +347,5 @@
+ } + elsif ( $self->{tags}->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) { + push @authorised_values, ""; + + my $class_sources = GetClassSources();
Could be easily replaced by Koha::ClassSource->search @@ +377,5 @@
+ $query = "SELECT authorised_value,lib + FROM authorised_values + WHERE category=? ORDER BY lib"; + } + my $authorised_values_sth = C4::Context->dbh->prepare( $query );
It would be better to use Koha::AuthorizedValues module -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |josef.moravec@gmail.com --- Comment #12 from Josef Moravec <josef.moravec@gmail.com> --- There is conflict with master, probably because of bug 22399 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #13 from Josef Moravec <josef.moravec@gmail.com> --- *** Bug 22574 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85517|0 |1 is obsolete| | --- Comment #14 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 87311 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87311&action=edit Bug 21280: Move MARC editor code to a common class Combines the MARC editor code from addbiblio.pl and authorities.pl to a common class. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85518|0 |1 is obsolete| | --- Comment #15 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 87312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87312&action=edit Bug 21280: Move MARC editor tabs to an include file Moves the tabs code from addbiblio.tt to marc_editor.inc and changes authorities.tt to use it too. Minor changes in the tabs code were needed to support both functions. Adds support for toggling docs and tags for authorities and updates default documentation links. Test plan: 1. Test adding and editing biblio records and authority records. 2. Make sure visibility of fields is correct initially and when values are added. 3. Make sure settings for tags and documentation links work and stick across edits, also for authorities. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85519|0 |1 is obsolete| | --- Comment #16 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 87313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87313&action=edit Bug 21280: Unify field types -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Ere Maijala <ere.maijala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #85520|0 |1 is obsolete| | --- Comment #17 from Ere Maijala <ere.maijala@helsinki.fi> --- Created attachment 87314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87314&action=edit Bug 21280: Add pref for MARC authority documentation url Makes the documentation url for authorities separately configurable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #18 from Ere Maijala <ere.maijala@helsinki.fi> --- Rebased. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87311|0 |1 is obsolete| | Attachment #87312|0 |1 is obsolete| | Attachment #87313|0 |1 is obsolete| | Attachment #87314|0 |1 is obsolete| | --- Comment #19 from Michal Denar <black23@gmail.com> --- Created attachment 87318 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87318&action=edit Bug 21280: Move MARC editor code to a common class Combines the MARC editor code from addbiblio.pl and authorities.pl to a common class. Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #20 from Michal Denar <black23@gmail.com> --- Created attachment 87319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87319&action=edit Bug 21280: Move MARC editor tabs to an include file Moves the tabs code from addbiblio.tt to marc_editor.inc and changes authorities.tt to use it too. Minor changes in the tabs code were needed to support both functions. Adds support for toggling docs and tags for authorities and updates default documentation links. Test plan: 1. Test adding and editing biblio records and authority records. 2. Make sure visibility of fields is correct initially and when values are added. 3. Make sure settings for tags and documentation links work and stick across edits, also for authorities. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #21 from Michal Denar <black23@gmail.com> --- Created attachment 87320 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87320&action=edit Bug 21280: Unify field types Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #22 from Michal Denar <black23@gmail.com> --- Created attachment 87321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87321&action=edit Bug 21280: Add pref for MARC authority documentation url Makes the documentation url for authorities separately configurable. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87318|0 |1 is obsolete| | --- Comment #23 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89407&action=edit Bug 21280: Move MARC editor code to a common class Combines the MARC editor code from addbiblio.pl and authorities.pl to a common class. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87319|0 |1 is obsolete| | --- Comment #24 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89408 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89408&action=edit Bug 21280: Move MARC editor tabs to an include file Moves the tabs code from addbiblio.tt to marc_editor.inc and changes authorities.tt to use it too. Minor changes in the tabs code were needed to support both functions. Adds support for toggling docs and tags for authorities and updates default documentation links. Test plan: 1. Test adding and editing biblio records and authority records. 2. Make sure visibility of fields is correct initially and when values are added. 3. Make sure settings for tags and documentation links work and stick across edits, also for authorities. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87320|0 |1 is obsolete| | --- Comment #25 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89409 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89409&action=edit Bug 21280: Unify field types Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87321|0 |1 is obsolete| | --- Comment #26 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89410 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89410&action=edit Bug 21280: Add pref for MARC authority documentation url Makes the documentation url for authorities separately configurable. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #27 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89411 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89411&action=edit Bug 21280: (follow-up) Adapt bug 21172 to Koha::MarcEditor Test plan: As bug 21772 - read the code and confirm it makes sense Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #28 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89412 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89412&action=edit Bug 21280: (QA follow-up) Do not use type parameter in script tag Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #29 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89413 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89413&action=edit Bug 21280: (QA follow-up) Use constant instead of Readonly in MarcEditor Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #30 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 89414 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89414&action=edit Bug 21280: (follow-up) Refactor build_tabs to return array for better transparency Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #31 from Josef Moravec <josef.moravec@gmail.com> --- Not fully ready yet, I will continue on that -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21280 --- Comment #32 from Ere Maijala <ere.maijala@helsinki.fi> --- Josef? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org