Bug 15697: Unnecessary comma between title and subtitle on opac-detail.pl
authorNick Clemens <nick@bywatersolutions.com>
Thu, 28 Jan 2016 20:33:58 +0000 (20:33 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 26 Feb 2016 14:10:42 +0000 (14:10 +0000)
To test:
1 - Go to Administration->Keyword to MARC mapping
2 - Add a mapping (or ensure it exists)
    Field name: subtitle
    MARC field: 245
    MARC subfield: b
3 - View a record with a subtitle in the opac
4 - Note in MARC 21 you have "Title of record:, subtitle of record"
5 - Apply patch
6 - View the record again and note the comma is no longer present.

Note: this patch removes the comma only for MARC21 where subtitle is not
repeatable. UNIMARC seems to be repeatable and does not include
punctuation so I believe this may be needed there.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. Comma removed from title of the window and breadcrumb
section

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

index ee6120e..c8f13ca 100644 (file)
@@ -24,7 +24,7 @@
     [% SET protocol = "http://" %]
 [% END %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]</title>
+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %][% UNLESS Koha.Preference('marcflavour')=='MARC21' %],[% END %] [% subtitl.subfield |html %][% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( bidi ) %]
   [% BLOCK cssinclude %]<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left.css" />[% END %]
@@ -40,7 +40,7 @@
 <div class="main">
     <ul class="breadcrumb">
         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
-        <li><a href="#">Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]</a></li>
+        <li><a href="#">Details for: [% title %][% FOREACH subtitl IN subtitle %][% UNLESS Koha.Preference('marcflavour')=='MARC21' %],[% END %] [% subtitl.subfield |html %][% END %]</a></li>
     </ul>
 
     <div class="container-fluid">