Bugzilla – Attachment 20174 Details for
Bug 9811
Patrons search improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9811 - multilines notes breaks JSON
0001-Bug-9811-multilines-notes-brakes-JSON.patch (text/plain), 2.52 KB, created by
Fridolin Somers
on 2013-08-08 13:34:08 UTC
(
hide
)
Description:
Bug 9811 - multilines notes breaks JSON
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2013-08-08 13:34:08 UTC
Size:
2.52 KB
patch
obsolete
>From 6afef4ff19d89072129ef04fd5e66aaf77b026ed Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 8 Aug 2013 13:51:53 +0200 >Subject: [PATCH] Bug 9811 - multilines notes brakes JSON > >In new patron search feature, the search results are fetched using Ajax and returned in JSON format. >The JSON is created by TT using koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt. >One of the fields is the borrower notes. When this notes contains several lines, the JSON is broken. > >This patch uses TT fileters to consert in notes linefeeds into HTML line break (html_line_break) and then remove linefeeds (collapse). > >Test plan : >- perform a member search that does not return a borrower with a circ note >- edit one of the borrowers returned by this search >- enter serveral lines of text in "Circulation note" and save >- reperform the member search >=> circ note is well displayed on several lines >--- > .../intranet-tmpl/prog/en/modules/members/tables/members_results.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >index debf16b..0d29aa7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >@@ -20,7 +20,7 @@ > "dt_fines": > "[% IF data.fines < 0 %]<span class='credit'>[% data.fines |html %]</span> [% ELSIF data.fines > 0 %] <span class='debit'><strong>[% data.fines |html %]</strong></span> [% ELSE %] [% data.fines |html%] [% END %]</td>", > "dt_borrowernotes": >- "[% data.borrowernotes |html %]", >+ "[% data.borrowernotes |html |html_line_break |collapse %]", > "dt_action": > "[% IF data.category_type %]<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% data.borrowernumber %]&category_type=[% data.category_type %]'>Edit</a>[% ELSE %][% IF data.categorycode %]<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% data.borrowernumber %]&categorycode=[% data.categorycode %]'>Edit</a>[% ELSE %]<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% data.borrowernumber %]&category_type=A'>Edit</a>[% END %][% END %]", > "borrowernumber": >-- >1.7.10.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 9811
:
16096
|
16111
|
16112
|
16320
|
16362
|
16403
|
16957
|
19056
|
19057
|
19307
|
19633
|
19642
|
20094
|
20095
|
20096
|
20174
|
20266
|
20290
|
20291
|
21169
|
21170
|
21171
|
21172
|
21173
|
21174
|
21175
|
22265
|
23261
|
24095
|
24111
|
26067
|
26068
|
26261
|
26336
|
26337
|
26342
|
26347
|
27642
|
27643
|
27644
|
27645
|
27646
|
27711
|
28738
|
28739
|
28740
|
28741
|
28742
|
28743
|
28744
|
28745
|
28746
|
28747
|
28781
|
28782
|
29019
|
29020
|
29021
|
29022
|
29023
|
29024
|
29025
|
29026
|
29027
|
29028
|
29029
|
29442