View | Details | Raw Unified | Return to bug 6379
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt (-2 / +7 lines)
Lines 122-129 Link Here
122
                                        <tr>
122
                                        <tr>
123
                                            <td class="tagterm">
123
                                            <td class="tagterm">
124
                                                <span class="tdlabel">Tag:</span>
124
                                                <span class="tdlabel">Tag:</span>
125
                                                <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&amp;q=[% MY_TAG.term |url %]">
125
                                                [% IF MY_TAG.approved == 1 %]
126
                                            [% MY_TAG.term |html %]</a></td>
126
                                                    <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&amp;q=[% MY_TAG.term |url %]">[% MY_TAG.term |html %]</a>
127
                                                [% ELSE %]
128
                                                    [% MY_TAG.term |html %] (not approved)
129
                                                [% END %]
130
                                            </td>
131
127
                                            <td>
132
                                            <td>
128
                                                [% IF ( MY_TAG.XSLTBloc ) %]
133
                                                [% IF ( MY_TAG.XSLTBloc ) %]
129
                                                    [% MY_TAG.XSLTBloc %]
134
                                                    [% MY_TAG.XSLTBloc %]
(-)a/opac/opac-tags.pl (-13 / +14 lines)
Lines 226-245 my $results = []; Link Here
226
my $my_tags = [];
226
my $my_tags = [];
227
227
228
if ($loggedinuser) {
228
if ($loggedinuser) {
229
	$my_tags = get_tag_rows({borrowernumber=>$loggedinuser});
229
    $my_tags = get_tag_rows({borrowernumber=>$loggedinuser});
230
	foreach (@$my_tags) {
230
    my $my_approved_tags = get_approval_rows({borrowernumber => $loggedinuser, approved => 1});
231
		my $biblio = GetBiblioData($_->{biblionumber});
231
    foreach my $tag (@$my_tags) {
232
        my $record = &GetMarcBiblio( $_->{biblionumber} );
232
        my $biblio = GetBiblioData($tag->{biblionumber});
233
        $_->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $_->{biblionumber} ) );
233
        my $record = &GetMarcBiblio( $tag->{biblionumber} );
234
        $_->{title} = $biblio->{title};
234
        $tag->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $tag->{biblionumber} ) );
235
        $_->{author} = $biblio->{author};
235
        $tag->{title} = $biblio->{title};
236
        $tag->{author} = $biblio->{author};
236
        if (C4::Context->preference("OPACXSLTResultsDisplay")) {
237
        if (C4::Context->preference("OPACXSLTResultsDisplay")) {
237
            $_->{XSLTBloc} = XSLTParse4Display($_->{biblionumber}, $record, "OPACXSLTResultsDisplay");
238
            $tag->{XSLTBloc} = XSLTParse4Display($tag->{biblionumber}, $record, "OPACXSLTResultsDisplay");
238
        }
239
        }
239
		my $date = $_->{date_created} || '';
240
        my $date = $tag->{date_created} || '';
240
		$date =~ /\s+(\d{2}\:\d{2}\:\d{2})/;
241
        $date =~ /\s+(\d{2}\:\d{2}\:\d{2})/;
241
		$_->{time_created_display} = $1;
242
        $tag->{time_created_display} = $1;
242
	}
243
        $tag->{approved} = ( grep { $_->{term} eq $tag->{term} and $_->{approved} } @$my_approved_tags );
244
    }
243
}
245
}
244
246
245
$template->param(tagsview => 1);
247
$template->param(tagsview => 1);
246
- 

Return to bug 6379