Bugzilla – Attachment 166241 Details for
Bug 36757
Add assignee to catalog concern/ticket detail view when opened from catalog detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36757: Sync concerns tables
Bug-36757-Sync-concerns-tables.patch (text/plain), 5.94 KB, created by
Martin Renvoize (ashimema)
on 2024-05-07 09:15:50 UTC
(
hide
)
Description:
Bug 36757: Sync concerns tables
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-07 09:15:50 UTC
Size:
5.94 KB
patch
obsolete
>From b27fc54c5f83a11df451d2b6e73f9b3b4e1a46a3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 7 May 2024 09:45:56 +0100 >Subject: [PATCH] Bug 36757: Sync concerns tables > >This patch re-syncs the two catalog concerns display tables markup. We >add the 'Title' field into the catalog/detail version of the table and >split the columns settings so you can control the table distinctly from >the cataloguing module version so we can hide 'title' by default in the >details display tab. > >This results in the table matching the display from the cataloguing >module page, i.e. the assignee and status detail displays. >--- > admin/columns_settings.yml | 18 ++++++++++ > .../prog/en/modules/catalogue/detail.tt | 36 ++++++++++++++++--- > 2 files changed, 50 insertions(+), 4 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index b7e0bf441ff..a745675e465 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -573,6 +573,24 @@ modules: > cannot_be_toggled: 1 > cannot_be_modified: 1 > >+ concerns: >+ table_concerns: >+ default_sort_order: 0 >+ columns: >+ - >+ columnname: reported >+ - >+ columnname: details >+ - >+ columnname: title >+ is_hidden: 1 >+ - >+ columnname: status >+ - >+ columnname: actions >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ > cataloguing: > addbooks: > reservoir-table: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 8787cfc3055..21ae423a3f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -673,6 +673,7 @@ > <tr> > <th>Reported</th> > <th>Details</th> >+ <th>Title</th> > <th>Status</th> > <th data-class-name="actions noExport">Actions</th> > </tr> >@@ -1024,7 +1025,7 @@ > [% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %] > <script> > $(document).ready(function() { >- var table_settings = [% TablesSettings.GetTableSettings( 'cataloguing', 'concerns', 'table_concerns', 'json' ) | $raw %]; >+ var table_settings = [% TablesSettings.GetTableSettings( 'catalogue', 'concerns', 'table_concerns', 'json' ) | $raw %]; > > var filtered = false; > let additional_filters = { >@@ -1045,13 +1046,16 @@ > "url": tickets_url > }, > "embed": [ >+ "assignee", > "reporter", > "resolver", >+ "biblio", > "updates+count", >+ "+strings" > ], > 'emptyTable': '<div class="dialog message">' + _("Congratulations, there are no catalog concerns.") + '</div>', > "columnDefs": [ { >- "targets": [0,1,2], >+ "targets": [0,1,2,3], > "render": function (data, type, row, meta) { > if ( type == 'display' ) { > if ( data != null ) { >@@ -1093,7 +1097,17 @@ > "orderable": true > }, > { >- "data": "resolved_date", >+ "data": "biblio.title", >+ "render": function(data, type, row, meta) { >+ return $biblio_to_html(row.biblio, { >+ link: 1 >+ }); >+ }, >+ "searchable": true, >+ "orderable": true >+ }, >+ { >+ "data": "assignee.firstname:assignee.surname:resolver.firstname:resolver.surname:resolved_date:status", > "render": function(data, type, row, meta) { > let result = ''; > if (row.resolved_date) { >@@ -1101,9 +1115,23 @@ > display_cardnumber: false, > url: true > }) + '</span>'; >+ if (row.status) { >+ result += ' ' + _("as") + ' '; >+ result += row._strings.status ? escape_str(row._strings.status.str) : ""; >+ } > result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>'; > } else { >- result += _("Open"); >+ if (row.status) { >+ result += row._strings.status ? escape_str(row._strings.status.str) : ""; >+ } else { >+ result += _("Open"); >+ } >+ if (row.assignee) { >+ result += '<span class="clearfix">' + _("Assigned to: ") + $patron_to_html(row.assignee, { >+ display_cardnumber: false, >+ url: true >+ }) + '</span>'; >+ } > } > return result; > }, >-- >2.45.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 36757
:
166241
|
166259
|
166295
|
166361
|
166453
|
166455
|
166548