Bugzilla – Attachment 32556 Details for
Bug 13083
Hard-coded " by " in opac-tags.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13083 - Hard-coded " by " in opac-tags.pl
Bug-13083---Hard-coded--by--in-opac-tagspl.patch (text/plain), 2.90 KB, created by
Owen Leonard
on 2014-10-21 16:09:58 UTC
(
hide
)
Description:
Bug 13083 - Hard-coded " by " in opac-tags.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-10-21 16:09:58 UTC
Size:
2.90 KB
patch
obsolete
>From 57b18ad0a09352e43b03aa71988a44a7130f52ef Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 15 Oct 2014 14:39:06 -0400 >Subject: [PATCH] Bug 13083 - Hard-coded " by " in opac-tags.pl >Content-Type: text/plain; charset="utf-8" > >The OPAC's list of a logged-in user's tagged titles displays title and >author, which for some reason are combined in the script into one >variable. I can't see any reason to do it this way. > >This patch modifies the script so that title and author are passed as >separate variables. In addition, subtitle is now passed as well. > >To test you must log into the OPAC as a user who has tagged multiple >titles, at least one of which should have an author and at least one >with a subtitle. View the list of tagged titles and confirm that this >information is being displayed correctly. >--- > .../opac-tmpl/bootstrap/en/modules/opac-tags.tt | 2 +- > opac/opac-tags.pl | 6 ++++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >index 8e9a477..2811bd0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >@@ -126,7 +126,7 @@ > <td> > <span class="tdlabel">Title:</span> > <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% MY_TAG.biblionumber %]"> >- [% MY_TAG.bib_summary |html %]</a></td> >+ [% MY_TAG.title |html %][% IF ( MY_TAG.subtitle ) %][% FOREACH subtitle IN MY_TAG.subtitle %] [% subtitle.subfield |html %][% END %][% END %]</a> [% IF ( MY_TAG.author ) %]by [% MY_TAG.author %][% END %]</td> > <td> > <span title="[% MY_TAG.date_created %]"> > <span class="tdlabel">Date added:</span> >diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl >index 1810ed3..6c402a5 100755 >--- a/opac/opac-tags.pl >+++ b/opac/opac-tags.pl >@@ -228,8 +228,10 @@ if ($loggedinuser) { > $my_tags = get_tag_rows({borrowernumber=>$loggedinuser}); > foreach (@$my_tags) { > my $biblio = GetBiblioData($_->{biblionumber}); >- $_->{bib_summary} = $biblio->{title}; >- ($biblio->{author}) and $_->{bib_summary} .= " by " . $biblio->{author}; >+ my $record = &GetMarcBiblio( $_->{biblionumber} ); >+ $_->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $_->{biblionumber} ) ); >+ $_->{title} = $biblio->{title}; >+ $_->{author} = $biblio->{author}; > my $date = $_->{date_created} || ''; > $date =~ /\s+(\d{2}\:\d{2}\:\d{2})/; > $_->{time_created_display} = $1; >-- >1.7.9.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 13083
:
32556
|
32751
|
32770