@@ -, +, @@ - Requires admin user initialization/login - Uses the logged users' library - A form allows to scan multiple barcodes - A button sends the barcode list to the controller to batch perform the checkins - Successful and failed checkins are sent to the template - Results are displayed - Logout link - Apply this patches - Make sure you upgrade: $ kshell k$ perl installer/data/mysql/updatedatabase.pl - Have 'SelfCheckInModule' disabled - Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/sci/sci-main.pl [1] - Enable 'SelfCheckInModule' - Go to the previous URL - Login with a user WITHOUT self_checkout permissions - Login with a user WITH self_checkour permissions - Go through the several options - Click the 'Help' link - Sign off :-D - Bonus points: $ kshell k$ qa -c 2 -v 2 --- C4/Auth.pm | 29 +++ koha-tmpl/opac-tmpl/bootstrap/css/sco.css | 12 + .../opac-tmpl/bootstrap/en/modules/opac-auth.tt | 4 + .../opac-tmpl/bootstrap/en/modules/sci/sci-main.tt | 248 +++++++++++++++++++++ opac/sci/sci-main.pl | 96 ++++++++ 5 files changed, 389 insertions(+) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt create mode 100755 opac/sci/sci-main.pl --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -207,6 +207,34 @@ sub get_template_and_user { } } + # If the user logged in is the SCI user and they try to go out of the SCI module, + # log the user out removing the CGISESSID cookie + if ( $in->{type} eq 'opac' and $in->{template_name} !~ m|sci/| ) { + if ( $user && C4::Context->preference('AutoSelfCheckID') && $user eq C4::Context->preference('AutoSelfCheckID') ) { + $template = C4::Templates::gettemplate( 'opac-auth.tt', 'opac', $in->{query} ); + my $cookie = $in->{query}->cookie( + -name => 'CGISESSID', + -value => '', + -expires => '', + -HttpOnly => 1, + ); + + $template->param( + loginprompt => 1, + script_name => get_script_name(), + ); + print $in->{query}->header( + { type => 'text/html', + charset => 'utf-8', + cookie => $cookie, + 'X-Frame-Options' => 'SAMEORIGIN' + } + ), + $template->output; + safe_exit; + } + } + my $borrowernumber; if ($user) { @@ -1266,6 +1294,7 @@ sub checkauth { ); $template->param( SCO_login => 1 ) if ( $query->param('sco_user_login') ); + $template->param( SCI_login => 1 ) if ( $query->param('sci_user_login') ); $template->param( OpacPublic => C4::Context->preference("OpacPublic") ); $template->param( loginprompt => 1 ) unless $info{'nopermission'}; --- a/koha-tmpl/opac-tmpl/bootstrap/css/sco.css +++ a/koha-tmpl/opac-tmpl/bootstrap/css/sco.css @@ -193,4 +193,16 @@ i.help { .table .nosort.sorting { padding-right: 19px; background: #EEEEEE none; +} + +#sci_logout { + color: #E8583C; +} + +#sci_checkin_button, #sci_refresh_button, #sci_append_button { + margin-bottom: 10px; +} + +#sci_refresh_button { + color: rgb(51, 51, 51); } --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt @@ -31,6 +31,8 @@
Sorry, the system doesn't think you have permission to access this page.
[% IF SCO_login %] + [% ELSIF SCI_login %] + [% END %] [% END %] @@ -158,6 +160,8 @@ [% IF SCO_login %]