From 4b47782b6e41cf4c9db3f35c16e296f5733f93ef Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Tue, 29 Jul 2008 20:23:33 -0500 Subject: [PATCH] Tag cloud implementation in jquery. Initial implementation of "cloud" display on opac-tags. Signed-off-by: Joshua Ferraro --- .../opac-tmpl/prog/en/modules/opac-tags.tmpl | 51 +++++++++++++++++-- opac/opac-tags.pl | 9 ++-- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl index 1393600207..2e02d5d133 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl @@ -1,5 +1,43 @@ -Koha Online Catalog › Tags + Catalog › Tags + +
@@ -71,12 +109,15 @@

- Results: + diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl index f3c514324a..2bd9354bc5 100755 --- a/opac/opac-tags.pl +++ b/opac/opac-tags.pl @@ -199,13 +199,14 @@ if ($add_op) { $limit = $query->param('limit') || $hardmax; ($limit =~ /^\d+$/ and $limit <= $hardmax) or $limit = $hardmax; $template->param(limit => $limit); + my $arghash = {approved=>1, limit=>$limit, 'sort'=>'-weight_total'}; + # ($openadds) or $arghash->{approved} = 1; if ($arg = $query->param('tag')) { - $results = get_approval_rows({term => $arg, approved=>1, limit=>$limit, 'sort'=>'-weight_total'}); + $arghash->{term} = $arg; } elsif ($arg = $query->param('biblionumber')) { - $results = get_approval_rows({biblionumber => $arg, approved=>1, limit=>$limit, 'sort'=>'-weight_total'}); - } else { - $results = get_approval_rows({limit=>$limit, approved=>1, 'sort'=>'-weight_total'}); + $arghash->{biblionumber} = $arg; } + $results = get_approval_rows($arghash); my $count = scalar @$results; $template->param(TAGLOOP_COUNT => $count); -- 2.39.5