Bugzilla – Attachment 62992 Details for
Bug 12601
aqorders.budget_id should be a foreign key
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 12691: Use Koha.Preference in Self-Checkout
SIGNED-OFF-Bug-12691-Use-KohaPreference-in-Self-Ch.patch (text/plain), 9.75 KB, created by
Katrin Fischer
on 2017-05-02 21:22:32 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 12691: Use Koha.Preference in Self-Checkout
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-05-02 21:22:32 UTC
Size:
9.75 KB
patch
obsolete
>From 2ee4c296d72ceefbf10597c363978d0d02f2fd11 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 27 Jan 2017 03:37:31 +0000 >Subject: [PATCH] [SIGNED OFF] Bug 12691: Use Koha.Preference in Self-Checkout > >For calls to SCOUserJS, SCOUserCSS, OPACUserCSS, AllowSelfCheckReturns, >OpacFavicon, ShowPatronImageInWebBasedSelfCheck, SelfCheckoutByLogin > >Sponsored-by: Catalyst IT > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >https://bugs.koha-community.org/show_bug.cgi?id=12601 >--- > .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 24 +++++++++++----------- > opac/sco/sco-main.pl | 19 ++--------------- > 2 files changed, 14 insertions(+), 29 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index a2ed9c4..82b66eb 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -5,12 +5,12 @@ > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats --> >-<link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" /> >+<link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min.css" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui.css" /> > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco.css" /> >-[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %] >-[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %] >+[% IF ( Koha.Preference('OPACUserCSS') ) %]<style type="text/css">[% Koha.Preference('OPACUserCSS') %]</style>[% END %] >+[% IF ( Koha.Preference('SCOUserCSS') ) %]<style type="text/css">[% Koha.Preference('SCOUserCSS') %]</style>[% END %] > <!--[if lt IE 9]> > <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script> > <![endif]--> >@@ -25,7 +25,7 @@ > <div class="main"> > <div class="container-fluid"> > <div class="row-fluid"> >- [% IF ( display_patron_image ) %] >+ [% IF ( Koha.Preference('ShowPatronImageInWebBasedSelfCheck') ) %] > <div class="span10"> > [% ELSE %] > <div class="span12"> >@@ -76,7 +76,7 @@ > Please see a member of the library staff. > </p> > >- [% IF ( returnitem && AllowSelfCheckReturns ) %] >+ [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %] > <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post"> > <input type="hidden" name="op" value="returnbook" /> > <input type="hidden" name="patronid" value="[% patronid %]" /> >@@ -100,7 +100,7 @@ > <p>This item is already checked out to you.</p> > [% END %] > >- [% IF ( renew && AllowSelfCheckReturns ) %] >+ [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %] > <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post"> > <input type="hidden" name="op" value="returnbook" /> > <input type="hidden" name="patronid" value="[% patronid %]" /> >@@ -184,7 +184,7 @@ > <div id="newcheckout" class="sco_entry"> > <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');"> > <fieldset> >- <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend> >+ <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend> > <div class="input-append"> > <label for="barcode">Scan a new item or enter its barcode:</label> > <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" /> >@@ -202,7 +202,7 @@ > </div> > </div> <!-- / #newcheckout --> > </div> <!-- / .span12/12 --> >- [% IF ( display_patron_image ) %] >+ [% IF ( Koha.Preference('ShowPatronImageInWebBasedSelfCheck') && image_exists ) %] > <div class="span2"> > <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]" alt="" /> > </div> >@@ -269,7 +269,7 @@ > [% ELSE %] > <span>No renewals allowed</span> > [% END %] >- [% IF AllowSelfCheckReturns %] >+ [% IF Koha.Preference('AllowSelfCheckReturns') %] > <input type="submit" value="Check in item" name="confirm" class="btn return" /> > <input type="hidden" name="op" value="returnbook" /> > <input type="hidden" name="confirmed" value="" /> >@@ -294,7 +294,7 @@ > <div class="sco_entry" > > <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post"> > <fieldset class="checkout brief"> >- [% IF ( authbylogin ) %] >+ [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %] > <legend>Log in to your account</legend> > <label for="patronlogin">Login:</label> > <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" /> >@@ -309,7 +309,7 @@ > <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" /> > <button type="submit" class="btn">Submit</button> > </div> >- [% END # / IF authbylogin %] >+ [% END %] > > [% FOREACH INPUT IN INPUTS %] > <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]"> >@@ -418,5 +418,5 @@ > //]]> > </script> > >- [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %] >+ [% IF ( Koha.Preference('SCOUserJS') ) %]<script type="text/javascript">[% Koha.Preference('SCOUserJS') %]</script>[% END %] > [% END %] >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index 6518c31..e555d90 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -75,25 +75,18 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ > debug => 1, > }); > >-if (C4::Context->preference('SelfCheckoutByLogin')) >-{ >- $template->param(authbylogin => 1); >-} >- > # Get the self checkout timeout preference, or use 120 seconds as a default > my $selfchecktimeout = 120000; > if (C4::Context->preference('SelfCheckTimeout')) { > $selfchecktimeout = C4::Context->preference('SelfCheckTimeout') * 1000; > } >-$template->param(SelfCheckTimeout => $selfchecktimeout); >+$template->param( SelfCheckTimeout => $selfchecktimeout ); > > # Checks policy laid out by AllowSelfCheckReturns, defaults to 'on' if preference is undefined > my $allowselfcheckreturns = 1; > if (defined C4::Context->preference('AllowSelfCheckReturns')) { > $allowselfcheckreturns = C4::Context->preference('AllowSelfCheckReturns'); > } >-$template->param(AllowSelfCheckReturns => $allowselfcheckreturns); >- > > my $issuerid = $loggedinuser; > my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed) = ( >@@ -299,10 +292,7 @@ if ($borrower->{cardnumber}) { > ); > if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) { > my $patron_image = Koha::Patron::Images->find($borrower->{borrowernumber}); >- $template->param( >- display_patron_image => 1, >- cardnumber => $borrower->{cardnumber}, >- ) if $patron_image; >+ $template->param( image_exists => 1 ) if $patron_image; > } > } else { > $template->param( >@@ -311,9 +301,4 @@ if ($borrower->{cardnumber}) { > ); > } > >-$template->param( >- SCOUserJS => C4::Context->preference('SCOUserJS'), >- SCOUserCSS => C4::Context->preference('SCOUserCSS'), >-); >- > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12601
:
29820
|
30977
|
32543
|
32777
|
33067
|
33798
|
33799
|
62992