Bugzilla – Attachment 117609 Details for
Bug 26618
C4/RotatingCollections.pm should not use C4::Circulation::transferbook
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26618: (QA follow-up) Update messages syntax
Bug-26618-QA-follow-up-Update-messages-syntax.patch (text/plain), 3.52 KB, created by
Jonathan Druart
on 2021-03-03 14:33:23 UTC
(
hide
)
Description:
Bug 26618: (QA follow-up) Update messages syntax
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 14:33:23 UTC
Size:
3.52 KB
patch
obsolete
>From bb3b21c78c420fb36a27626b80578397c3ac5aff Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 18 Feb 2021 15:25:42 +0000 >Subject: [PATCH] Bug 26618: (QA follow-up) Update messages syntax > >As highlighted, we were not using the standard form of message passing >here. This patch updates the template and controller to adopt the more >usual syntax. >--- > C4/RotatingCollections.pm | 10 ++++++++-- > .../rotating_collections/transferCollection.tt | 18 ++++++++---------- > 2 files changed, 16 insertions(+), 12 deletions(-) > >diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm >index 6613602ab0..e8e814f455 100644 >--- a/C4/RotatingCollections.pm >+++ b/C4/RotatingCollections.pm >@@ -473,7 +473,8 @@ sub TransferCollection { > ); # Queue transfer > push @{$messages}, > { >- type => 'enqueu', >+ type => 'alert', >+ code => 'enqueued', > item => $item_object, > found_transfer => $found_transfer > }; >@@ -492,7 +493,12 @@ sub TransferCollection { > } > } > elsif ( $_->isa('Koha::Exceptions::Item::Transfer::Limit') ) { >- push @{$messages}, { type => 'failure', item => $item_object }; >+ push @{$messages}, >+ { >+ type => 'error', >+ code => 'limits', >+ item => $item_object >+ }; > } > else { > $_->rethrow(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt >index 66a5817aec..ba09a34ba0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt >@@ -21,16 +21,14 @@ > > [% IF ( messages ) %] > [% FOREACH message IN messages %] >- [%- SWITCH message.type -%] >- [%- CASE 'failure' %] >- <div class="dialog error"> >- <p>Cannot transfer item [% message.item.itemnumber | html %] due to transfer limits</p> >- </div> >- [%- CASE 'enqueu' -%] >- <div class="dialog message"> >- <p>Item [% message.item.itemnumber | html %] queued behind [% message.found_transfer.reason | html %] transfer to [% Branches.GetName(message.found_transfer.tobranch) | html %]</p> >- </div> >- [% END %] >+ <div class="dialog [% m.type | html %]"> >+ [%- SWITCH message.code -%] >+ [%- CASE 'limits' %] >+ <p>Cannot transfer item [% message.item.itemnumber | html %] due to transfer limits</p> >+ [%- CASE 'enqueued' -%] >+ <p>Item [% message.item.itemnumber | html %] queued behind [% message.found_transfer.reason | html %] transfer to [% Branches.GetName(message.found_transfer.tobranch) | html %]</p> >+ [% END %] >+ </div> > [% END %] > [% END %] > >-- >2.20.1
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 26618
:
111305
|
111313
|
116571
|
117608
| 117609 |
117610
|
117611