Bugzilla – Attachment 130182 Details for
Bug 30031
Add lists to table settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30031: Add table settings to staff lists (op=view)
Bug-30031-Add-table-settings-to-staff-lists-opview.patch (text/plain), 3.34 KB, created by
Lucas Gass (lukeg)
on 2022-02-04 22:20:15 UTC
(
hide
)
Description:
Bug 30031: Add table settings to staff lists (op=view)
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-02-04 22:20:15 UTC
Size:
3.34 KB
patch
obsolete
>From b92f5f426a88791691ce0ac7b707e0347a473b51 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 4 Feb 2022 22:14:58 +0000 >Subject: [PATCH] Bug 30031: Add table settings to staff lists (op=view) > >To test: >1. Apply patch and restart_all >2. Create a list >3. GO to Administration > Table settings >4. In Table settings look under Catalog for lists. >6. The search results table should be listed, with the ability to hide the author, date_added, or call_number >5. Go to the view of your list ( /cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=1 ) >7. Make sure you can hide the columns properly. ( The checkbox and Title columns should not be hidable ) >--- > admin/columns_settings.yml | 18 ++++++++++++++++++ > .../prog/en/modules/virtualshelves/shelves.tt | 13 ++++++++++++- > 2 files changed, 30 insertions(+), 1 deletion(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 9b0982d264..93003a8835 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -299,6 +299,24 @@ modules: > cannot_be_modified: 1 > > catalogue: >+ lists: >+ searchresults: >+ columns: >+ - >+ columnname: checkbox >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: title >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: author >+ - >+ columnname: date_added >+ - >+ columnname: call_number >+ > detail: > holdings_table: > columns: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 09550fe2b4..8e31a2cb30 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE KohaDates %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title> >@@ -500,12 +501,12 @@ > > [% IF op == 'view' %] > [% Asset.js("lib/hc-sticky.js") | $raw %] >+ [% INCLUDE 'columns_settings.inc' %] > [% END %] > <script> > var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); > var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?"); > var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?"); >- > [% IF op == 'list' %] > $(document).ready(function(){ > var public = [% public | html %]; >@@ -608,6 +609,16 @@ > [% IF shelf AND op == 'view' %] > var Sticky; > $(document).ready(function(){ >+ var column_settings = [% TablesSettings.GetColumns( 'catalogue', 'lists', 'searchresults', 'json' ) | $raw %]; >+ KohaTable("searchresults", { >+ "dom": 'lrt', >+ "sorting": [[ 1, "asc" ]], >+ "autoWidth": false, >+ "asColumnDefs": [ >+ { "aTargets": [ 1 ], "sType": "nsb-nse" }, >+ ] >+ }, column_settings ); >+ > Sticky = $("#searchheader"); > Sticky.hcSticky({ > stickTo: "#listform", >-- >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 30031
:
130182
|
130183
|
131798
|
132037
|
132049
|
132050
|
132051
|
144887
|
144962
|
144966
|
158626
|
159084
|
159119
|
159859
|
162085
|
166716