Bugzilla – Attachment 38434 Details for
Bug 13492
Add location to the checkouts tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13492: Add the column configuration for the checkouts table - circulation.pl
Bug-13492-Add-the-column-configuration-for-the-che.patch (text/plain), 6.53 KB, created by
Jonathan Druart
on 2015-04-23 16:31:45 UTC
(
hide
)
Description:
Bug 13492: Add the column configuration for the checkouts table - circulation.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-23 16:31:45 UTC
Size:
6.53 KB
patch
obsolete
>From eb6b6bbbeb8a401c0c8e71b1e8e9746262abc52b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 23 Dec 2014 11:30:33 +0100 >Subject: [PATCH] Bug 13492: Add the column configuration for the checkouts > table - circulation.pl > >Test plan: >1/ Verify that you can show/hide columns on the checkouts table (circulation.pl). >2/ Play with the column configuration admin page (admin/columns_settings.pl), >and confirm the behavior is correct (depends on what you have selected). > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > admin/columns_settings.yml | 47 ++++++++++++++++++++++ > .../prog/en/includes/checkouts-table-footer.inc | 6 +-- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 13 +++--- > .../prog/en/modules/circ/circulation.tt | 5 +++ > 4 files changed, 61 insertions(+), 10 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index bf3e4d6..a01f6fe 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -142,3 +142,50 @@ modules: > columnname: location > - > columnname: notes >+ >+ circ: >+ circulation: >+ issues-table: >+ - >+ columnname: un >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ is_hidden: 1 >+ - >+ columnname: deux >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ is_hidden: 1 >+ - >+ columnname: due_date_unformatted >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ is_hidden: 1 >+ - >+ columnname: due_date >+ - >+ columnname: title >+ - >+ columnname: item_type >+ - >+ columnname: checkout_on >+ - >+ columnname: checkout_from >+ - >+ columnname: callno >+ - >+ columnname: charge >+ - >+ columnname: price >+ - >+ columnname: renew >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: checkin >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ - >+ columnname: export >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >index dcc5ffc..549030f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >@@ -1,9 +1,9 @@ > <tfoot> > <tr> > <td colspan="9" style="text-align: right; font-weight:bold;">Totals:</td> >- <td>[% totaldue %]</td> >- <td>[% finetotal %]</td> >- <td>[% totalprice %]</td> >+ <td id="totaldue">[% totaldue %]</td> >+ <td id="totalfine">[% finetotal %]</td> >+ <td id="totalprice">[% totalprice %]</td> > <td colspan="3"><div class="date-select"> > <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" readonly="readonly" /> > </p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index c2131b6..b626ece 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -164,13 +164,13 @@ $(document).ready(function() { > $('#issues-table').show(); > $('#issues-table-actions').show(); > >- issuesTable = $("#issues-table").dataTable({ >+ issuesTable = KohaTable("#issues-table", { > "oLanguage": { > "sEmptyTable" : MSG_DT_LOADING_RECORDS, > "sProcessing": MSG_DT_LOADING_RECORDS, > }, > "bAutoWidth": false, >- "sDom": "rt", >+ "sDom": 'C<"clearfix">rt', > "aoColumns": [ > { > "mDataProp": function( oObj ) { >@@ -386,10 +386,9 @@ $(document).ready(function() { > total_fine += aaData[i]['fine'] * 1; > total_price += aaData[i]['price'] * 1; > } >- var nCells = nRow.getElementsByTagName('td'); >- nCells[1].innerHTML = total_charge.toFixed(2); >- nCells[2].innerHTML = total_fine.toFixed(2); >- nCells[3].innerHTML = total_price.toFixed(2); >+ $("#totaldue").html(total_charge.toFixed(2)); >+ $("#totalfine").html(total_fine.toFixed(2)); >+ $("#totalprice").html(total_price.toFixed(2)); > }, > "bPaginate": false, > "bProcessing": true, >@@ -416,7 +415,7 @@ $(document).ready(function() { > > oSettings.aaSortingFixed = null; > }, >- }).rowGrouping( >+ }, columns_settings).rowGrouping( > { > iGroupingColumnIndex: 1, > iGroupingOrderByColumnIndex: 0, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 7d323ec..49d910a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1,6 +1,7 @@ > [% USE Koha %] > [% USE Branches %] > [% USE KohaDates %] >+[% USE ColumnsSettings %] > [% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %] > [% SET exports_enabled = 1 %] > [% END %] >@@ -18,6 +19,7 @@ > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'strings.inc' %] > [% INCLUDE 'datatables.inc' %] >+[% INCLUDE 'columns_settings.inc' %] > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> > [% INCLUDE 'timepicker.inc' %] >@@ -43,6 +45,9 @@ var relatives_borrowernumbers = new Array(); > > var MSG_ADD_MESSAGE = _("Add a new message"); > var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); >+ >+columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %] >+ > [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] > [% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %] > >-- >2.1.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 13492
:
34662
|
34663
|
34664
|
35481
|
35511
|
35512
|
35513
| 38434 |
38435
|
38436
|
38473
|
38474