Bugzilla – Attachment 104853 Details for
Bug 25471
Add DataTables to MARC subfield structure admin page for bibliographic frameworks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25471: Add DataTables to MARC subfield structure admin page
Bug-25471-Add-DataTables-to-MARC-subfield-structur.patch (text/plain), 3.40 KB, created by
Lucas Gass (lukeg)
on 2020-05-13 20:46:12 UTC
(
hide
)
Description:
Bug 25471: Add DataTables to MARC subfield structure admin page
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-05-13 20:46:12 UTC
Size:
3.40 KB
patch
obsolete
>From 9baec341830299cb6047bc7740d7741163600688 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 12 May 2020 21:27:05 +0000 >Subject: [PATCH] Bug 25471: Add DataTables to MARC subfield structure admin > page > >This patch adds DataTables sorting and filtering to the table of >subfields shown on the MARC subfield structure administration page. > >To test, apply the patch and go to Administration -> MARC bibliographic >framework. > > - From the 'Actions' menu, select 'MARC structure.' > - From the 'Actions' menu, select the 'View 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: Lucas Gass <lucas@bywatersolutions.com> >--- > .../prog/en/modules/admin/marc_subfields_structure.tt | 9 +++++++-- > koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js | 8 +++++++- > 2 files changed, 14 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >index 77b17086c4..7736f1f248 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >@@ -266,13 +266,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> >+<table id="table_marcsubfieldstructure"> >+ <thead> > <tr> > <th>Subfield</th> > <th>Text</th> > <th>Constraints</th> >- <th>Actions</th> >+ <th class="NoSort">Actions</th> > </tr> >+ </thead> >+ <tbody> > [% FOREACH loo IN loop %] > <tr> > <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=[% loo.tagfield | uri %]&frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a></td> >@@ -307,6 +310,7 @@ > </td> > </tr> > [% END %] >+ </tbody> > </table> > > <form action="[% script_name | html %]" method="get"> >@@ -331,6 +335,7 @@ > </div> <!-- /.row --> > > [% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/admin-menu.js") | $raw %] > [% Asset.js("js/marc_subfields_structure.js") | $raw %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js b/koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js >index 1f1cc909e1..aa90be610a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js >@@ -1,10 +1,16 @@ >+/* global dataTablesDefaults */ > $(document).ready(function() { > $('#subfieldtabs').tabs(); > $("input[id^='hidden_']").click(setHiddenValue); > $("input[id^='hidden-']").each(function() { > populateHiddenCheckboxes($(this).attr('id').split('-')[1]); > }); >- >+ $("#table_marcsubfieldstructure").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "columnDefs": [ >+ { 'sortable': false, 'targets': [ 'NoSort' ] } >+ ], >+ paginate: false >+ })); > }); > > /* Function to enable/disable hidden values checkboxes when Flag is (de)selected */ >-- >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 25471
:
104802
|
104853
|
106123