Bugzilla – Attachment 94550 Details for
Bug 23866
HEA submission preferences should prompt similar to ManaKB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23866: Prompt for HEA configuration
Bug-23866-Prompt-for-HEA-configuration.patch (text/plain), 6.27 KB, created by
Martin Renvoize (ashimema)
on 2019-10-22 13:09:27 UTC
(
hide
)
Description:
Bug 23866: Prompt for HEA configuration
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-22 13:09:27 UTC
Size:
6.27 KB
patch
obsolete
>From 7776da8294dfaff3e6b862366b274aaea531bd0d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 22 Oct 2019 13:57:42 +0100 >Subject: [PATCH] Bug 23866: Prompt for HEA configuration > >--- > installer/data/mysql/atomicupdate/bug_23866.perl | 7 +++++++ > installer/data/mysql/sysprefs.sql | 2 +- > .../intranet-tmpl/prog/en/modules/admin/admin-home.tt | 9 +++++++++ > .../prog/en/modules/admin/preferences/admin.pref | 3 ++- > .../prog/en/modules/admin/usage_statistics.tt | 10 ++++++++-- > 5 files changed, 27 insertions(+), 4 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23866.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_23866.perl b/installer/data/mysql/atomicupdate/bug_23866.perl >new file mode 100644 >index 0000000000..3c1f19c5c0 >--- /dev/null >+++ b/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"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 75b04e2fd0..f0c3319be7 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -639,7 +639,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'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >index 4095e516e9..b6aa581843 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >+++ b/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"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index 5c890706be..00fba12baf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/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." >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt >index 0f8ea78bed..f8d018234d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt >+++ b/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> >-- >2.20.1
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 23866
:
94550
|
94678
|
94879