Browse Source

Bug 23866: Prompt for HEA configuration

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
remotes/origin/19.11.x
Martin Renvoize 3 years ago
parent
commit
66179ffd9b
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 7
      installer/data/mysql/atomicupdate/bug_23866.perl
  2. 2
      installer/data/mysql/sysprefs.sql
  3. 9
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
  4. 3
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
  5. 10
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt

7
installer/data/mysql/atomicupdate/bug_23866.perl

@ -0,0 +1,7 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "UPDATE systempreferences SET value = '2' WHERE value = '0' AND variable = 'UsageStats'" );
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 23866 - Set HEA syspref to prompt for review)\n";
}

2
installer/data/mysql/sysprefs.sql

@ -642,7 +642,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'),
('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'),
('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'),
('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'),
('UsageStats', 2, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'),
('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'Choice'),
('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'),
('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library.', 'Free'),

9
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt

@ -30,6 +30,15 @@
</div>
[% END %]
[% END %]
[% IF ( CAN_user_parameters_manage_usage_stats ) %]
[% IF ( Koha.Preference('UsageStats') == 2 ) %]
<div class="dialog message">
<h4>Share anonymous usage statistics with the Koha community?</h4>
<p> You haven't decided if you want to activate usage statistic sharing in Koha yet. <a href=/cgi-bin/koha/admin/usage_statistics.pl>Change your HEA settings</a>.</p>
<p> This feature gives the Koha developers valuable information regarding how Koha is being used and helps to drive decisions during the development cycle</p>
</div>
[% END %]
[% END %]
<h1>Koha administration</h1>
<div class="row">
<div class="col-md-6 sysprefs">

3
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref

@ -184,10 +184,11 @@ Administration:
-
- "Share anonymous Koha usage data with the Koha community: "
- pref: UsageStats
default: 0
default: 2
choices:
yes: "Yes"
no: "No"
2: "No, let me think about it"
- ". Website where usage statistics are published: <a href=\"http://hea.koha-community.org\">Hea Koha community website</a>."
- "<br><strong>NOTE:</strong> The other \"UsageStats\" preferences have no effect if this preference is set to \"No\"."
- "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/share_usage_with_koha_community.pl</code> cronjob. Ask your system administrator to schedule it."

10
koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt

@ -57,12 +57,18 @@
<li>
<label for="UsageStats">Share my Koha usage statistics: </label>
<select name="UsageStats" id="UsageStats">
[% IF Koha.Preference('UsageStats') %]
[% IF Koha.Preference('UsageStats') == 1 %]
<option value="2">Undecided</option>
<option value="1" selected="selected">Yes</option>
<option value="0">No</option>
[% ELSE %]
[% ELSIF Koha.Preference('UsageStats') == 0 %]
<option value="2">Undecided</option>
<option value="1">Yes</option>
<option value="0" selected="selected">No</option>
[% ELSE %]
<option value="2" selected="selected">Undecided</option>
<option value="1">Yes</option>
<option value="0">No</option>
[% END %]
</select>
</li>

Loading…
Cancel
Save