Bugzilla – Attachment 69779 Details for
Bug 19805
Add DataTables to Koha to MARC mapping page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19805: Add DataTables to Koha to MARC mapping page
Bug-19805-Add-DataTables-to-Koha-to-MARC-mapping-p.patch (text/plain), 3.40 KB, created by
Owen Leonard
on 2017-12-13 15:52:21 UTC
(
hide
)
Description:
Bug 19805: Add DataTables to Koha to MARC mapping page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-12-13 15:52:21 UTC
Size:
3.40 KB
patch
obsolete
>From 7bfd0c22e09c785d1d877f26d8772a70c3d9b13b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 13 Dec 2017 15:46:10 +0000 >Subject: [PATCH] Bug 19805: Add DataTables to Koha to MARC mapping page > >This patch adds sorting and filtering to the Koha to MARC mapping table >using DataTables. > >Also changed: Font awesome icons on "Add" and "Remove" buttons; Minor >markup correction to breadcrumbs. > >To test, apply the patch and go to Administration -> Koha to MARC >mapping. > >- Table should be sorted by default on Koha field. >- Sorting and filtering should work correctly. >--- > .../prog/en/modules/admin/koha2marclinks.tt | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt >index 020519d..d171710 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt >@@ -2,13 +2,14 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Koha to MARC mapping</title> > [% INCLUDE 'doc-head-close.inc' %] >+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > </head> > > <body id="admin_koha2marclinks" class="admin"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'prefs-admin-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC Mapping</a> ›</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC Mapping</a></div> > > <div id="doc3" class="yui-t2"> > >@@ -39,10 +40,10 @@ > <td>[% loo.tagfield %]</td> > <td>[% loo.tagsubfield %]</td> > <td>[% loo.liblibrarian %]</td> >- <td> >+ <td class="actions"> > [% IF !loo.readonly %] >- <a onclick="AddFld('[% loo.kohafield %]');" class="btn btn-default btn-xs">Add</a> >- [% IF loo.tagfield %] <a onclick="RemFld('[% loo.tagfield %]','[% loo.tagsubfield %]');" class="btn btn-default btn-xs">Remove</a> [% END %] >+ <a onclick="AddFld('[% loo.kohafield %]');" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</a> >+ [% IF loo.tagfield %] <a onclick="RemFld('[% loo.tagfield %]','[% loo.tagsubfield %]');" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Remove</a> [% END %] > [% END %] > </td> > </td> >@@ -66,6 +67,7 @@ > </div> > > [% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] > <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script> > <script type="text/javascript"> > function AddFld(kohafield) { >@@ -85,6 +87,15 @@ > $('#koha2marc').submit(); > } > } >+ $(document).ready(function() { >+ $("#kohafields").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "paging": false >+ } )); >+ >+ }); > </script> > [% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.1.4
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 19805
:
69779
|
69793
|
69819