Bugzilla – Attachment 106490 Details for
Bug 25832
Add DataTables to MARC subfield structure admin page for authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25832: Add DataTables to MARC subfield structure admin page for authorities
Bug-25832-Add-DataTables-to-MARC-subfield-structur.patch (text/plain), 3.09 KB, created by
ByWater Sandboxes
on 2020-07-03 08:24:55 UTC
(
hide
)
Description:
Bug 25832: Add DataTables to MARC subfield structure admin page for authorities
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-07-03 08:24:55 UTC
Size:
3.09 KB
patch
obsolete
>From b312c9b31161866e77440a94dc1195fc44f9a777 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 23 Jun 2020 11:52:20 +0000 >Subject: [PATCH] Bug 25832: Add DataTables to MARC subfield structure admin > page for authorities > >This patch adds DataTables sorting and filtering to the table of >subfields shown on the Authority MARC subfield structure administration >page. > >To test, apply the patch and go to Administration -> Authority types. > > - From the 'Actions' menu, select 'MARC structure.' > - From the 'Actions' menu, select the 'Subfields' link for a tag > with multiple subfields. > - On the page showing all the subfields for the tag, confirm that > the table is sorted by default by subfield and that sorting works > correctly. > - Confirm that the search form at the top of the table works. > >Signed-off-by: Katrin <katrin.fischer@bsz-bw.de> >--- > .../en/modules/admin/auth_subfields_structure.tt | 31 +++++++++++++++------- > 1 file changed, 21 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt >index b5da79e661..b54246d678 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt >@@ -263,13 +263,16 @@ > <p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p> > <p>The column 'Koha field' shows that the subfield is linked with a Koha field.</p> > >-<table> >- <tr> >- <th>Subfield</th> >- <th>Text</th> >- <th>Constraints</th> >- <th> </th> >- </tr> >+<table id="table_authsubfieldstructure"> >+ <thead> >+ <tr> >+ <th>Subfield</th> >+ <th>Text</th> >+ <th>Constraints</th> >+ <th class="NoSort"> </th> >+ </tr> >+ </thead> >+ <tbody> > [% FOREACH loo IN loop %] > <tr> > <td>[% loo.tagsubfield | html %]</td> >@@ -304,6 +307,7 @@ > <td><a href="?op=delete_confirm&tagfield=[% loo.tagfield | uri %]&tagsubfield=[% loo.tagsubfield | uri %]&authtypecode=[% authtypecode | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a></td> > </tr> > [% END %] >+ </tbody> > </table> > > <form action="[% script_name | html %]" method="get"> >@@ -337,11 +341,18 @@ > </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/admin-menu.js") | $raw %] > <script> >- $(document).ready(function() { >- $('#subfieldtabs').tabs(); >- }); >+ $(document).ready(function() { >+ $('#subfieldtabs').tabs(); >+ $("#table_authsubfieldstructure").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "columnDefs": [ >+ { 'sortable': false, 'targets': [ 'NoSort' ] } >+ ], >+ paginate: false >+ })); >+ }); > </script> > [% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.11.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 25832
:
106200
| 106490