Browse Source

Bug 17877: Add columns settings to the orders table on subscription-detail

Test plan:
- Apply this patch and make sure to restart memcached (to re-read the yaml
file that is cached)
- Go to Home › Administration › Columns settings
- Confirm that a new "Serials" tab contain the different columns of the
"Acquisition details" table displayed on the subscription detail page
(if an order exist for this subscription)
- Play with it
- Go to Home › Serials › Details for subscription #ID
- Confirm that the "Column visibility" button is now displayed on top of
the table that it works correctly.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Jonathan Druart 6 years ago
committed by Nick Clemens
parent
commit
4fe0b35018
  1. 22
      admin/columns_settings.yml
  2. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt
  3. 7
      koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt

22
admin/columns_settings.yml

@ -592,3 +592,25 @@ modules:
columnname: serial_status columnname: serial_status
- -
columnname: serial_notes columnname: serial_notes
serials:
subscription-detail:
orders:
-
columnname: invoice
-
columnname: basket
-
columnname: ordernumber
-
columnname: creation_date
-
columnname: receive_date
-
columnname: status
-
columnname: fund
-
columnname: ordered
-
columnname: spent

6
koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt

@ -158,6 +158,12 @@
[% PROCESS pagelist module=modules.reports modulename="reports" %] [% PROCESS pagelist module=modules.reports modulename="reports" %]
</div> </div>
<h3><a href="#serials">Serials</a></h3>
<div id="serials">
<h4>Serials tables</h4>
[% PROCESS pagelist module=modules.serials modulename="serials" %]
</div>
</div> </div>
</main> </main>
</div> <!-- /.col-sm-10.col-sm-push-2 --> </div> <!-- /.col-sm-10.col-sm-push-2 -->

7
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt

@ -5,6 +5,7 @@
[% USE Branches %] [% USE Branches %]
[% USE AuthorisedValues %] [% USE AuthorisedValues %]
[% USE Price %] [% USE Price %]
[% USE ColumnsSettings %]
[% SET footerjs = 1 %] [% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %] [% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid | html %]</title> <title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid | html %]</title>
@ -420,6 +421,7 @@
</script> </script>
[% Asset.js("js/serials-toolbar.js") | $raw %] [% Asset.js("js/serials-toolbar.js") | $raw %]
[% INCLUDE 'datatables.inc' %] [% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
<script type="text/javascript"> <script type="text/javascript">
// the english words used in display purposes // the english words used in display purposes
var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern", var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
@ -431,14 +433,15 @@
return false; return false;
}) })
var table = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, { var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
var table = KohaTable("orders", {
'bPaginate': false, 'bPaginate': false,
'bAutoWidth': false, 'bAutoWidth': false,
"aaSorting": [[ 5, "asc" ], [ 2, "desc" ]], // Order by status then ordernumber "aaSorting": [[ 5, "asc" ], [ 2, "desc" ]], // Order by status then ordernumber
"aoColumnDefs": [ "aoColumnDefs": [
{ "aTargets": "title-string", "sType": "title-string" } { "aTargets": "title-string", "sType": "title-string" }
] ]
})); }, columns_settings);
$("#hide_received_orders").click(function(e){ $("#hide_received_orders").click(function(e){
e.preventDefault(); e.preventDefault();

Loading…
Cancel
Save