View | Details | Raw Unified | Return to bug 23866
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_23866.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "UPDATE systempreferences SET value = '2' WHERE value = '0' AND variable = 'UsageStats'" );
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug 23866 - Set HEA syspref to prompt for review)\n";
7
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 642-648 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
642
('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'),
642
('UploadPurgeTemporaryFilesDays','',NULL,'If not empty, number of days used when automatically deleting temporary uploads','integer'),
643
('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'),
643
('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'),
644
('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'),
644
('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'),
645
('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'),
645
('UsageStats', 2, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'),
646
('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'Choice'),
646
('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'Choice'),
647
('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.',  'Free'),
647
('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.',  'Free'),
648
('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library.', 'Free'),
648
('UsageStatsGeolocation', '', NULL, 'Geolocation of the main library.', 'Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt (+9 lines)
Lines 30-35 Link Here
30
                    </div>
30
                    </div>
31
                [% END %]
31
                [% END %]
32
            [% END %]
32
            [% END %]
33
            [% IF ( CAN_user_parameters_manage_usage_stats ) %]
34
                [% IF ( Koha.Preference('UsageStats') == 2 ) %]
35
                    <div class="dialog message">
36
                        <h4>Share anonymous usage statistics with the Koha community?</h4>
37
                        <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>
38
                        <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>
39
                    </div>
40
                [% END %]
41
            [% END %]
33
        <h1>Koha administration</h1>
42
        <h1>Koha administration</h1>
34
        <div class="row">
43
        <div class="row">
35
            <div class="col-md-6 sysprefs">
44
            <div class="col-md-6 sysprefs">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-1 / +2 lines)
Lines 184-193 Administration: Link Here
184
        -
184
        -
185
            - "Share anonymous Koha usage data with the Koha community: "
185
            - "Share anonymous Koha usage data with the Koha community: "
186
            - pref: UsageStats
186
            - pref: UsageStats
187
              default: 0
187
              default: 2
188
              choices:
188
              choices:
189
                  yes: "Yes"
189
                  yes: "Yes"
190
                  no: "No"
190
                  no: "No"
191
                  2: "No, let me think about it"
191
            - ". Website where usage statistics are published: <a href=\"http://hea.koha-community.org\">Hea Koha community website</a>."
192
            - ". Website where usage statistics are published: <a href=\"http://hea.koha-community.org\">Hea Koha community website</a>."
192
            - "<br><strong>NOTE:</strong> The other \"UsageStats\" preferences have no effect if this preference is set to \"No\"."
193
            - "<br><strong>NOTE:</strong> The other \"UsageStats\" preferences have no effect if this preference is set to \"No\"."
193
            - "<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."
194
            - "<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."
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt (-3 / +8 lines)
Lines 57-68 Link Here
57
                        <li>
57
                        <li>
58
                            <label for="UsageStats">Share my Koha usage statistics: </label>
58
                            <label for="UsageStats">Share my Koha usage statistics: </label>
59
                            <select name="UsageStats" id="UsageStats">
59
                            <select name="UsageStats" id="UsageStats">
60
                            [% IF Koha.Preference('UsageStats') %]
60
                            [% IF Koha.Preference('UsageStats') == 1 %]
61
                                <option value="2">Undecided</option>
61
                                <option value="1" selected="selected">Yes</option>
62
                                <option value="1" selected="selected">Yes</option>
62
                                <option value="0">No</option>
63
                                <option value="0">No</option>
63
                            [% ELSE %]
64
                            [% ELSIF Koha.Preference('UsageStats') == 0 %]
65
                                <option value="2">Undecided</option>
64
                                <option value="1">Yes</option>
66
                                <option value="1">Yes</option>
65
                                <option value="0" selected="selected">No</option>
67
                                <option value="0" selected="selected">No</option>
68
                            [% ELSE %]
69
                                <option value="2" selected="selected">Undecided</option>
70
                                <option value="1">Yes</option>
71
                                <option value="0">No</option>
66
                            [% END %]
72
                            [% END %]
67
                            </select>
73
                            </select>
68
                        </li>
74
                        </li>
69
- 

Return to bug 23866