https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8732

--- Comment #32 from Katrin Fischer <katrin.fisc...@bsz-bw.de> ---
Comment on attachment 103548
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103548
Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones

Review of attachment 103548:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=8732&attachment=103548)
-----------------------------------------------------------------

This patch shows it's age a little, but let's work it out!

::: catalogue/detail.pl
@@ +588,4 @@
>  
>  $template->param (basketsorders => \@baskets_orders);
>  $template->param (basketsdeletedorders => \@baskets_deletedorders);
> +$template->{VARS}->{'BiblioItemtypeImage'} = 
> C4::Context->preference('BiblioItemtypeImage');

1) This can be removed in favor us using the TT plugin in the template instead.

:::
installer/data/mysql/atomicupdate/bug_8732_add_BiblioItemtypeImage_system_preference.perl
@@ +1,3 @@
> +$DBversion = 'XXX'; # will be replaced by the RM
> +if( CheckVersion( $DBversion ) ) {
> +    $dbh->do( "INSERT INTO systempreferences 
> (variable,value,explanation,options,type) VALUES('BiblioItemtypeImage', 
> 'Control','Control what biblio level itemtype image 
> displays','Control|Koha','Choice')" );

2) Please switch to INSERT IGNORE INTO...

::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
@@ +275,5 @@
> +            - pref: BiblioItemtypeImage
> +              choices:
> +                  Control: "MARC control fields"
> +                  Koha: "Koha biblio level itemtype"
> +            - "This preference only affects MARC21 XSLT views.

3) (pref description in yml file):

Currently reads:
Display itemtype information from the [MARC control fields|Koha biblio level
itemtype] This preference only affects MARC21 XSLT views.

I wonder if we could improve the description a little. 

a) In current version the icon this changes is labelled 'material type', so it
might not be so easy to locate where and what happens here.
b) We've been trying to remove biblio in favor of bibliographic
c) missing punctuation :)

Suggestion:

Display [material type icon derived from MARC control fields|Koha record level
item type icon] on detail and results pages in the OPAC. Only works for MARC21.

(We are in the process of removing non-XSLT this release)

But actually, I'd much prefer a more radical approach in merging this new pref
with the existing DisplayIconsXSLT and DisplayOpacIconsXSLT prefs:

[Show|Don't show] the format, audience, and material type icons and
descriptions in XSLT MARC21 results and detail pages in the OPAC. 

Show [
no format, audience and material type information|
the record level item type icon|
format, audience and material type information derived from MARC control fields
]
in XSLT MARC21 results and detail pages in the OPAC.

This way, we'd not need a new pref and we could avoid the conflict of different
settings (turn off display and turn on itemtype icon display = still nothing
shows) And we'd have this controlled separately for OPAC and staff interface. 

But then we also got OpacNoItemTypeImages... just wondering how to get these
all to play together in a way that is most clear to end users about the
effects!

::: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
@@ +171,5 @@
>              <xsl:with-param name="UseAuthoritiesForTracings" 
> select="$UseAuthoritiesForTracings"/>
>          </xsl:call-template>
>  
> +        <xsl:if test="$BiblioItemtypeImage='Control'">
> +        <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">

4) Full quote:

<xsl:if test="$BiblioItemtypeImage='Control'"> <xsl:if
<test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">

I think this highlights a conceptual issue as we already have a pref dealing
with the display of this information (DisplayIconsXSLT and DisplayOpacIconsXSLT
- trying to explain in 3)

Also there appears to be no code for the actual icon display?

@@ +181,2 @@
>  
>      <xsl:call-template name="show-lang-041"/>

5) I believe there is a merge/rebase error here - the xsl:if should be before
the 041 display.

::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ -134,5 @@
> -                            [% ELSE %]
> -                                [% itemtype | html %]
> -                            [% END %]
> -                            ] [% END %]
> -                            [% IF ( unititle ) %], [% unititle | html %][% 
> END %]

6) Is this removed intentionally?

@@ -246,4 @@
>                              <span class="results_summary year"><span 
> class="label">Year: </span>[% copyrightdate | html %]</span>
>                          [% END %]
>  
> -                        [% UNLESS ( item_level_itypes ) %]

Similar here (see above).

::: opac/opac-detail.pl
@@ +1189,4 @@
>      @serialcollections > 0 
>          ? 'serialcollection' : 'subscriptions';
>  $template->param('defaulttab' => $defaulttab);
> +$template->{VARS}->{'BiblioItemtypeImage'} = 
> C4::Context->preference('BiblioItemtypeImage');

See above!

::: opac/opac-search.pl
@@ +1024,4 @@
>  $template->{VARS}->{DidYouMean} =
>    ( defined C4::Context->preference('OPACdidyoumean')
>        && C4::Context->preference('OPACdidyoumean') =~ m/enable/ );
> +$template->{VARS}->{'BiblioItemtypeImage'} = 
> C4::Context->preference('BiblioItemtypeImage');

See above!

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/

Reply via email to