Bugzilla – Attachment 12664 Details for
Bug 8870
UNIMARC authorities search doesn't display properly information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
UNIMARC authorities search doesn't display properly information
0002-UNIMARC-authorities-search-doesn-t-display-properly-.patch (text/plain), 6.59 KB, created by
Frédéric Demians
on 2012-10-03 17:06:11 UTC
(
hide
)
Description:
UNIMARC authorities search doesn't display properly information
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2012-10-03 17:06:11 UTC
Size:
6.59 KB
patch
obsolete
>From f2808f20d7e7cca985c7bb28807c3f106e38efd8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Wed, 3 Oct 2012 17:55:50 +0200 >Subject: [PATCH 2/2] UNIMARC authorities search doesn't display properly information > >- Note field (3xx) are not displayed on search result page. We get > 'HASH()' text. >- Parallel/Other forms (7xx) are not displayed, with language name in front of > heading >- On result page, seealso form are displayed, and end with '--' > >This bug is present on 3.8.5. To fix it, several patches only available on HEAD >are necessary. >--- > C4/AuthoritiesMarc.pm | 13 ++++++--- > koha-tmpl/opac-tmpl/prog/en/css/opac.css | 4 +++ > .../en/includes/authorities-search-results.inc | 29 +++++++++++-------- > .../opac-tmpl/prog/en/modules/opac-auth-detail.tt | 24 +++++++++++++--- > 4 files changed, 49 insertions(+), 21 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 2671cd4..8522e0f 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -1052,10 +1052,15 @@ sub BuildSummary { > } > } > # // form >- foreach my $field ($record->field('7..')) { >- my $lang = substr($field->subfield('8'),3,3); >- push @otherscript, { lang => $lang, term => $field->subfield('a'), direction => 'ltr', field => $field->tag() }; >- } >+ >+ # Other forms >+ @otherscript = map { { >+ lang => $_->subfield('8') || '', >+ term => $_->subfield('a'), >+ direction => 'ltr', >+ field => $_->tag, >+ } } $record->field('7..'); >+ > } else { > # construct MARC21 summary > # FIXME - looping over 1XX is questionable >diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >index 92f8b02..f0464e5 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css >+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >@@ -2682,6 +2682,10 @@ ul.ui-tabs-nav li { > .authstanzaheading { > font-weight: bold; > } >+div.authorizedheading { >+ font-weight: bold; >+ margin-bottom: 5px; >+} > > .authstanza li { > margin-left: 0.5em; >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc b/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc >index 58f5f2d..a7ffa5e 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc >@@ -2,15 +2,13 @@ > [% IF marcflavour == 'UNIMARC' %] > [% SWITCH type %] > [% CASE 'broader' %] >- <span class="BT">[% heading | html %]</span> -- >+ <span class="BT">BT: [% heading | html %]</span> > [% CASE 'narrower' %] >- <span class="NT">[% heading | html %]</span> -- >- [% CASE 'narrower' %] >- <span class="NT">[% heading | html %]</span> -- >+ <span class="NT">NT: [% heading | html %]</span> > [% CASE 'seefrom' %] >- <span class="UF">[% heading | html %]</span> -- >+ <span class="UF">UF: [% heading | html %]</span> > [% CASE 'seealso' %] >- <span class="RT">[% heading | html %]</span> -- >+ <span class="RT">RT: [% heading | html %]</span> > [% END %] > [% ELSE %] > [% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %] >@@ -33,15 +31,22 @@ > [% BLOCK authresult %] > [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %] > [% UNLESS ( summary.summaryonly ) %] >- [% FOREACH authorize IN summary.authorized %] >+ <div class="authorizedheading"> >+ [% FOREACH authorize IN summary.authorized %] > <span class="authorizedheading">[% authorize.heading | html %]</span> >- [% END %] >+ [% END %] >+ </div> > [% IF ( marcflavour == 'UNIMARC' ) %] >- [% FOREACH note IN summary.notes %] >- <span class="note">[% note | html %]</span> >+ [% IF summary.notes %] >+ <div class="notes"> >+ [% FOREACH note IN summary.notes %] >+ <span class="note">[% note.note | html %]</span> >+ [% END %] >+ </div> > [% END %] >- [% FOREACH seefro IN summary.seefrom %] >- [% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %] >+ [% FOREACH see IN summary.seealso %] >+ [% PROCESS showreference heading=see.heading label="" type=see.type search='' %] >+ [% IF ! loop.last %]--[% END %] > [% END %] > [% ELSE %] > [% IF ( summary.seefrom ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt >index cb195b1..ada69fe 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt >@@ -1,4 +1,14 @@ > [% PROCESS 'opac-authorities.inc' %] >+[% BLOCK language %] >+ [% SWITCH lang %] >+ [% CASE ['en', 'eng'] %]English >+ [% CASE ['fr', 'fre'] %]French >+ [% CASE ['it', 'ita'] %]Italian >+ [% CASE ['de', 'ger', 'deu'] %]German >+ [% CASE ['es', 'spa'] %]Spanish >+ [% CASE %][% lang %] >+ [% END %] >+[% END %] > [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Entry > [% INCLUDE 'doc-head-close.inc' %] > [% IF ( displayhierarchy ) %] >@@ -42,7 +52,7 @@ $(document).ready(function() { > </div> > [% END %] > >-<h1>[% summary.mainentry %][% IF authtypetext %]([% authtypetext %])[% END %]</h1> >+<h1>[% summary.mainentry %][% IF authtypetext %] ([% authtypetext %])[% END %]</h1> > <div class="usedin">Used in <a href="opac-search.pl?type=opac&q=[% authid %]&idx=an,phr">[% count %] records</a></div> > <div class="authstanza"> > [% FOREACH authorize IN summary.authorized %] >@@ -76,13 +86,17 @@ $(document).ready(function() { > </div> > [% END %] > [% IF marcflavour == 'UNIMARC' && summary.otherscript %] >- <div class="authstanza"> >+ <div class="authstanza"> >+ <div class="authstanzaheading">Other forms:</div> >+ <ul> > [% FOREACH otherscrip IN summary.otherscript %] >- <div class="heading otherscript auth[% otherscrip.field %]"><span class="label">See also[% PROCESS language lang=otherscript.lang | trim %] term:</span> >+ <li> >+ [% PROCESS language lang=otherscrip.lang | trim %]: > <span class="otherscript">[% otherscrip.term %]</span> >- </div> >+ </li> > [% END %] >- </div> >+ </ul> >+ </div> > [% END %] > <div id="authdescriptions" class="toptabs"> > <ul> >-- >1.7.2.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8870
:
12664
|
12671
|
12677
|
12683