View | Details | Raw Unified | Return to bug 36195
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tt (-13 lines)
Lines 82-100 Link Here
82
     </div> <!-- /.row -->
82
     </div> <!-- /.row -->
83
83
84
[% MACRO jsinclude BLOCK %]
84
[% MACRO jsinclude BLOCK %]
85
    <script>
86
        $(document).ready(function(){
87
            $("#save_and_preview").on("click",function(e){
88
                e.preventDefault();
89
                print_slip( $("#subscriptionid").val(), $("#issue_escaped").val() );
90
            });
91
        });
92
        function print_slip(subscriptionid,issue){
93
            var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
94
            window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
95
            window.location.href='subscription-detail.pl?subscriptionid=' + subscriptionid;
96
        }
97
    </script>
98
[% END %]
85
[% END %]
99
86
100
[% INCLUDE 'intranet-bottom.inc' %]
87
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (+6 lines)
Lines 488-493 Link Here
488
                table.fnFilter( '', 4 ); // Not filter, display all columns
488
                table.fnFilter( '', 4 ); // Not filter, display all columns
489
            });
489
            });
490
            $("#show_all_orders").click();
490
            $("#show_all_orders").click();
491
492
            [% IF print_routing_list_issue %]
493
                var myurl = '/cgi-bin/koha/serials/routing-preview.pl?op=print&subscriptionid=[% subscriptionid | uri %]&issue=[% print_routing_list_issue | uri %]';
494
                window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
495
            [% END %]
496
491
        });
497
        });
492
498
493
        function mana_comment_close(){
499
        function mana_comment_close(){
(-)a/serials/routing-preview.pl (-13 / +19 lines)
Lines 104-123 if($op eq 'cud-save_and_preview'){ Link Here
104
        }
104
        }
105
    }
105
    }
106
	}
106
	}
107
107
    print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid&print_routing_list_issue=" . $query->param('issue_escaped'));
108
    ($template, $loggedinuser, $cookie)
108
    exit;
109
= get_template_and_user({template_name => "serials/routing-preview-slip.tt",
109
} elsif ( $op eq 'print' ) {
110
				query => $query,
110
    ( $template, $loggedinuser, $cookie ) = get_template_and_user(
111
				type => "intranet",
111
        {
112
				flagsrequired => {serials => '*'},
112
            template_name => "serials/routing-preview-slip.tt",
113
				});
113
            query         => $query,
114
            type          => "intranet",
115
            flagsrequired => { serials => '*' },
116
        }
117
    );
114
} else {
118
} else {
115
    ($template, $loggedinuser, $cookie)
119
    ( $template, $loggedinuser, $cookie ) = get_template_and_user(
116
= get_template_and_user({template_name => "serials/routing-preview.tt",
120
        {
117
				query => $query,
121
            template_name => "serials/routing-preview.tt",
118
				type => "intranet",
122
            query         => $query,
119
				flagsrequired => {serials => '*'},
123
            type          => "intranet",
120
				});
124
            flagsrequired => { serials => '*' },
125
        }
126
    );
121
}
127
}
122
128
123
$template->param( libraryname => $library->branchname ) if $library;
129
$template->param( libraryname => $library->branchname ) if $library;
(-)a/serials/subscription-detail.pl (-1 / +1 lines)
Lines 166-171 $template->param( Link Here
166
    orders_grouped => $orders_grouped,
166
    orders_grouped => $orders_grouped,
167
    (uc(C4::Context->preference("marcflavour"))) => 1,
167
    (uc(C4::Context->preference("marcflavour"))) => 1,
168
    mana_comments => $subs->{comments},
168
    mana_comments => $subs->{comments},
169
    print_routing_list_issue => scalar $query->param('print_routing_list_issue'),
169
);
170
);
170
171
171
output_html_with_http_headers $query, $cookie, $template->output;
172
output_html_with_http_headers $query, $cookie, $template->output;
172
- 

Return to bug 36195