Bugzilla – Attachment 120922 Details for
Bug 28347
Add DataTables, additional information to patron attribute types management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28347: Add DataTables, additional information to patron attribute types management
Bug-28347-Add-DataTables-additional-information-to.patch (text/plain), 4.85 KB, created by
Owen Leonard
on 2021-05-13 12:08:54 UTC
(
hide
)
Description:
Bug 28347: Add DataTables, additional information to patron attribute types management
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-05-13 12:08:54 UTC
Size:
4.85 KB
patch
obsolete
>From 7affb6761760bb095fd14c45e15d54dfb4ef2c42 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 12 May 2021 18:35:27 +0000 >Subject: [PATCH] Bug 28347: Add DataTables, additional information to patron > attribute types management > >This patch enhances the display of patron attribute information on the >attribute management page. > >To test, apply the patch and go to Administration -> Patron attribute >types. > > - If necessary, add multiple patron attributes so that there is data to > display. Include: > - Some which are mandatory > - Some which are linked to an authorized value category > - Some which share a class. > - The tables showing your attributes should each have DataTables > sorting and controls (except for column configuration, which isn't > added by this patch). > - Confirm that DataTable controls work correctly for each table. > - The table should include columns showing authorized value category > and whether the attribute is mandatory. > - If you are logged in as a user with permission to manage > authorized values, the data in the authorized value category > column should be linked to that category on the authorized values > page. >--- > .../prog/en/modules/admin/patron-attr-types.tt | 35 ++++++++++++++++++---- > 1 file changed, 30 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >index 22c65fc19c..3696ad6162 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >@@ -292,13 +292,15 @@ Patron attribute types › Administration › Koha > [% IF attribute.class %] > <h4>[% attribute.lib | html %]</h4> > [% END %] >- <table class="patron_attributes_types"> >+ <table class="patron_attributes_types" id="patron_attr[% attribute.class | html %]"> > <thead> > <tr> > <th>Code</th> > <th>Description</th> >- <th>Branches limitation</th> >- <th class="noExport">Actions</th> >+ <th>Library limitation</th> >+ <th>Authorized value category</th> >+ <th>Mandatory</th> >+ <th class="NoSort noExport">Actions</th> > </tr> > </thead> > <tbody> >@@ -315,15 +317,28 @@ Patron attribute types › Administration › Koha > [% END %] > <span title="[% branches_str | html %]"> > [% IF libraries.count > 1 %] >- [% libraries.count | html %] branches limitations >+ [% libraries.count | html %] library limitations > [% ELSE %] >- [% libraries.count | html %] branch limitation >+ [% libraries.count | html %] library limitation > [% END %] > </span> > [% ELSE %] > No limitation > [% END %] > </td> >+ <td> >+ [% IF ( CAN_user_parameters_manage_auth_values ) %] >+ <a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% item.authorised_value_category | uri %]">[% item.authorised_value_category | html %]</a></td> >+ [% ELSE %] >+ [% item.authorised_value_category | html %] >+ [% END %] >+ <td> >+ [% IF ( item.mandatory ) -%] >+ Yes >+ [% ELSE -%] >+ No >+ [% END %] >+ </td> > <td class="actions"> > <a class="btn btn-default btn-xs" href="[% script_name | url %]?op=edit_attribute_type&code=[% item.code | uri %]"><i class="fa fa-pencil"></i> Edit</a> > <a class="btn btn-default btn-xs" href="[% script_name | url %]?op=delete_attribute_type&code=[% item.code | uri %]"><i class="fa fa-trash"></i> Delete</a> >@@ -353,6 +368,8 @@ Patron attribute types › Administration › Koha > > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] >+ [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { > if ( $("#branches option:selected").length < 1 ) { >@@ -366,6 +383,14 @@ Patron attribute types › Administration › Koha > $("#opac_editable").attr('disabled', true).parent().attr('aria-disabled', 'true'); > } > } ).change(); >+ >+ $(".patron_attributes_types").each(function(){ >+ var tableid = $(this).attr("id"); >+ KohaTable( tableid, { >+ "bPaginate": false, >+ 'autoWidth': false, >+ }, null ); >+ }); > }); > </script> > [% END %] >-- >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 28347
:
120922
|
121020
|
123126