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

(-)a/installer/data/mysql/atomicupdate/bug31503.pl (-2 / +7 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number  => 31503,
4
    bug_number  => 31503,
5
    description => "Change patron_consent.type",
5
    description => "Change patron_consent.type, add pref OPACCustomConsentTypes",
6
    up          => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
Lines 10-16 return { Link Here
10
        $dbh->do(
10
        $dbh->do(
11
            q{ALTER TABLE `patron_consent` MODIFY `type` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'consent type, could be custom type'}
11
            q{ALTER TABLE `patron_consent` MODIFY `type` tinytext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'consent type, could be custom type'}
12
        );
12
        );
13
14
        say $out "Changed column 'patron_consent.type'";
13
        say $out "Changed column 'patron_consent.type'";
14
15
        $dbh->do(
16
            q{INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
17
('OPACCustomConsentTypes', '0', NULL, 'If enabled, custom consent types can be registered on account page', 'YesNo')}
18
        );
19
        say $out "Addedd preference 'OPACCustomConsentTypes'";
15
    },
20
    },
16
};
21
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 442-447 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
442
('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'),
442
('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'),
443
('OpacAdditionalStylesheet','','','Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server\'s css directory) or a complete URL beginning with http (if the file lives on a remote server).','free'),
443
('OpacAdditionalStylesheet','','','Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server\'s css directory) or a complete URL beginning with http (if the file lives on a remote server).','free'),
444
('OpacCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the OPAC', 'YesNo'),
444
('OpacCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the OPAC', 'YesNo'),
445
('OPACCustomConsentTypes', '0', NULL, 'If enabled, custom consent types can be registered on account page', 'YesNo'),
445
('OPACCustomCoverImages','0',NULL,'If enabled, the custom cover images will be displayed at the OPAC. CustomCoverImagesURL must be defined.','YesNo'),
446
('OPACCustomCoverImages','0',NULL,'If enabled, the custom cover images will be displayed at the OPAC. CustomCoverImagesURL must be defined.','YesNo'),
446
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
447
('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
447
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
448
('OPACdefaultSortOrder','dsc','asc|dsc|za|az','Specify the default sort order','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+9 lines)
Lines 552-557 OPAC: Link Here
552
                  summary: "in user summary box on OPAC homepage (the system preference <em>OPACUserSummary</em> must be enabled)"
552
                  summary: "in user summary box on OPAC homepage (the system preference <em>OPACUserSummary</em> must be enabled)"
553
                  user: "on patron's 'your summary' page"
553
                  user: "on patron's 'your summary' page"
554
            - ". Note that displayed savings may be inaccurate if checkout history is anonymized."
554
            - ". Note that displayed savings may be inaccurate if checkout history is anonymized."
555
        -
556
            - pref: OPACCustomConsentTypes
557
              default: 0
558
              choices:
559
                  1: Allow
560
                  0: "Don't allow"
561
            - "users to register consents for custom (plugin based) consent types on the user account page."
562
            - "<br>Note: The consents tab is also visible when you enabled PrivacyPolicyConsent."
563
555
    OpenURL:
564
    OpenURL:
556
        -
565
        -
557
            - 'Complete URL of OpenURL resolver (starting with <code>http://</code> or <code>https://</code>):'
566
            - 'Complete URL of OpenURL resolver (starting with <code>http://</code> or <code>https://</code>):'
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-2 / +1 lines)
Lines 24-30 Link Here
24
            [% END %]
24
            [% END %]
25
                <a href="/cgi-bin/koha/opac-memberentry.pl">Personal details</a></li>
25
                <a href="/cgi-bin/koha/opac-memberentry.pl">Personal details</a></li>
26
26
27
            [% IF Koha.Preference('PrivacyPolicyConsent') # remove when extending %]
27
            [% IF Koha.Preference('PrivacyPolicyConsent') || Koha.Preference('OPACCustomConsentTypes') %]
28
                [% IF consentview %]<li class="active">[% ELSE %]<li>[% END %]
28
                [% IF consentview %]<li class="active">[% ELSE %]<li>[% END %]
29
                    <a href="/cgi-bin/koha/opac-patron-consent.pl">Consents</a>
29
                    <a href="/cgi-bin/koha/opac-patron-consent.pl">Consents</a>
30
                </li>
30
                </li>
31
- 

Return to bug 31503