Bugzilla – Attachment 114402 Details for
Bug 27212
Add column configuration to the acquisitions home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27212: Add Table configuration to acqui-home.pl accounts table
Bug-27212-Add-Table-configuration-to-acqui-homepl-.patch (text/plain), 3.10 KB, created by
Lucas Gass (lukeg)
on 2020-12-15 00:28:27 UTC
(
hide
)
Description:
Bug 27212: Add Table configuration to acqui-home.pl accounts table
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2020-12-15 00:28:27 UTC
Size:
3.10 KB
patch
obsolete
>From 44901f65be1b536ca9adeb50be202025986f552d Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 15 Dec 2020 00:24:51 +0000 >Subject: [PATCH] Bug 27212: Add Table configuration to acqui-home.pl accounts > table > >To test, apply the patch and clear your browser cache > >1. Go to acqui-home.pl >2. Test that the "Columns" button works to show and hide columns. >3. Go to Administration -> Table settings and look under the Acquisitions tab for the page 'acq_acqui-home' and the table 'accounts'. >4. Hide each column and make sure it hides correctly on acqui-home.pl >5. Test the export options (Excel, CSV, etc) and make sure hidden columns do not show up. >--- > admin/columns_settings.yml | 24 ++++++++++++++++++++++ > .../prog/en/modules/acqui/acqui-home.tt | 11 ++++++++++ > 2 files changed, 35 insertions(+) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index d825168439..9df9cd0ca3 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -1,5 +1,29 @@ > modules: > acqui: >+ acq_acqui-home: >+ accounts: >+ columns: >+ - >+ columnname: active >+ - >+ columnname: budget_period_description >+ - >+ columnname: fund_code >+ - >+ columnname: fund_name >+ - >+ columnname: owner >+ - >+ columnname: library >+ - >+ columnname: amount >+ - >+ columnname: ordered >+ - >+ columnname: spent >+ - >+ columnname: total_available >+ > histsearch: > histsearcht: > columns: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 0990427fca..fba8c24ffe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE Price %] > [% USE Branches %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions</title> >@@ -195,6 +196,7 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] > [% Asset.js("js/acquisitions-menu.js") | $raw %] > <script> >@@ -202,6 +204,15 @@ > > $(document).ready(function() { > >+ var column_settings = [% TablesSettings.GetColumns( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %]; >+ var accounts_table = KohaTable("accounts", { >+ "columnDefs": [ >+ { "sortable": false, "searchable": false, 'targets': [ 'NoSort' ] }, >+ { "type": "title-string", "targets" : [ "title-string" ] } >+ ], >+ 'autoWidth': false, >+ }, column_settings ); >+ > var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { > "fnDrawCallback": function ( oSettings ) { > if ( oSettings.aiDisplay.length == 0 ) >-- >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 27212
:
114401
|
114402
|
114412
|
130128
|
130773
|
132274