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 482-488 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
482
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
482
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
483
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
483
('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
484
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
484
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
485
('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'),
485
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
486
('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'),
487
('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'),
488
('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded <style> tag.','free'),
489
('SelfCheckInUserJS','',NULL,'Define custom javascript for inclusion in the self check-in module.','free'),
486
('SelfCheckoutByLogin','1',NULL,'Have patrons login into the web-based self checkout system with their username/password or their cardnumber','YesNo'),
490
('SelfCheckoutByLogin','1',NULL,'Have patrons login into the web-based self checkout system with their username/password or their cardnumber','YesNo'),
487
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
491
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
488
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
492
('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
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
9
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
Lines 83-87 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
83
   (20, 'delete_public_lists', 'Delete public lists'),
82
   (20, 'delete_public_lists', 'Delete public lists'),
84
   (21, 'edit_templates', 'Create and update club templates'),
83
   (21, 'edit_templates', 'Create and update club templates'),
85
   (21, 'edit_clubs', 'Create and update clubs'),
84
   (21, 'edit_clubs', 'Create and update clubs'),
86
   (21, 'enroll', 'Enroll patrons in clubs')
85
   (21, 'enroll', 'Enroll patrons in clubs'),
86
   (23, 'self_checkin_module', 'Log into the self check-in module'),
87
   (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID')
87
;
88
;
(-)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 'edit_borrowers' -%]<span>Add, modify and view patron information</span>
37
    [%- CASE 'edit_borrowers' -%]<span>Add, modify and view patron information</span>
Lines 111-115 Link Here
111
    [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
111
    [%- CASE 'edit_templates' -%]<span>Create and edit club templates</span>
112
    [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
112
    [%- CASE 'enroll' -%]<span>Enroll patrons in clubs</span>
113
    [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
113
    [%- CASE 'edi_manage' -%]<span>Manage EDIFACT transmissions</span>
114
    [%- END -%]
114
  [%# self_check %]
115
    [%- 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>
116
    [%- CASE 'self_checkout_module' -%]<span>Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID</span>
117
  [%- END -%]
115
[%- END -%]
118
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +20 lines)
Lines 784-795 Circulation: Link Here
784
              type: textarea
784
              type: textarea
785
              class: code
785
              class: code
786
    Self check-in module:
786
    Self check-in module:
787
        -
788
            - "Include the following HTML on the self check-in screen:"
789
            - pref: SelfCheckInMainUserBlock
790
              type: textarea
791
              class: code
787
        -
792
        -
788
            - pref: SelfCheckInModule
793
            - pref: SelfCheckInModule
789
              choices:
794
              choices:
790
                  yes: Enable
795
                  yes: Enable
791
                  no: "Don't enable"
796
                  no: "Don't enable"
792
            - "the standalone self check-in module (available at: /cgi-bin/koha/sci/sci-main.pl)"
797
            - "the standalone self check-in module (available at: /cgi-bin/koha/sci/sci-main.pl)"
798
        -
799
            - "Reset the current self check-in screen after"
800
            - pref: SelfCheckInTimeout
801
              class: integer
802
            - seconds.
803
        -
804
            - "Include the following CSS on all the self check-in screens:"
805
            - pref: SelfCheckInUserCSS
806
              type: textarea
807
              class: code
808
        -
809
            - "Include the following JavaScript on all the self check-in screens:"
810
            - pref: SelfCheckInUserJS
811
              type: textarea
812
              class: code
793
    Self Checkout:
813
    Self Checkout:
794
        -
814
        -
795
            - "Include the following JavaScript on all pages in the web-based self checkout:"
815
            - "Include the following JavaScript on all pages in the web-based self checkout:"
796
- 

Return to bug 15492