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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-1 / +1 lines)
Lines 29-35 Link Here
29
                [% ELSE %]
29
                [% ELSE %]
30
                    <li>
30
                    <li>
31
                [% END %]
31
                [% END %]
32
                <a href="/cgi-bin/koha/opac-tags.pl?mine=1">your tags</a></li>
32
                <a href="/cgi-bin/koha/opac-tags.pl">your tags</a></li>
33
            [% END %]
33
            [% END %]
34
34
35
            [% IF ( OpacPasswordChange ) %]
35
            [% IF ( OpacPasswordChange ) %]
(-)a/opac/opac-tags.pl (-5 / +2 lines)
Lines 253-266 if ($add_op) { Link Here
253
		deleted_count => $dels,
253
		deleted_count => $dels,
254
	);
254
	);
255
} else {
255
} else {
256
	my ($arg,$limit,$mine);
256
	my ($arg,$limit);
257
	my $hardmax = 100;	# you might disagree what this value should be, but there definitely should be a max
257
	my $hardmax = 100;	# you might disagree what this value should be, but there definitely should be a max
258
	$limit = $query->param('limit') || $hardmax;
258
	$limit = $query->param('limit') || $hardmax;
259
    $mine =  $query->param('mine') || 0; # set if the patron want to see only his own tags.
260
	($limit =~ /^\d+$/ and $limit <= $hardmax) or $limit = $hardmax;
259
	($limit =~ /^\d+$/ and $limit <= $hardmax) or $limit = $hardmax;
261
	$template->param(limit => $limit);
260
	$template->param(limit => $limit);
262
	my $arghash = {approved=>1, limit=>$limit, 'sort'=>'-weight_total'};
261
	my $arghash = {approved=>1, limit=>$limit, 'sort'=>'-weight_total'};
263
    $arghash->{'borrowernumber'} = $loggedinuser if $mine;
264
	# ($openadds) or $arghash->{approved} = 1;
262
	# ($openadds) or $arghash->{approved} = 1;
265
	if ($arg = $query->param('tag')) {
263
	if ($arg = $query->param('tag')) {
266
		$arghash->{term} = $arg;
264
		$arghash->{term} = $arg;
Lines 270-276 if ($add_op) { Link Here
270
	$results = get_approval_rows($arghash);
268
	$results = get_approval_rows($arghash);
271
    stratify_tags(10, $results); # work out the differents sizes for things
269
    stratify_tags(10, $results); # work out the differents sizes for things
272
	my $count = scalar @$results;
270
	my $count = scalar @$results;
273
	$template->param(TAGLOOP_COUNT => $count, mine => $mine);
271
	$template->param(TAGLOOP_COUNT => $count);
274
}
272
}
275
(scalar @errors  ) and $template->param(ERRORS  => \@errors);
273
(scalar @errors  ) and $template->param(ERRORS  => \@errors);
276
my @orderedresult = sort { uc($a->{'term'}) cmp uc($b->{'term'}) } @$results;
274
my @orderedresult = sort { uc($a->{'term'}) cmp uc($b->{'term'}) } @$results;
277
- 

Return to bug 6178