Bugzilla – Attachment 160377 Details for
Bug 35657
Add ability to assign tickets to librarians for catalog concerns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35657: Display assignee under updates
Bug-35657-Display-assignee-under-updates.patch (text/plain), 4.19 KB, created by
Martin Renvoize (ashimema)
on 2023-12-29 17:49:28 UTC
(
hide
)
Description:
Bug 35657: Display assignee under updates
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-12-29 17:49:28 UTC
Size:
4.19 KB
patch
obsolete
>From 1cf6ffcfbdb70eebe89a3859f5d145eeec833752 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 29 Dec 2023 17:48:35 +0000 >Subject: [PATCH] Bug 35657: Display assignee under updates > >--- > .../prog/en/modules/cataloguing/concerns.tt | 2 +- > .../prog/js/modals/display_ticket.js | 16 ++++++++++++++-- > 2 files changed, 15 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >index 5da6e2ae770..1294eb2f68b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >@@ -195,7 +195,7 @@ > { > "data": function(row, type, val, meta) { > let resolved = ( row.resolved_date ) ? true : false; >- let result = '<a class="btn btn-default btn-xs" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>'; >+ let result = '<a class="btn btn-default btn-xs" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'" data-assignee="'+$patron_to_html(row.assignee, { display_cardnumber: false, url: false })+'"><i class="fa-solid fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>'; > return result; > }, > "searchable": false, >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js b/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js >index 0eac1dc5f4e..08181b0bac5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js >@@ -4,6 +4,7 @@ $(document).ready(function() { > let button = $(event.relatedTarget); > let ticket_id = button.data('concern'); > let resolved = button.data('resolved'); >+ let assignee = button.data('assignee'); > modal.find('.modal-footer input').val(ticket_id); > > if ( resolved ) { >@@ -17,6 +18,9 @@ $(document).ready(function() { > // Display ticket details > let display = '<div class="list-group">'; > display += '<div class="list-group-item">'; >+ if (assignee) { >+ display += '<span class="pull-right"><span class="label">' + __("Assignee") + '</span>: ' + assignee + '</span>'; >+ } > display += '<span class="wrapfix">' + detail + '</span>'; > display += '</div>'; > display += '<div id="concern-updates" class="list-group-item">'; >@@ -32,7 +36,7 @@ $(document).ready(function() { > url: "/api/v1/tickets/" + ticket_id + "/updates", > method: "GET", > headers: { >- "x-koha-embed": [ "user", "+strings" ] >+ "x-koha-embed": [ "user", "assignee", "+strings" ] > }, > }).success(function(data) { > let updates_display = $('#concern-updates'); >@@ -52,10 +56,18 @@ $(document).ready(function() { > url: true > }) + ' (' + $datetime(item.date) + ')'; > if ( item.status ) { >- updates += '<span class="wrapfix pull-right">'; >+ updates += '<span class="clearfix pull-right">'; > updates += item._strings.status ? escape_str(item._strings.status.str) : ""; > updates += '</span>' > } >+ if ( item.assignee ) { >+ updates += '<span class="clearfix pull-right">'; >+ updates += $patron_to_html(item.assignee, { >+ display_cardnumber: false, >+ url: true >+ }); >+ updates += '</span>' >+ } > updates += '</span>'; > updates += '</div>'; > }); >-- >2.43.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 35657
:
160365
|
160366
|
160367
|
160368
|
160369
|
160372
|
160373
|
160374
|
160375
|
160376
|
160377
|
164923
|
164924
|
164925
|
164926
|
164927
|
164928
|
164932
|
164933
|
164934
|
164935
|
164974
|
164975
|
164976
|
164977
|
165666
|
165667
|
165668
|
165669
|
165670
|
165671
|
165672
|
165673
|
165674
|
165675
|
165676
|
165677
|
165678
|
165679
|
165786
|
165787
|
165788
|
165789
|
165790
|
165791
|
165792
|
165878
|
165879
|
165880
|
165881
|
165882
|
165883
|
165884
|
165885
|
165886
|
166067