Bug 13083 - Hard-coded " by " in opac-tags.pl
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. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
5aa6953cc4
commit
b52a24efb2
2 changed files with 5 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue