Bugzilla – Attachment 10028 Details for
Bug 7642
The number that appears when hovering over a tag in the tag cloud isn't the number of items with that tag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7642 - OpacShowTagCloudWeight system preference
SIGNED-OFF-Bug-7642---OpacShowTagCloudWeight-syste.patch (text/plain), 5.18 KB, created by
Katrin Fischer
on 2012-06-09 14:09:10 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7642 - OpacShowTagCloudWeight system preference
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-06-09 14:09:10 UTC
Size:
5.18 KB
patch
obsolete
>From 94a19ce51820bb5fab0ec867e2d8b9afb1b4d760 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Sat, 26 May 2012 13:41:29 +1200 >Subject: [PATCH] [SIGNED-OFF] Bug 7642 - OpacShowTagCloudWeight system > preference > >This system preference allows the mouseover text on the tag cloud to be >turned off. The text consists of the weight for the tag, but users are >more likely to confuse it with the number of items that have this tag. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as advertised, tiny change to the HTML output. >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 6 ++++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt | 7 ++++++- > opac/opac-tags.pl | 7 +++++-- > 5 files changed, 26 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 2ffe2df..1da0ef0 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -365,3 +365,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer'); > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowTagCloudWeight','1','Whether to show the weight of a tag when you hover over its name in the tag cloud',NULL,'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index dbbdee3..9df0f3b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5308,6 +5308,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.09.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowTagCloudWeight','1','Whether to show the weight of a tag when you hover over its name in the tag cloud',NULL,'YesNo')"); >+ print "Upgrade to $DBversion done (Add the 'OpacShowTagCloudWeight' system preference)\n"; >+ SetVersion($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index e4ea15b..63ab78b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -223,6 +223,12 @@ OPAC: > - '<br />Note: Available options are: BIBTEX (<code>bibtex</code>), Dublin Core (<code>dc</code>),' > - 'MARCXML (<code>marcxml</code>), MARC-8 encoded MARC (<code>marc8</code>), Unicode/UTF-8 encoded MARC (<code>utf8</code>),' > - 'Unicode/UTF-8 encoded MARC without local use -9xx, x9x, xx9- fields and subfields (<code>marcstd</code>), MODS (<code>mods</code>), RIS (<code>ris</code>)' >+ - >+ - pref: OpacShowTagCloudWeight >+ choices: >+ yes: Show >+ no: "Don't show" >+ - 'the numerical weight of a tag when you hover over its name in the tag cloud.' > Features: > - > - pref: opacuserlogin >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt >index 1c291c9..b67d4e9 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt >@@ -90,7 +90,12 @@ > [% IF ( TAGLOOP ) %] > <div id="tagcloud"> > [% FOREACH TAGLOO IN TAGLOOP %] >- <span class="tag" id="tag[% loop.count %]" title="[% TAGLOO.cloudweight %]"> >+ [% IF (showweight) %] >+ <span class="tag" id="tag[% loop.count %]" title="[% TAGLOO.cloudweight %]"> >+ [% ELSE %] >+ <span class="tag" id="tag[% loop.count %]" > >+ [% END %] >+ > <a href="/cgi-bin/koha/opac-search.pl?tag=[% TAGLOO.term |url %]&q=[% TAGLOO.term |url %]"> > [% TAGLOO.term |html %]</a> > <span class="tagweight">[% TAGLOO.weight_total %]</span> >diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl >index 173a25c..601174d 100755 >--- a/opac/opac-tags.pl >+++ b/opac/opac-tags.pl >@@ -236,8 +236,11 @@ if ($loggedinuser) { > } > } > >-$template->param(tagsview => 1, >-dateformat => C4::Context->preference("dateformat")); >+$template->param( >+ tagsview => 1, >+ dateformat => C4::Context->preference("dateformat"), >+ showweight => C4::Context->preference("OpacShowTagCloudWeight") >+); > > if ($add_op) { > my $adds = 0; >-- >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 7642
:
9785
|
10028
|
10111
|
10123
|
10986
|
10987
|
10988
|
12014
|
12022
|
12604
|
12626