[Koha-bugs] [Bug 11175] Show the parent record's component parts in the detailed views
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Oct 22 11:08:56 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11175
--- Comment #425 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Some patches have been squashed for readability.
(In reply to Marcel de Rooy from comment #390)
> 14 files changed, 322 insertions(+), 55 deletions(-)
>
> $showcomp variable naming; show_components better
Too late, too complicated or we add a separate commit for that. Not a big deal
IMO.
> Changes XSLTParse4Display; no tests. (Yes, there is no, but there should be.)
Still missing, I will try and provide some a bit later today.
> Code block if ($xslsyspref =~ m/Details/) {
> We are fetching components while we may not use them.
> Have the impression that the if inside the block should be incorporated into
> the main condition.
Done and squashed with the first patch.
> installer/data/mysql/atomicupdate/bug_11175.perl
> Needs to be converted to new style
I will do it when pushing it.
> +('ShowComponentRecords', 'nowhere', 'nowhere|staff|opac|both','In which
> record detail pages to show list of the component records, as linked via
> 773','Choice'),
> Should nowhere just be empty?
empty or 'nowhere' is fine.
(In reply to Marcel de Rooy from comment #391)
> What about indentation?
Done and squashed.
(In reply to Marcel de Rooy from comment #392)
> koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
> koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
>
> Seems you only remove 2 newlines, please remove these changes.
Done, squashed.
> + [% IF defaulttab == 'components' %]
> + <li id="tab_components" class="ui-tabs-active">
> + [% ELSE %]
> + <li id="tab_components">
> + [% END %]
> + <a href="#components">Components ([% (
> ComponentParts.size ) %])</a>
> + </li>
>
> Indentation.
Done, squashed.
> diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
> b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
> index 105da508c7..2df0e1b3b4 100644
> --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
> +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl
> @@ -541,7 +541,6 @@
> <xsl:value-of select="$partName" />
> </xsl:if>
> </xsl:template>
> -
> </xsl:stylesheet>
>
> <!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
>
> Dont do this please
Done, squashed.
(In reply to Marcel de Rooy from comment #393)
> my $components = $biblio->get_marc_components(300)
>
> This 300 is hardcoded. At least a constant? Or some other configuration
> option?
> Probably the latter.
Done, see follow-up.
(In reply to Marcel de Rooy from comment #394)
> Not from this report, but very related:
>
> $self->{_components} = $results if ( defined($results) &&
> scalar(@$results) );
> }
>
> return $self->{_components} || [];
>
> Why do we save these component parts in the object and not use them later
> (if we would call again)?
Yes, that's a bad pattern. We discussed that recently but cannot remember
where.
We shouldn't cache that in the object IMO.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list