Bugzilla – Attachment 149507 Details for
Bug 32986
Add ability to generate custom slips for patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32986: (QA follow-up) Fix QA script complaints: tabs and TT filters
Bug-32986-QA-follow-up-Fix-QA-script-complaints-ta.patch (text/plain), 4.92 KB, created by
Katrin Fischer
on 2023-04-11 21:38:59 UTC
(
hide
)
Description:
Bug 32986: (QA follow-up) Fix QA script complaints: tabs and TT filters
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-04-11 21:38:59 UTC
Size:
4.92 KB
patch
obsolete
>From 7b0dfe892915f433d4cab9da3974d1e613c461ce Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 11 Apr 2023 21:35:56 +0000 >Subject: [PATCH] Bug 32986: (QA follow-up) Fix QA script complaints: tabs and > TT filters > >* Perltidied the section with tabs in printslip.pl >* Fixed indentation and tabs in letter.tt >* Added missing TT filters to members-toolbar.inc >--- > .../prog/en/includes/members-toolbar.inc | 7 ++-- > .../prog/en/modules/tools/letter.tt | 2 +- > members/printslip.pl | 40 +++++++++++-------- > 3 files changed, 27 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index df26293f09..4be070bbd3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -32,10 +32,9 @@ > <li><a id="print_overdues" href="#">Print overdues</a></li> > [% END %] > <li><a class="printslip" data-code="checkinslip" href="#">Print checkin slip</a></li> >- [% FOREACH notice IN Notices.GetTemplates( 'patron_slip' ) %] >- <li><a class="printslip" data-code="[% notice.code %]" href="#">Print [% notice.name %] slip</a></li> >- [% END %] >- >+ [% FOREACH notice IN Notices.GetTemplates( 'patron_slip' ) %] >+ <li><a class="printslip" data-code="[% notice.code | html %]" href="#">Print [% notice.name | html %] slip</a></li> >+ [% END %] > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 2a11246d32..38d11b850c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -233,7 +233,7 @@ > [% CASE 'claimissues' %]<span>Claim serial issue</span> > [% CASE 'reserves' %]<span>Holds</span> > [% CASE 'ill' %]<span>Interlibrary loans</span> >- [% CASE 'members' %]<span>Patrons</span> >+ [% CASE 'members' %]<span>Patrons</span> > [% CASE 'patron_slip' %]<span>Patrons toolbar (slip)</span> > [% CASE 'serial' %]<span>Serials (new issue)</span> > [% CASE 'suggestions' %]<span>Suggestions</span> >diff --git a/members/printslip.pl b/members/printslip.pl >index c609efda71..f11f178c99 100755 >--- a/members/printslip.pl >+++ b/members/printslip.pl >@@ -68,15 +68,15 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log > my $branch=C4::Context->userenv->{'branch'}; > my ($letter, $slip, $is_html); > if ( $print eq 'checkinslip' ) { >- my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch; >+ my $checkinslip_branch = >+ $session->param('branch') ? $session->param('branch') : $branch; > > # get today's checkins >- my @issue_ids = $patron->old_checkouts->search( { branchcode => $checkinslip_branch } ) >+ my @issue_ids = >+ $patron->old_checkouts->search( { branchcode => $checkinslip_branch } ) > ->filter_by_todays_checkins->get_column('issue_id'); > >- my %loops = ( >- old_issues => \@issue_ids, >- ); >+ my %loops = ( old_issues => \@issue_ids, ); > > $letter = C4::Letters::GetPreparedLetter( > module => 'circulation', >@@ -91,24 +91,30 @@ if ( $print eq 'checkinslip' ) { > message_transport_type => 'print' > ); > >-} elsif ( $print eq 'issueslip' ){ >- $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 0); >-} elsif ( $print eq 'issueqslip' ){ >- $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, 1); >-} else { >+} >+elsif ( $print eq 'issueslip' ) { >+ $letter = >+ IssueSlip( $session->param('branch') || $branch, $borrowernumber, 0 ); >+} >+elsif ( $print eq 'issueqslip' ) { >+ $letter = >+ IssueSlip( $session->param('branch') || $branch, $borrowernumber, 1 ); >+} >+else { > $letter = C4::Letters::GetPreparedLetter( >- module => 'patron_slip', >- letter_code => $print, >- branchcode => $branch, >- lang => $patron->lang, >- tables => { >- branches => $branch, >- borrowers => $borrowernumber >+ module => 'patron_slip', >+ letter_code => $print, >+ branchcode => $branch, >+ lang => $patron->lang, >+ tables => { >+ branches => $branch, >+ borrowers => $borrowernumber > }, > message_transport_type => 'print' > ); > } > >+ > $slip = $letter->{content}; > $is_html = $letter->{is_html}; > >-- >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 32986
:
146750
|
148267
|
148361
|
148374
|
148376
|
149506
|
149507
|
153479
|
153480
|
153481
|
153482
|
156800
|
158399
|
158400
|
158401
|
158402
|
158403
|
158404
|
158405
|
158523