+[% MACRO jsinclude BLOCK %]
+ <script>
+ var subscriptionid = "[% subscriptionid | html %]";
+ var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
+ var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
+ var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
+ </script>
+ [% Asset.js("js/serials-toolbar.js") | $raw %]
+ [% INCLUDE 'datatables.inc' %]
+ [% INCLUDE 'columns_settings.inc' %]
+ <script>
+ // the english words used in display purposes
+ var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
+ "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
+ $(document).ready(function() {
+ $("#subscription_description").tabs();
+ $("#renewsub").click(function(){
+ popup([% subscriptionid | html %]);
+ return false;
+ })
+
+ var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
+ var table = KohaTable("orders", {
+ 'bPaginate': false,
+ 'bAutoWidth': false,
+ "aaSorting": [[ 5, "asc" ], [ 2, "desc" ]], // Order by status then ordernumber
+ "aoColumnDefs": [
+ { "aTargets": "title-string", "sType": "title-string" }
+ ]
+ }, columns_settings);
+
+ $("#hide_received_orders").click(function(e){
+ e.preventDefault();
+ table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
+ });
+ $("#show_all_orders").click(function(e){
+ e.preventDefault();
+ table.fnFilter( '', 4 ); // Not filter, display all columns
+ });
+ $("#show_all_orders").click();
+
+
+ });
+ </script>
+[% END %]