Bugzilla – Attachment 178000 Details for
Bug 16721
Add table configuration to serial claims table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16721: Add table configuration to serial claims table
Bug-16721-Add-table-configuration-to-serial-claims.patch (text/plain), 9.66 KB, created by
Owen Leonard
on 2025-02-13 13:02:08 UTC
(
hide
)
Description:
Bug 16721: Add table configuration to serial claims table
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-02-13 13:02:08 UTC
Size:
9.66 KB
patch
obsolete
>From feb660efc7424a4c00f27182f5bb7a72fc28078d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 24 Jun 2024 17:37:43 +0000 >Subject: [PATCH] Bug 16721: Add table configuration to serial claims table > >This patch adds table configuration options to the serial claims table, >including the option to set a default sort column. > >The patch also moves the table column filter row to the top, which I >think is more standard in the staff interface. > >To test, apply the patch and restart services. > >- You'll need to have subscription issues which are missing, claimed, or > late. >- Go to Serials -> Claims, and select a vendor. >- In the table of missing issues, confirm that all DataTable controls > work correctly: Column visibility, export, and configuration options. >- Confirm that you can use Administration -> Table settings -> Serials > -> Claims to hide columns by default or set the default order. >- Confirm that the column header filter forms work correctly. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > admin/columns_settings.yml | 28 +++++++++ > .../prog/en/modules/serials/claims.tt | 57 ++++++++++--------- > 2 files changed, 58 insertions(+), 27 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 2a632acc25b..fd4ed5dc188 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -2310,6 +2310,34 @@ modules: > columnname: link > > serials: >+ claims: >+ claimst: >+ default_sort_order: 7 >+ columns: >+ - >+ columnname: selection >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: vendor >+ - >+ columnname: library >+ - >+ columnname: title >+ - >+ columnname: issn >+ - >+ columnname: issue_number >+ - >+ columnname: status >+ - >+ columnname: since >+ - >+ columnname: publication_date >+ - >+ columnname: claims_count >+ - >+ columnname: claim_date > subscription-detail: > orders: > columns: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index e03e6272ec7..8488f79f198 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -5,6 +5,7 @@ > [% USE Branches %] > [% USE KohaDates %] > [% PROCESS 'i18n.inc' %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% FILTER collapse %] >@@ -104,7 +105,23 @@ > <th>Claims count</th> > <th>Claim date</th> > [% FOR field IN additional_fields_for_subscription %] >- <th>[% field.name | html %]</th> >+ <th>[% field.name | html %]</th> >+ [% END %] >+ </tr> >+ <tr> >+ <td></td> >+ <td><input type="text" class="filter" data-column_num="1" placeholder="Search vendor" /></td> >+ <td><input type="text" class="filter" data-column_num="2" placeholder="Search library" /></td> >+ <td><input type="text" class="filter" data-column_num="3" placeholder="Search title" /></td> >+ <td><input type="text" class="filter" data-column_num="4" placeholder="Search ISSN" /></td> >+ <td><input type="text" class="filter" data-column_num="5" placeholder="Search issue number" /></td> >+ <td><input type="text" class="filter" data-column_num="6" placeholder="Search status" /></td> >+ <td><input type="text" class="filter" data-column_num="7" placeholder="Search since" /></td> >+ <td><input type="text" class="filter" data-column_num="8" placeholder="Search publication date" /></td> >+ <td><input type="text" class="filter" data-column_num="9" placeholder="Search claim count" /></td> >+ <td><input type="text" class="filter" data-column_num="10" placeholder="Search claim date" /></td> >+ [% FOR field IN additional_fields_for_subscription %] >+ <td><input type="text" class="filter" data-column_num="[% loop.count + 10 | html %]" placeholder="Search [% field.name | html %]" /></td> > [% END %] > </tr> > </thead> >@@ -112,9 +129,9 @@ > [% FOREACH missingissue IN missingissues %] > <tr> > <td> >- [% UNLESS missingissue.cannot_claim %] >- <input type="checkbox" class="select_serial" name="serialid" value="[% missingissue.serialid | html %]" /> >- [% END %] >+ [% UNLESS missingissue.cannot_claim %] >+ <input type="checkbox" class="select_serial" name="serialid" value="[% missingissue.serialid | html %]" /> >+ [% END %] > </td> > <td>[% missingissue.name | html %]</td> > <td> >@@ -142,24 +159,6 @@ > </tr> > [% END # /FOREACH missingissue %] > </tbody> >- <tfoot> >- <tr> >- <td></td> >- <td><input type="text" class="filter" data-column_num="1" placeholder="Search vendor" /></td> >- <td><input type="text" class="filter" data-column_num="2" placeholder="Search library" /></td> >- <td><input type="text" class="filter" data-column_num="3" placeholder="Search title" /></td> >- <td><input type="text" class="filter" data-column_num="4" placeholder="Search ISSN" /></td> >- <td><input type="text" class="filter" data-column_num="5" placeholder="Search issue number" /></td> >- <td><input type="text" class="filter" data-column_num="6" placeholder="Search status" /></td> >- <td><input type="text" class="filter" data-column_num="7" placeholder="Search since" /></td> >- <td><input type="text" class="filter" data-column_num="8" placeholder="Search publication date" /></td> >- <td><input type="text" class="filter" data-column_num="9" placeholder="Search claim count" /></td> >- <td><input type="text" class="filter" data-column_num="10" placeholder="Search claim date" /></td> >- [% FOR field IN additional_fields_for_subscription %] >- <td><input type="text" class="filter" data-column_num="[% loop.count + 10 | html %]" placeholder="Search [% field.name | html %]" /></td> >- [% END %] >- </tr> >- </tfoot> > </table> <!-- /#claimst --> > </div> <!-- /.page-section --> > >@@ -244,19 +243,23 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > <script> >- var sTable; > $(document).ready(function() { > enableSelectedActions(); >- sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, { >- "dom": 't', >+ >+ var table_settings = [% TablesSettings.GetTableSettings( 'serials', 'claims', 'claimst', 'json' ) | $raw %]; >+ var sTable = KohaTable("claimst", { >+ "autoWidth": false, >+ "dom": '<"dt-info"><"top pager"<"table_entries"lip><"table_controls"B>>tr<"bottom pager"ip>', > "order": [[ 7, "asc" ]], > "columnDefs": [ > { 'sortable': false, 'targets': [ 'NoSort' ] }, > { "type": "anti-the", "targets": [ 'anti-the'] } > ], >- "paginate": false >- })); >+ "paginate": false, >+ "orderCellsTop": true >+ }, table_settings); > > // Checkboxes : Select All / None > $("span.checkall").html("<input type=\"checkbox\" name=\"CheckAll\"> "+_("Check all")+"</input>"); >-- >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 16721
:
114974
|
168038
|
170084
|
175577
|
178000
|
178915
|
182460