From 920ac202dc1f91e51f43dd07822636c5bbee6a48 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 27 Nov 2018 17:32:51 +0000 Subject: [PATCH] Bug 21891: Remove non-XSLT detail view in the staff client This patch removes the non-XSLT markup from the bibliographic detail page in the staff client. The XSLTDetailsDisplay preference has been altered to accommodate this change. A blank value in XSLTDetailsDisplay will now be equivalent to "default." To test, apply the patch and set the value of XSLTDetailsDisplay to either blank or "default." View the detail page for a bibliographic record in the staff client. The XSLT view should be shown. Signed-off-by: Michal Denar Signed-off-by: Nick Clemens --- catalogue/detail.pl | 2 +- .../admin/preferences/staff_client.pref | 2 +- .../prog/en/modules/catalogue/detail.tt | 162 +----------------- 3 files changed, 4 insertions(+), 162 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 27eb2787ce..9cd6b523bd 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -102,7 +102,7 @@ my $showallitems = $query->param('showallitems'); my $marcflavour = C4::Context->preference("marcflavour"); # XSLT processing of some stuff -my $xslfile = C4::Context->preference('XSLTDetailsDisplay'); +my $xslfile = C4::Context->preference('XSLTDetailsDisplay') || "default"; my $lang = $xslfile ? C4::Languages::getlanguage() : undef; my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index 512785360c..19ab866d4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -76,7 +76,7 @@ Staff Client: - 'Display details in the staff client using XSLT stylesheet at: ' - pref: XSLTDetailsDisplay class: file - - '
Options:
  • Leave empty for "no xslt"
  • enter "default" for the default one
  • put a path to define a xslt file
  • put an URL for an external specific stylesheet.
{langcode} will be replaced with current interface language' + - '
Options:
  • enter "default" for the default one
  • put a path to define a xslt file
  • put an URL for an external specific stylesheet.
{langcode} will be replaced with current interface language' - - pref: DisplayIconsXSLT choices: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index fe0188b43d..0ffe432965 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -69,24 +69,13 @@ [% END %] [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %] - [% IF ( XSLTDetailsDisplay ) %] -
+
- [% ELSE %] -
-
- [% END %] [% ELSE %] - [% IF ( XSLTDetailsDisplay ) %] -
+
- [% ELSE %] -
-
- [% END %] [% END %] - [% IF ( XSLTDetailsDisplay ) %] [% XSLTBloc | $raw %] [% IF shelves.count %] @@ -148,153 +137,6 @@
[% END %] [% END %] - [% ELSE %] - -

[% title | html %]

- [% FOREACH subtitl IN subtitle %] -

[% subtitl.subfield | html %]

- [% END %] - [% UNLESS ( item_level_itypes ) %][% translated_description | html %][% END %] - [% IF ( unititle ) %]

[% unititle | html %]

[% END %] - [% IF ( author ) %]

By [% author | html %]

[% END %] -
    - [% IF ( MARCAUTHORS ) %] -
  • Additional authors:
      - [% FOREACH MARCAUTHOR IN MARCAUTHORS %] -
    • [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator | html %][% MARCAUTHOR_SUBFIELDS_LOO.value | html %][% END %]
    • - [% END %] - -
    -
  • - [% END %] -[% IF ( MARCSERIES ) %] -
  • Series:
      [% FOREACH MARCSERIE IN MARCSERIES %] -
    • [% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %] [% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %][% MARCSERIES_SUBFIELDS_LOO.value | html %][% END %][% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %]. [% MARCSERIES_SUBFIELDS_LOO.volumenum | html %][% END %][% END %]
    • - [% END %] -
    -
  • -[% END %] - [% IF ( publishercode ) %] -
  • Published by: - - [% publishercode | html %] - [% IF ( place ) %]([% place | html %])[% END %] [% IF ( publicationyear ) %], [% publicationyear | html %][% END %] [% IF ( editionstatement ) %][% editionstatement | html %][% END %] [% IF ( editionresponsibility ) %][% editionresponsibility | html %][% END %] -
  • - [% END %] -
  • Description: - [% IF ( pages ) %] [% END %][% pages | html %] [% IF ( illus ) %][% illus | html %][% END %] - [% IF ( size ) %][% size | html %][% END %] -
  • -[% IF ( MARCURLS ) %]
  • - - Online resources: -
      [% FOREACH MARCurl IN MARCURLS %] -
    • [% IF ( MARCurl.part ) %][% MARCurl.part | html %] -
      [% END %] - - [% MARCurl.linktext | html %] - [% IF ( MARCurl.notes ) %]
        [% FOREACH note IN MARCurl.notes %]
      • [% note.note | html %]
      • [% END %]
      [% END %]
    • - [% END %]
    -
  • - [% END %] - - [% IF ( OPACBaseURL ) %] -
  • OPAC view: - Open in new window -
  • - [% END %] -
  • - MARC Preview: - Show -
  • -
-
- - [% IF ( AmazonCoverImages || LocalCoverImages ) %] -
- [% IF ( LocalCoverImages ) %] -
- [% END %] - [% IF ( AmazonCoverImages ) %] -
- - - -
- [% END %] -
- [% END %] - -
-
    - [% IF ( MARCISBNS ) %] -
  • ISBN:
      [% FOREACH MARCISBN IN MARCISBNS %]
    • [% MARCISBN | html %]
    • [% END %]
  • - [% ELSE %] - [% IF ( normalized_isbn ) %] -
  • ISBN: [% normalized_isbn | html %]
  • - [% END %] - [% END %] - [% IF ( issn ) %] -
  • ISSN:[% issn | html %]
  • - [% END %] - [% IF ( collectiontitle ) %] -
  • Collection: - [% collectiontitle | html %] [% IF ( collectionvolume ) %], [% collectionvolume | html %][% END %][% IF ( collectionissn ) %] (ISSN: [% collectionissn | html %])[% END %] -
  • - [% END %] - [% IF ( MARCSUBJCTS ) %] -
  • Subjects: -
      - [% FOREACH MARCSUBJCT IN MARCSUBJCTS %] -
    • [% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% MARCSUBJECT_SUBFIELDS_LOO.separator | html %] [% MARCSUBJECT_SUBFIELDS_LOO.value | html %][% END %]
    • - [% END %] -
    -
  • - [% END %] - [% IF ( copyrightdate ) %] -
  • Copyright: [% copyrightdate | html %]
  • - [% END %] - - [% IF ( classification ) %] -
  • Classification: [% subclass | html %][% classification | html %]
  • - [% END %] - [% IF ( dewey ) %] -
  • Dewey: [% dewey | html %]
  • - [% END %] - [% IF ( urlS ) %] -
  • URL: - [% FOREACH url IN urlS %] - [% url.url | html %] - [% END %] -
  • - [% END %] - - [% IF shelves.count %] -
  • Lists that include this title: - -
  • - [% END %] - [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %] -
  • Tags: -
      - [% FOREACH TagLoo IN TagLoop %] -
    • - [% IF ( CAN_user_tools_moderate_tags ) %] - [% TagLoo.term | html %] - [% ELSE %] - [% TagLoo.term | html %] - [% END %] - ([% TagLoo.weight_total | html %])[% IF ( loop.last ) %][% ELSE %], [% END %]
    • - [% END %] -
  • - [% END %] - [% IF ( holdcount ) %]
  • Holds: [% holdcount | html %]
  • [% ELSE %][% END %] -
- [% END %]
-- 2.39.5