Bugzilla – Attachment 182578 Details for
Bug 33430
Use REST API for suggestions tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33430: (follow-up) Prevent anonymous suggestions from breaking the table
Bug-33430-follow-up-Prevent-anonymous-suggestions-.patch (text/plain), 3.50 KB, created by
Matt Blenkinsop
on 2025-05-19 08:43:07 UTC
(
hide
)
Description:
Bug 33430: (follow-up) Prevent anonymous suggestions from breaking the table
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-05-19 08:43:07 UTC
Size:
3.50 KB
patch
obsolete
>From dcf30f160172d3923ea03a4c91d84fc56de56245 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Mon, 19 May 2025 08:39:59 +0000 >Subject: [PATCH] Bug 33430: (follow-up) Prevent anonymous suggestions from > breaking the table > >--- > .../prog/en/modules/suggestion/suggestion.tt | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 3637c8dee96..00e7c6ea0d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1375,11 +1375,14 @@ > orderable: true, > render: function (data, type, row, meta) { > let suggester = row.suggester; >- let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(suggester.patron_id, suggester.surname); >- if(suggester.firstname) node += ', %s'.format(suggester.firstname); >- if(suggester.cardnumber) node += ' (%s)'.format(suggester.cardnumber); >- node += '</a>'; >- return node; >+ if(suggester) { >+ let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(suggester.patron_id, suggester.surname); >+ if(suggester.firstname) node += ', %s'.format(suggester.firstname); >+ if(suggester.cardnumber) node += ' (%s)'.format(suggester.cardnumber); >+ node += '</a>'; >+ return node; >+ } >+ return '' > } > }, > { >@@ -1387,7 +1390,7 @@ > searchable: false, > orderable: true, > render: function (data, type, row, meta) { >- return escape_str(row.suggester.category.name); >+ return escape_str(row.suggester ? row.suggester.category.name : ''); > }, > }, > { >@@ -1411,7 +1414,7 @@ > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >- if(row?.manager) { >+ if(row.manager) { > let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(row.manager?.patron_id, row.manager?.surname); > if(row.manager?.firstname) node += ', %s'.format(row.manager?.firstname); > node += '</a>'; >-- >2.48.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 33430
:
182146
|
182147
|
182148
|
182149
|
182150
|
182161
|
182196
|
182197
|
182198
|
182199
|
182200
|
182202
|
182203
|
182204
|
182205
|
182206
|
182207
|
182208
|
182209
|
182210
|
182211
|
182339
|
182340
|
182341
|
182342
|
182343
|
182428
|
182429
|
182430
|
182431
|
182432
|
182433
|
182434
|
182478
|
182480
|
182481
|
182482
|
182483
|
182484
|
182485
|
182486
|
182487
|
182493
|
182494
|
182495
|
182496
|
182497
|
182498
|
182499
|
182500
|
182577
| 182578