Bugzilla – Attachment 72540 Details for
Bug 15668
Add column configuration to the items table in staff detail pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15668 - Add columns configuraiton to intranet details page
Bug-15668---Add-columns-configuraiton-to-intranet-.patch (text/plain), 8.31 KB, created by
Nick Clemens (kidclamp)
on 2018-03-08 15:05:38 UTC
(
hide
)
Description:
Bug 15668 - Add columns configuraiton to intranet details page
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-03-08 15:05:38 UTC
Size:
8.31 KB
patch
obsolete
>From b5506c18ad01a7571ee4cc56275cfc872f530f56 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 8 Mar 2018 14:57:23 +0000 >Subject: [PATCH] Bug 15668 - Add columns configuraiton to intranet details > page > >TODO: Make this account for otherholdings too - see bug 16759 > >To test: >1 - Apply patches >2 - View biblio details in staff client >3 - Should be able to toggle columns >4 - Go to admin columns settings >5 - Change some settings, verify they work >6 - Enable SeparateHoldings >7 - Don't works, Be sad, get motivated, finish the patchset, get a hug >from kidclamp >--- > admin/columns_settings.yml | 52 ++++++++++++++++++++++ > .../prog/en/modules/catalogue/detail.tt | 52 ++++++++++++---------- > 2 files changed, 80 insertions(+), 24 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index f56a745..8231a85 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -83,6 +83,58 @@ modules: > - > columnname: actions > >+ catalogue: >+ detail: >+ holdings_table: >+ - >+ columnname: holdings_checkbox >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: holdings_itype >+ - >+ columnname: holdings_holdingbranch >+ - >+ columnname: holdings_homebranch >+ - >+ columnname: holdings_ccode >+ - >+ columnname: holdings_itemcallnumber >+ - >+ columnname: holdings_status >+ - >+ columnname: holdings_lastseen >+ - >+ columnname: holdings_barcode >+ - >+ columnname: holdings_enumchron >+ - >+ columnname: holdings_uri >+ - >+ columnname: holdings_copynumber >+ - >+ columnname: holdings_stocknumber >+ - >+ columnname: holdings_materials >+ - >+ columnname: holdings_itemnotes >+ - >+ columnname: holdings_itemnotes_nonpublic >+ - >+ columnname: holdings_spinelabel >+ - >+ columnname: holdings_hostrecord >+ - >+ columnname: holdings_usedin >+ - >+ columnname: holdings_usedin_col >+ - >+ columnname: holdings_course_reserves >+ - >+ columnname: holdings_actions >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ > cataloguing: > additem: > itemst: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index e2c8e8a..c0fa966 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -3,6 +3,7 @@ > [% USE AuthorisedValues %] > [% USE Branches %] > [% USE Biblio %] >+[% USE ColumnsSettings %] > > [% IF Koha.Preference('AmazonAssocTag') %] > [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] >@@ -329,27 +330,27 @@ > <table class="items_table" id="[% tab %]_table"> > <thead> > <tr> >- [% IF (StaffDetailItemSelection) %]<th class="NoSort"></th>[% END %] >- [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] >- <th>Current location</th> >- <th>Home library</th> >- [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %] >- <th>Call number</th> >- <th>Status</th> >- <th>Last seen</th> >- <th>Barcode</th> >- [% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %] >- [% IF ( itemdata_uri ) %]<th>URL</th>[% END %] >- [% IF ( itemdata_copynumber ) %]<th>Copy number</th>[% END %] >- [% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %] >- [% IF materials %]<th>Materials specified</th>[% END %] >- [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %] >- [% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %] >- [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %] >- [% IF ( hostrecords ) %]<th>Host records</th>[% END %] >- [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %] >- [% IF ( ShowCourseReserves ) %]<th>Course Reserves</th>[% END %] >- [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort"> </th>[% END %] >+ [% IF (StaffDetailItemSelection) %]<th id="[% tab %]_checkbox" data-colname="[% tab %]_checkbox" class="NoSort"></th>[% END %] >+ [% IF ( item_level_itypes ) %]<th id="[% tab %]_itype" data-colname="[% tab %]_itype" >Item type</th>[% END %] >+ <th id="[% tab %]_holdingbranch" data-colname="[% tab %]_holdingbranch">Current location</th> >+ <th id="[% tab %]_homebranch" data-colname="[% tab %]_homebranch">Home library</th> >+ [% IF ( itemdata_ccode ) %]<th id="[% tab %]_ccode" data-colname="[% tab %]_ccode">Collection</th>[% END %] >+ <th id="[% tab %]_itemcallnumber" data-colname="[% tab %]_itemcallnumber">Call number</th> >+ <th id="[% tab %]_status" data-colname="[% tab %]_status">Status</th> >+ <th id="[% tab %]_lastseen" data-colname="[% tab %]_lastseen">Last seen</th> >+ <th id="[% tab %]_barcode" data-colname="[% tab %]_barcode">Barcode</th> >+ [% IF ( volinfo ) %]<th id="[% tab %]_enumchron" data-colname="[% tab %]_enumchron">Serial enumeration / chronology</th>[% END %] >+ [% IF ( itemdata_uri ) %]<th id="[% tab %]_uri" data-colname="[% tab %]_uri">URL</th>[% END %] >+ [% IF ( itemdata_copynumber ) %]<th id="[% tab %]_copynumber" data-colname="[% tab %]_copynumber">Copy number</th>[% END %] >+ [% IF ( itemdata_stocknumber ) %]<th id="[% tab %]_stocknumber" data-colname="[% tab %]_stocknumber">Inventory number</th>[% END %] >+ [% IF materials %]<th id="[% tab %]_materials" data-colname="[% tab %]_materials">Materials specified</th>[% END %] >+ [% IF ( itemdata_itemnotes ) %]<th id="[% tab %]_itemnotes" data-colname="[% tab %]_itemnotes">Public notes</th>[% END %] >+ [% IF ( itemdata_nonpublicnotes ) %]<th id="[% tab %]_itemnotes_nonpublic" data-colname="[% tab %]_itemnotes_nonpublic">Non-public notes</th>[% END %] >+ [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th id="[% tab %]_spinelabel" data-colname="[% tab %]_spinelabel">Spine label</th>[% END %] >+ [% IF ( hostrecords ) %]<th id="[% tab %]_hostrecord" data-colname="[% tab %]_hostrecord">Host records</th>[% END %] >+ [% IF ( analyze ) %]<th id="[% tab %]_usedin" data-colname="[% tab %]_usedin">Used in</th><th id="[% tab %]_usedin_col" data-colname="[% tab %]_usedin_col"></th>[% END %] >+ [% IF ( ShowCourseReserves ) %]<th id="[% tab %]_course_reserves" data-colname="[% tab %]_course_reserves">Course Reserves</th>[% END %] >+ [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort" id="[% tab %]_actions" data-colname="[% tab %]_actions"> </th>[% END %] > </tr> > </thead> > <tbody> >@@ -1053,8 +1054,9 @@ > > $(document).ready(function() { > var ids = ['holdings_table', 'otherholdings_table']; >- >+ var columns_settings = [ [% ColumnsSettings.GetColumns('catalogue', 'detail','holdings_table','json') %], [% ColumnsSettings.GetColumns('catalogue', 'detail','otherholdings_table','json') %] ]; > for (var i in ids) { >+ console.log( i ); > var id = ids[i]; > var dt_parameters = { > 'sDom': 't', >@@ -1062,9 +1064,11 @@ > 'bAutoWidth': false, > "aoColumnDefs": [ > { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] } >- ] >+ ], >+ "bKohaColumnsUseNames": true, >+ "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', > }; >- var table = KohaTable(id, dt_parameters, null, 'with_filters'); >+ var table = KohaTable(id, dt_parameters, columns_settings[i], 'with_filters'); > } > > [% IF Koha.Preference('AcquisitionDetails') %] >-- >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 15668
:
72540
|
100641
|
100642
|
100786
|
100787
|
100805
|
101816
|
101817
|
104165
|
104166
|
104167
|
104168