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

(-)a/installer/data/mysql/atomicupdate/bug_15492.perl (-2 / +60 lines)
Lines 1-10 Link Here
1
$DBversion = 'XXX';
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
3
4
    $dbh->do(q|
4
    $dbh->do(q{
5
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
6
        VALUES ('SelfCheckInMainUserBlock', '', '70|10', 'Add a block of HTML that will display on the self check-in screen.', 'Textarea');
7
    });
8
9
    $dbh->do(q{
5
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
10
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
6
        VALUES ('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo');
11
        VALUES ('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo');
7
    |);
12
    });
13
14
    $dbh->do(q{
15
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
16
        VALUES ('SelfCheckInModuleUserID', NULL, NULL, 'Patron ID (borrowernumber) to be allowed on the self-checkin module.', 'Integer');
17
    });
18
19
    $dbh->do(q{
20
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
21
        VALUES ('SelfCheckInTimeout', 120, NULL, 'Define the number of seconds before the self check-in module times out.', 'Integer');
22
    });
23
24
    $dbh->do(q{
25
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
26
        VALUES ('SelfCheckInUserCSS', '', NULL, 'Add CSS to be included in the self check-in module in an embedded <style> tag.', 'free');
27
    });
28
29
    $dbh->do(q{
30
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
31
        VALUES ('SelfCheckInUserJS', '', NULL, 'Define custom javascript for inclusion in the self check-in module.', 'free');
32
    });
33
34
    # Add new userflag for self check
35
    $dbh->do(q{
36
        INSERT IGNORE INTO userflags (bit,flag,flagdesc,defaulton) VALUES
37
            (23,'self_check','Self check modules',0);
38
    });
39
40
    # Add self check-in module subpermission
41
    $dbh->do(q{
42
        INSERT IGNORE INTO permissions (module_bit,code,description)
43
        VALUES (23, 'self_checkin_module', 'Log into the self check-in module');
44
    });
45
46
    # Add self check-in module subpermission
47
    $dbh->do(q{
48
        INSERT IGNORE INTO permissions (module_bit,code,description)
49
        VALUES (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID');
50
    });
51
52
    # Update patrons with self_checkout permission
53
    # IMPORTANT: Needs to happen before removing the old subpermission
54
    $dbh->do(q{
55
        UPDATE user_permissions
56
        SET module_bit = 23,
57
                  code = 'self_checkout_module'
58
        WHERE module_bit = 1 AND code = 'self_checkout';
59
    });
60
61
    # Remove old self_checkout permission
62
    $dbh->do(q{
63
        DELETE IGNORE FROM permissions
64
        WHERE  code='self_checkout';
65
    });
8
66
9
    SetVersion( $DBversion );
67
    SetVersion( $DBversion );
10
    print "Upgrade to $DBversion done (Bug 15492: Add a standalone self-checkin module)\n";
68
    print "Upgrade to $DBversion done (Bug 15492: Add a standalone self-checkin module)\n";
(-)a/installer/data/mysql/sysprefs.sql (+4 lines)
Lines 480-486 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
480
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
480
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
481
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
481
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
482
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
482
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
483
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
483
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
484
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
485
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
486
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
487
('SelfCheckInUserJS','',NULL,'Define custom javascript for inclusion in the self check-in module.','free'),
484
('SelfCheckoutByLogin','1',NULL,'Have patrons login into the web-based self checkout system with their username/password or their cardnumber','YesNo'),
488
('SelfCheckoutByLogin','1',NULL,'Have patrons login into the web-based self checkout system with their username/password or their cardnumber','YesNo'),
485
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
489
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
486
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
490
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
(-)a/installer/data/mysql/userflags.sql (-1 / +2 lines)
Lines 19-23 INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES Link Here
19
(19, 'plugins', 'Koha plugins', '0'),
19
(19, 'plugins', 'Koha plugins', '0'),
20
(20, 'lists', 'Lists', 0),
20
(20, 'lists', 'Lists', 0),
21
(21, 'clubs', 'Patron clubs', '0'),
21
(21, 'clubs', 'Patron clubs', '0'),
22
(22,'ill','The Interlibrary Loans Module',0)
22
(22,'ill','The Interlibrary Loans Module',0),
23
(23,'self_check','Self check modules',0)
23
;
24
;
(-)a/installer/data/mysql/userpermissions.sql (-2 / +3 lines)
Lines 4-10 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
4
   ( 1, 'overdues_report', 'Execute overdue items report'),
4
   ( 1, 'overdues_report', 'Execute overdue items report'),
5
   ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
5
   ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
6
   ( 1, 'manage_restrictions', 'Manage restrictions for accounts'),
6
   ( 1, 'manage_restrictions', 'Manage restrictions for accounts'),
7
   ( 1, 'self_checkout', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
8
   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
7
   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
9
   ( 3, 'manage_circ_rules', 'Manage circulation rules'),
8
   ( 3, 'manage_circ_rules', 'Manage circulation rules'),
10
   ( 6, 'place_holds', 'Place holds for patrons'),
9
   ( 6, 'place_holds', 'Place holds for patrons'),
Lines 81-85 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
81
   (20, 'delete_public_lists', 'Delete public lists'),
80
   (20, 'delete_public_lists', 'Delete public lists'),
82
   (21, 'edit_templates', 'Create and update club templates'),
81
   (21, 'edit_templates', 'Create and update club templates'),
83
   (21, 'edit_clubs', 'Create and update clubs'),
82
   (21, 'edit_clubs', 'Create and update clubs'),
84
   (21, 'enroll', 'Enroll patrons in clubs')
83
   (21, 'enroll', 'Enroll patrons in clubs'),
84
   (23, 'self_checkin_module', 'Log into the self check-in module'),
85
   (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID')
85
;
86
;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-3 / +6 lines)
Lines 21-37 Link Here
21
    [%- CASE 'lists' -%]<span>Lists</span>
21
    [%- CASE 'lists' -%]<span>Lists</span>
22
    [%- CASE 'clubs' -%]<span>Patron clubs</span>
22
    [%- CASE 'clubs' -%]<span>Patron clubs</span>
23
    [%- CASE 'ill' -%]<span>Create and modify Interlibrary loan requests</span>
23
    [%- CASE 'ill' -%]<span>Create and modify Interlibrary loan requests</span>
24
    [%- CASE 'self_check' -%]<span>Self check modules</span>
24
    [%- END -%]
25
    [%- END -%]
25
[%- END -%]
26
[%- END -%]
26
27
27
[%- BLOCK sub_permissions -%]
28
[%- BLOCK sub_permissions -%]
28
    [% SWITCH name %]
29
  [% SWITCH name %]
29
    [%- CASE 'circulate_remaining_permissions' -%]<span>Remaining circulation permissions</span>
30
    [%- CASE 'circulate_remaining_permissions' -%]<span>Remaining circulation permissions</span>
30
    [%- CASE 'force_checkout' -%]<span>Force checkout if a limitation exists</span>
31
    [%- CASE 'force_checkout' -%]<span>Force checkout if a limitation exists</span>
31
    [%- CASE 'manage_restrictions' -%]<span>Manage restrictions for accounts</span>
32
    [%- CASE 'manage_restrictions' -%]<span>Manage restrictions for accounts</span>
32
    [%- CASE 'overdues_report' -%]<span>Execute overdue items report</span>
33
    [%- CASE 'overdues_report' -%]<span>Execute overdue items report</span>
33
    [%- CASE 'override_renewals' -%]<span>Override blocked renewals</span>
34
    [%- CASE 'override_renewals' -%]<span>Override blocked renewals</span>
34
    [%- CASE 'self_checkout' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>
35
    [%- CASE 'manage_circ_rules' -%]<span>manage circulation rules</span>
35
    [%- CASE 'manage_circ_rules' -%]<span>manage circulation rules</span>
36
    [%- CASE 'parameters_remaining_permissions' -%]<span>Remaining system parameters permissions</span>
36
    [%- CASE 'parameters_remaining_permissions' -%]<span>Remaining system parameters permissions</span>
37
    [%- CASE 'modify_holds_priority' -%]<span>Modify holds priority</span>
37
    [%- CASE 'modify_holds_priority' -%]<span>Modify holds priority</span>
Lines 109-113 Link Here
109
    [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
109
    [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
110
    [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
110
    [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
111
    [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
111
    [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
112
    [%- END -%]
112
  [%# self_check %]
113
    [%- CASE 'self_checkin_module' -%]<span>Log into the self check-in module. Note: this permission prevents the patron from using any other OPAC functionality</span>
114
    [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>
115
  [%- END -%]
113
[%- END -%]
116
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +20 lines)
Lines 777-788 Circulation: Link Here
777
              type: textarea
777
              type: textarea
778
              class: code
778
              class: code
779
    Self check-in module:
779
    Self check-in module:
780
        -
781
            - "Include the following HTML on the self check-in screen:"
782
            - pref: SelfCheckInMainUserBlock
783
              type: textarea
784
              class: code
780
        -
785
        -
781
            - pref: SelfCheckInModule
786
            - pref: SelfCheckInModule
782
              choices:
787
              choices:
783
                  yes: Enable
788
                  yes: Enable
784
                  no: "Don't enable"
789
                  no: "Don't enable"
785
            - "the standalone self check-in module (available at: /cgi-bin/koha/sci/sci-main.pl)"
790
            - "the standalone self check-in module (available at: /cgi-bin/koha/sci/sci-main.pl)"
791
        -
792
            - "Reset the current self check-in screen after"
793
            - pref: SelfCheckInTimeout
794
              class: integer
795
            - seconds.
796
        -
797
            - "Include the following CSS on all the self check-in screens:"
798
            - pref: SelfCheckInUserCSS
799
              type: textarea
800
              class: code
801
        -
802
            - "Include the following JavaScript on all the self check-in screens:"
803
            - pref: SelfCheckInUserJS
804
              type: textarea
805
              class: code
786
    Self Checkout:
806
    Self Checkout:
787
        -
807
        -
788
            - "Include the following JavaScript on all pages in the web-based self checkout:"
808
            - "Include the following JavaScript on all pages in the web-based self checkout:"
789
- 

Return to bug 15492