@@ -, +, @@ --- 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(-) --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -364,3 +364,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice'); 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,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'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5284,6 +5284,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "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) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -223,6 +223,12 @@ OPAC: - '
Note: Available options are: BIBTEX (bibtex), Dublin Core (dc),' - 'MARCXML (marcxml), MARC-8 encoded MARC (marc8), Unicode/UTF-8 encoded MARC (utf8),' - 'Unicode/UTF-8 encoded MARC without local use -9xx, x9x, xx9- fields and subfields (marcstd), MODS (mods), RIS (ris)' + - + - 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 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tt @@ -90,7 +90,12 @@ [% IF ( TAGLOOP ) %]
[% FOREACH TAGLOO IN TAGLOOP %] - + [% IF (showweight) %] + + [% ELSE %] + + [% END %] + [% TAGLOO.term |html %] [% TAGLOO.weight_total %] --- a/opac/opac-tags.pl +++ a/opac/opac-tags.pl @@ -234,8 +234,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; --