Bugzilla – Attachment 134175 Details for
Bug 29129
The clear screen and print icons in circulation should be configurable to print either ISSUESLIP or ISSUEQSLIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29129: Update DisplayClearScreenButton to allow for a choice between issueslip and issueqslip
Bug-29129-Update-DisplayClearScreenButton-to-allow.patch (text/plain), 7.63 KB, created by
Lucas Gass (lukeg)
on 2022-04-27 18:01:24 UTC
(
hide
)
Description:
Bug 29129: Update DisplayClearScreenButton to allow for a choice between issueslip and issueqslip
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-04-27 18:01:24 UTC
Size:
7.63 KB
patch
obsolete
>From 5a08e0274aed3292026b7e45a28252b23493d804 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 27 Apr 2022 17:55:26 +0000 >Subject: [PATCH] Bug 29129: Update DisplayClearScreenButton to allow for a > choice between issueslip and issueqslip > >To Test: >1. Apply patch, updatedatabase, and restart_all >2. A small change the global scss file means you should regenerate the CSS as well. ( https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface ) >3. Set DisplayClearScreenButton to "don't show" >4. Go to the patron checkout screen and see that no button should show to clear the screen and print >5. Set DisplayClearScreenButton to 'ISSUESLIP' and make sure the button now appears and the ISSUESLIP prints >6. Set DisplayClearScreenButton to 'ISSUEQSLIP' and make sure the button now appears and the ISSUEQSLIP prints >--- > circ/circulation.pl | 4 ---- > installer/data/mysql/atomicupdate/bug29129.pl | 16 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../intranet-tmpl/prog/css/src/staff-global.scss | 3 ++- > .../modules/admin/preferences/circulation.pref | 5 +++-- > .../prog/en/modules/circ/circulation.tt | 5 ++++- > koha-tmpl/intranet-tmpl/prog/js/members-menu.js | 4 ++++ > 7 files changed, 30 insertions(+), 9 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug29129.pl > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index dfa5cb1fd7..b3cba3bf14 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -153,10 +153,6 @@ my $searchtype = $query->param('searchtype') || q{contain}; > > my $branch = C4::Context->userenv->{'branch'}; > >-if (C4::Context->preference("DisplayClearScreenButton")) { >- $template->param(DisplayClearScreenButton => 1); >-} >- > for my $barcode ( @$barcodes ) { > $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace > $barcode = barcodedecode( $barcode ) if $barcode; >diff --git a/installer/data/mysql/atomicupdate/bug29129.pl b/installer/data/mysql/atomicupdate/bug29129.pl >new file mode 100644 >index 0000000000..f5d5c3ea94 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug29129.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "29129", >+ description => "Update the DisplayClearnScreenButton system pref to allow for a choice between ISSUESLIP and ISSUEQSLIP", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ # Do you stuffs here >+ $dbh->do(q{ >+ UPDATE systempreferences SET options = 'no|issueslip|issueqslip', type = 'Choice', value = REPLACE( value, 0, 'no'), value = REPLACE( value, 1, 'issueslip') WHERE variable = 'DisplayClearScreenButton'; >+ }); >+ # Print useful stuff here >+ say $out "Database updated for Bug 29129"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 1b029aa5ee..a7a66739ec 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -178,7 +178,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('DefaultToLoggedInLibraryOverdueTriggers', '0', NULL , 'If enabled, overdue status triggers editor will default to the logged in library''s rules, rather than the ''default'' rules.', 'YesNo'), > ('CSVDelimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'), > ('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding staff interface XSLT option must be on','Choice'), >-('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'), >+('DisplayClearScreenButton','no','no|issueslip|issueqslip','If set to ON, a clear screen button will appear on the circulation page.','Choice'), > ('displayFacetCount','0',NULL,NULL,'YesNo'), > ('DisplayIconsXSLT','1','','If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.','YesNo'), > ('DisplayLibraryFacets', 'holding', 'home|holding|both', 'Defines which library facets to display.', 'Choice'), >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 2f84696730..30ccf7b767 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -2677,7 +2677,8 @@ td { > } > } > >-#printclearscreen { >+#printclearscreen, >+#printclearscreenq { > position: absolute; > right: 43px; > top: 0; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 8f77412eb4..ace8d1bb8d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -106,8 +106,9 @@ Circulation: > - > - pref: DisplayClearScreenButton > choices: >- 1: Show >- 0: "Don't show" >+ no: "Don't show" >+ issueslip: "Show and print ISSUESLIP" >+ issueqslip: "Show and print ISSUEQSLIP" > - a button to clear the current patron from the screen on the circulation screen. > - > - pref: RecordLocalUseOnReturn >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 755fbca2ce..92ca2b2e6e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -619,9 +619,12 @@ > <fieldset id="circ_circulation_issue"> > [% END %] > >- [% IF ( DisplayClearScreenButton ) %] >+ [% IF Koha.Preference('DisplayClearScreenButton') == 'issueslip' %] > <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span> > <span id="printclearscreen"><a href="#" title="Print slip and clear screen"><i class="fa fa-print"></i></a></span> >+ [% ELSIF Koha.Preference('DisplayClearScreenButton') == 'issueqslip' %] >+ <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span> >+ <span id="printclearscreenq"><a href="#" title="Print quick slip and clear screen"><i class="fa fa-print"></i></a></span> > [% END %] > > [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >index 7b7e6ff1c1..0d70178bfe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -82,6 +82,10 @@ $(document).ready(function(){ > printx_window("slip"); > window.location.replace("/cgi-bin/koha/circ/circulation.pl"); > }); >+ $("#printclearscreenq").click(function(){ >+ printx_window("qslip"); >+ window.location.replace("/cgi-bin/koha/circ/circulation.pl"); >+ }); > $("#searchtohold").click(function(){ > searchToHold(); > return false; >-- >2.30.2
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 29129
:
134175
|
134176
|
134282
|
134283
|
134284
|
134285
|
136551