Bugzilla – Attachment 73204 Details for
Bug 17981
Add the ability to preview generated notice templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17981: Better error handling
Bug-17981-Better-error-handling.patch (text/plain), 3.29 KB, created by
Jonathan Druart
on 2018-03-23 16:33:11 UTC
(
hide
)
Description:
Bug 17981: Better error handling
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-03-23 16:33:11 UTC
Size:
3.29 KB
patch
obsolete
>From 1af482441f7739ad58c410e9f39f0ebcaec200de Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 24 Jan 2017 17:13:07 +0100 >Subject: [PATCH] Bug 17981: Better error handling > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/tools/preview_letter.tt | 7 +++++-- > svc/letters/preview | 10 ++++++---- > 2 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt >index f7aea70676..4bde77d68d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt >@@ -12,6 +12,9 @@ > [% CASE 'preview_not_available' %]Preview is not available for letters '[% m.letter_code %]'. > [% CASE 'not_checked_in_yet' %]Do not forget that the issue has not been checked in yet. > [% CASE 'not_checked_out_yet' %]Do not forget that the issue has not been checked out yet. >+ [% CASE 'no_checkout' %]This item is not checked out. >+ [% CASE 'no_item_or_no_patron' %]The item or the patron does not exist. >+ [% CASE 'no_hold' %]No hold is placed by this patron on this bibliographic record. > [% CASE %][% m.code %] > [% END %] > </div> >@@ -28,7 +31,7 @@ > </fieldset> > [% END %] > >- [% IF tt_content %] >+ [% IF rendered_tt_message %] > <fieldset class="brief"> > <legend>Converted version</legend> > <pre>[% tt_content | html %]</pre> >@@ -41,7 +44,7 @@ > [% END %] > </div> > >- [% IF tt_content %] >+ [% IF rendered_tt_message %] > [% IF messages_are_similar %] > <div class="dialog message">The generated notices are exactly the same!</div> > [% ELSE %] >diff --git a/svc/letters/preview b/svc/letters/preview >index d517398bfb..809ee7269c 100644 >--- a/svc/letters/preview >+++ b/svc/letters/preview >@@ -169,7 +169,8 @@ if ( $code eq 'CHECKIN' ) { > push @messages, { code => 'not_checked_in_yet', type => 'message' }; > } > else { >- warn "No checkout"; >+ push @messages, { code => 'no_checkout', type => 'alert' }; >+ $letter_params = {}; > } > } > elsif ( $code eq 'CHECKOUT' ) { >@@ -193,7 +194,8 @@ elsif ( $code eq 'CHECKOUT' ) { > push @messages, { code => 'not_checked_out_yet', type => 'message' }; > } > else { >- warn "No item or no patron"; >+ push @messages, { code => 'no_item_or_no_patron', type => 'alert' }; >+ $letter_params = {}; > } > } > elsif ( $code eq 'HOLD_SLIP' ) { >@@ -212,11 +214,11 @@ elsif ( $code eq 'HOLD_SLIP' ) { > }; > } > else { >- warn "No hold placed by this patron on this bibliographic record."; >+ push @messages, { code => 'no_hold', type => 'alert' }; >+ $letter_params = {}; > } > } > else { >- warn "Preview for letter code $code is not available"; > push @messages, { type => 'alert', code => 'preview_not_available', letter_code => $code, }; > } > >-- >2.11.0
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 17981
:
59508
|
59509
|
59510
|
59514
|
59524
|
63978
|
63979
|
63980
|
63981
|
63982
|
65688
|
65689
|
65690
|
65701
|
65702
|
65703
|
65704
|
65705
|
67144
|
67145
|
67146
|
67147
|
67148
|
67152
|
70300
|
70301
|
70302
|
70303
|
70304
|
70305
|
73201
|
73202
|
73203
|
73204
|
73205
|
73206
|
73949
|
73950
|
73951
|
73952
|
74025
|
74027
|
74028
|
74029
|
74030
|
74031
|
74032
|
74033
|
74034