Bugzilla – Attachment 183046 Details for
Bug 40036
Purchase suggestion status column no longer displays reason
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40036: Add reason back to status column and add classes/data attributes
Bug-40036-Add-reason-back-to-status-column-and-add.patch (text/plain), 3.93 KB, created by
Marcel de Rooy
on 2025-06-06 07:11:27 UTC
(
hide
)
Description:
Bug 40036: Add reason back to status column and add classes/data attributes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-06-06 07:11:27 UTC
Size:
3.93 KB
patch
obsolete
>From 912935b72fd55ebfdc16547d1d8624c8f79f3250 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 30 May 2025 14:28:23 +0000 >Subject: [PATCH] Bug 40036: Add reason back to status column and add > classes/data attributes >Content-Type: text/plain; charset=utf-8 > >To test: >0. APPLY PATCH >1. Make a few AVs for SUGGEST ( reason ) and SUGGEST_STATUS ( status ). >2. Make some new suggestions and give them new statues w/ a reason. >3. The reason should display, in parentheses, in the status column. >4. There should be a status class and a reason class for each. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/suggestion/suggestion.tt | 21 ++++++++++++------- > 1 file changed, 13 insertions(+), 8 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 00e7c6ea0d..c6b25551d2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1490,14 +1490,19 @@ > searchable: false, > orderable: true, > render: function (data, type, row, meta) { >- if(row.status === 'ASKED') return '<span>%s</span>'.format(_("Pending")); >- if(row.status === 'ACCEPTED') return '<span>%s</span>'.format(_("Accepted")); >- if(row.status === 'ORDERED') return '<span>%s</span>'.format(_("Ordered")); >- if(row.status === 'REJECTED') return '<span>%s</span>'.format(_("Rejected")); >- if(row.status === 'CHECKED') return '<span>%s</span>'.format(_("Checked")); >- if(row.status === 'AVAILABLE') return '<span>%s</span>'.format(_("Available")); >- if(row._strings.status.str) return '<span>%s</span>'.format(row._strings.status.str); >- return '<span>%s</span>'.format(_("Status unknown")); >+ let node = ''; >+ if(row.status === 'ASKED') node += '<span class="status asked">%s</span>'.format(_("Pending")); >+ else if(row.status === 'ACCEPTED') node += '<span class="status accepted">%s</span>'.format(_("Accepted")); >+ else if(row.status === 'ORDERED') node += '<span class="status ordered">%s</span>'.format(_("Ordered")); >+ else if(row.status === 'REJECTED') node += '<span class="status rejected">%s</span>'.format(_("Rejected")); >+ else if(row.status === 'CHECKED') node += '<span class="status checked">%s</span>'.format(_("Checked")); >+ else if(row.status === 'AVAILABLE') node += '<span class="status available">%s</span>'.format(_("Available")); >+ else if(row._strings.status.str) node += '<span class="status '+ row.status +'">%s</span>'.format(row._strings.status.str); >+ else node += '<span class="status unknown">%s</span>'.format(_("Status unknown")); >+ if ( row.reason ) { >+ node += '<div class="reason" data-reason="'+row.reason+'">('+ row.reason +')</div>'; >+ } >+ return node; > }, > }, > { >-- >2.39.5
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 40036
:
182860
|
182861
|
182879
| 183046