Bugzilla – Attachment 119233 Details for
Bug 27465
Add column visibility to the admin/cities.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27465: Add column visibility to admin/cities.pl
Bug-27465-Add-column-visibility-to-admincitiespl.patch (text/plain), 2.77 KB, created by
Jonathan Druart
on 2021-04-06 15:59:43 UTC
(
hide
)
Description:
Bug 27465: Add column visibility to admin/cities.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-04-06 15:59:43 UTC
Size:
2.77 KB
patch
obsolete
>From 7cca0ac78428afe518471f5a3956dba35d31d668 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 18 Jan 2021 16:18:09 +0100 >Subject: [PATCH] Bug 27465: Add column visibility to admin/cities.pl > >We want admin/cities.pl to be using as much DT features as possible to be used as an example. > >Test plan: >Add some cities, go to admin/cities.pl confirm that you can show/hide >column. > >Go to the tables settings admin page and confirm that you can set some >default settings from there. >--- > admin/columns_settings.yml | 17 +++++++++++++++++ > .../prog/en/modules/admin/cities.tt | 5 ++++- > 2 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 0a14a84508..2920818cdd 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -155,6 +155,23 @@ modules: > cannot_be_toggled: 1 > cannot_be_modified: 1 > admin: >+ cities: >+ table_cities: >+ columns: >+ - >+ columnname: city_id >+ - >+ columnname: city_name >+ - >+ columnname: city_state >+ - >+ columnname: city_zipcode >+ - >+ columnname: city_country >+ - >+ columnname: actions >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 > currency: > currencies-table: > columns: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >index 859fab1290..028cd54356 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% SET footerjs = 1 %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › [% IF op =='add_form' %]Cities › [% IF city.cityid %] Modify city[% ELSE %] New city[% END %][% ELSE %][% IF op == 'delete_confirm' %]Cities › Confirm deletion of city[% ELSE %] Cities[% END %][% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -199,8 +200,10 @@ > [% MACRO jsinclude BLOCK %] > [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'datatables.inc' %] >+ [% INCLUDE 'columns_settings.inc' %] > <script> > >+ var columns_settings = [% TablesSettings.GetColumns( 'admin', 'cities', 'table_cities', 'json' ) | $raw %]; > $(document).ready(function() { > var cities_table_url = '/api/v1/cities?'; > >@@ -265,7 +268,7 @@ > "orderable": false > } > ] >- }, [], 1); >+ }, columns_settings, 1); > > }); > </script> >-- >2.20.1
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 27465
:
115250
|
119233
|
119238
|
119799