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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview.tt (-1 / +18 lines)
Lines 52-58 Link Here
52
</fieldset>
52
</fieldset>
53
53
54
<fieldset class="action">
54
<fieldset class="action">
55
    <form method="post" action="routing-preview.pl">
55
    <form method="post" id="save_and_preview_form" action="routing-preview.pl">
56
        [% INCLUDE 'csrf-token.inc' %]
56
        [% INCLUDE 'csrf-token.inc' %]
57
        <input type="hidden" id="subscriptionid" name="subscriptionid" value="[% subscriptionid | html %]" />
57
        <input type="hidden" id="subscriptionid" name="subscriptionid" value="[% subscriptionid | html %]" />
58
        <input type="hidden" id="issue_escaped" name="issue_escaped" value="[% issue_escaped | html %]" />
58
        <input type="hidden" id="issue_escaped" name="issue_escaped" value="[% issue_escaped | html %]" />
Lines 88-93 Link Here
88
     </div> <!-- /.row -->
88
     </div> <!-- /.row -->
89
89
90
[% MACRO jsinclude BLOCK %]
90
[% MACRO jsinclude BLOCK %]
91
     <script>
92
        $(document).ready(function(){
93
            $("#save_and_preview_form").on("submit",function(e){
94
                var myurl = 'routing-preview.pl?op=print&subscriptionid='+$("#subscriptionid").val()+'&issue='+$("#issue_escaped").val();
95
                window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
96
            });
97
            /*    e.preventDefault();
98
                print_slip( $("#subscriptionid").val(), $("#issue_escaped").val() );
99
            });
100
        });
101
        function print_slip(subscriptionid,issue){
102
            var myurl = 'routing-preview.pl?op=print&subscriptionid='+subscriptionid+'&issue='+issue;
103
            window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
104
            window.location.href='subscription-detail.pl?subscriptionid=' + subscriptionid;
105
            */
106
        });
107
    </script>
91
[% END %]
108
[% END %]
92
109
93
[% INCLUDE 'intranet-bottom.inc' %]
110
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt (-14 / +34 lines)
Lines 54-67 Link Here
54
    <h1>Modify routing list for <em>[% title | html %]</em></h1>
54
    <h1>Modify routing list for <em>[% title | html %]</em></h1>
55
[% END %]
55
[% END %]
56
56
57
<form method="post" action="routing.pl">
58
    [% INCLUDE 'csrf-token.inc' %]
59
<input type="hidden" name="op" value="cud-save" />
60
<input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
61
<fieldset class="rows">
57
<fieldset class="rows">
62
	<ol>
58
	<ol>
63
		<li><label for="date_selected">Issue: </label>
59
		<li><label for="date_selected">Issue: </label>
64
<select name="date_selected" id="date_selected">
60
<select name="date_selected_top" id="date_selected_top" class="date_selected_top">
65
    [% FOREACH date IN dates %]
61
    [% FOREACH date IN dates %]
66
        [% IF ( date.selected ) %]
62
        [% IF ( date.selected ) %]
67
            <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
63
            <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
Lines 95-117 Link Here
95
                    [% END %]
91
                    [% END %]
96
                    </select>
92
                    </select>
97
                </td>
93
                </td>
98
                <td><a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/routing.pl?routingid=[% member.routingid | html %]&amp;subscriptionid=[% subscriptionid | html %]&amp;op=delete"><i class="fa fa-trash-can"></i> Delete</a></td>
94
                <td>
95
                    <form method="post" action="routing.pl">
96
                        [% INCLUDE 'csrf-token.inc' %]
97
                        <input type="hidden" name="op" value="cud-delete" />
98
                        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
99
                        <input type="hidden" name="routingid" value="[% member.routingid | html %]" />
100
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</button>
101
                    </form>
102
                </td>
99
            </tr>
103
            </tr>
100
            [% END %]
104
            [% END %]
101
        </table>
105
        </table>
102
    [% END %]
106
    [% END %]
103
    <input type="hidden" id="new_recipients" name="new_recipients" value="">
107
    <input type="hidden" id="new_recipients" name="new_recipients" value="">
104
108
105
    <p style="margin-left:10em;">
109
    <form method="post" action="routing.pl">
106
        <a href="#patron_search_modal" id="add_recipients" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add recipients</a>
110
        [% INCLUDE 'csrf-token.inc' %]
107
        [% IF memberloop %]
111
        <input type="hidden" name="op" value="cud-delete" />
108
            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&amp;op=delete"><i class="fa fa-trash-can"></i> Delete all</a>
112
        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
109
        [% END %]
113
        <p style="margin-left:10em;">
110
    </p>
114
            <a href="#patron_search_modal" id="add_recipients" data-bs-toggle="modal"><i class="fa fa-plus"></i> Add recipients</a>
115
            [% IF memberloop %]
116
                <button type="submit" class="btn"><i class="fa fa-trash-can"></i> Delete all</button>
117
            [% END %]
118
        </p>
119
    </form>
111
</li>
120
</li>
112
121
113
	<li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
122
    <form method="post" action="routing.pl">
114
	</ol>
123
        [% INCLUDE 'csrf-token.inc' %]
124
        <input type="hidden" name="op" value="cud-save" />
125
        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
126
        <input type="hidden" id="date_selected" name="date_selected" value="" />
127
128
        <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
129
        </ol>
130
115
131
116
</fieldset>
132
</fieldset>
117
<fieldset class="action"><input type="submit" name="submit" class="btn btn-primary" value="Save" /></fieldset>
133
<fieldset class="action"><input type="submit" name="submit" class="btn btn-primary" value="Save" /></fieldset>
Lines 134-139 Link Here
134
                var routingid = $(this).data("routingid");
150
                var routingid = $(this).data("routingid");
135
                reorder_item( subscriptionid, routingid, $(this).val());
151
                reorder_item( subscriptionid, routingid, $(this).val());
136
            });
152
            });
153
            $("#date_selected").val( $("#date_selected_top").find("option:selected").val() );
154
            $(".date_selected_top").on("change",function(){
155
                $("#date_selected").val( $(this).val() );
156
            });
137
        });
157
        });
138
        function reorder_item(sid,rid,rank){
158
        function reorder_item(sid,rid,rank){
139
            var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
159
            var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt (-2 / +1 lines)
Lines 314-320 Link Here
314
                                                        </td>
314
                                                        </td>
315
                                                        [% IF ( routing ) %]
315
                                                        [% IF ( routing ) %]
316
                                                            <td class="actions">
316
                                                            <td class="actions">
317
                                                                <a href="/cgi-bin/koha/serials/routing-preview.pl?ok=1&amp;subscriptionid=[% serial.subscriptionid | uri %]&amp;issue=[% serial.serialseq.replace("'", "\\'") | uri %]%20([% serial.publisheddate | $KohaDates %])" class="btn btn-default btn-xs print_list"><i class="fa fa-print"></i> Print list</a>
317
                                                                <a href="/cgi-bin/koha/serials/routing-preview.pl?op=print&amp;subscriptionid=[% serial.subscriptionid | uri %]&amp;issue=[% serial.serialseq.replace("'", "\\'") | uri %]%20([% serial.publisheddate | $KohaDates %])" class="btn btn-default btn-xs print_list"><i class="fa fa-print"></i> Print list</a>
318
                                                            </td>
318
                                                            </td>
319
                                                        [% END %]
319
                                                        [% END %]
320
                                                    </tr>
320
                                                    </tr>
321
- 

Return to bug 37873