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 46-52 Link Here
46
</fieldset>
46
</fieldset>
47
47
48
<fieldset class="action">
48
<fieldset class="action">
49
    <form method="post" action="routing-preview.pl">
49
    <form method="post" id="save_and_preview_form" action="routing-preview.pl">
50
        [% INCLUDE 'csrf-token.inc' %]
50
        [% INCLUDE 'csrf-token.inc' %]
51
        <input type="hidden" id="subscriptionid" name="subscriptionid" value="[% subscriptionid | html %]" />
51
        <input type="hidden" id="subscriptionid" name="subscriptionid" value="[% subscriptionid | html %]" />
52
        <input type="hidden" id="issue_escaped" name="issue_escaped" value="[% issue_escaped | html %]" />
52
        <input type="hidden" id="issue_escaped" name="issue_escaped" value="[% issue_escaped | html %]" />
Lines 82-87 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_form").on("submit",function(e){
88
                var myurl = 'routing-preview.pl?op=print&subscriptionid='+$("#subscriptionid").val()+'&issue='+$("#issue_escaped").val();
89
                window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
90
            });
91
            /*    e.preventDefault();
92
                print_slip( $("#subscriptionid").val(), $("#issue_escaped").val() );
93
            });
94
        });
95
        function print_slip(subscriptionid,issue){
96
            var myurl = 'routing-preview.pl?op=print&subscriptionid='+subscriptionid+'&issue='+issue;
97
            window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
98
            window.location.href='subscription-detail.pl?subscriptionid=' + subscriptionid;
99
            */
100
        });
101
    </script>
85
[% END %]
102
[% END %]
86
103
87
[% INCLUDE 'intranet-bottom.inc' %]
104
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing.tt (-14 / +34 lines)
Lines 44-57 Link Here
44
<h1>Edit routing list for <em>[% title | html %]</em></h1>
44
<h1>Edit routing list for <em>[% title | html %]</em></h1>
45
[% END %]
45
[% END %]
46
46
47
<form method="post" action="routing.pl">
48
    [% INCLUDE 'csrf-token.inc' %]
49
<input type="hidden" name="op" value="cud-save" />
50
<input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
51
<fieldset class="rows">
47
<fieldset class="rows">
52
	<ol>
48
	<ol>
53
		<li><label for="date_selected">Issue: </label>
49
		<li><label for="date_selected">Issue: </label>
54
<select name="date_selected" id="date_selected">
50
<select name="date_selected_top" id="date_selected_top" class="date_selected_top">
55
    [% FOREACH date IN dates %]
51
    [% FOREACH date IN dates %]
56
        [% IF ( date.selected ) %]
52
        [% IF ( date.selected ) %]
57
            <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
53
            <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
Lines 85-107 Link Here
85
                    [% END %]
81
                    [% END %]
86
                    </select>
82
                    </select>
87
                </td>
83
                </td>
88
                <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>
84
                <td>
85
                    <form method="post" action="routing.pl">
86
                        [% INCLUDE 'csrf-token.inc' %]
87
                        <input type="hidden" name="op" value="cud-delete" />
88
                        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
89
                        <input type="hidden" name="routingid" value="[% member.routingid | html %]" />
90
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</button>
91
                    </form>
92
                </td>
89
            </tr>
93
            </tr>
90
            [% END %]
94
            [% END %]
91
        </table>
95
        </table>
92
    [% END %]
96
    [% END %]
93
    <input type="hidden" id="new_recipients" name="new_recipients" value="">
97
    <input type="hidden" id="new_recipients" name="new_recipients" value="">
94
98
95
    <p style="margin-left:10em;">
99
    <form method="post" action="routing.pl">
96
        <a href="#patron_search_modal" id="add_recipients" data-toggle="modal"><i class="fa fa-plus"></i> Add recipients</a>
100
        [% INCLUDE 'csrf-token.inc' %]
97
        [% IF memberloop %]
101
        <input type="hidden" name="op" value="cud-delete" />
98
            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&amp;op=delete"><i class="fa fa-trash-can"></i> Delete all</a>
102
        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
99
        [% END %]
103
        <p style="margin-left:10em;">
100
    </p>
104
            <a href="#patron_search_modal" id="add_recipients" data-toggle="modal"><i class="fa fa-plus"></i> Add recipients</a>
105
            [% IF memberloop %]
106
                <button type="submit" class="btn"><i class="fa fa-trash-can"></i> Delete all</button>
107
            [% END %]
108
        </p>
109
    </form>
101
</li>
110
</li>
102
111
103
	<li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
112
    <form method="post" action="routing.pl">
104
	</ol>
113
        [% INCLUDE 'csrf-token.inc' %]
114
        <input type="hidden" name="op" value="cud-save" />
115
        <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
116
        <input type="hidden" id="date_selected" name="date_selected" value="" />
117
118
        <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
119
        </ol>
120
105
121
106
</fieldset>
122
</fieldset>
107
<fieldset class="action"><input type="submit" name="submit" class="btn btn-primary" value="Save" /></fieldset>
123
<fieldset class="action"><input type="submit" name="submit" class="btn btn-primary" value="Save" /></fieldset>
Lines 124-129 Link Here
124
                var routingid = $(this).data("routingid");
140
                var routingid = $(this).data("routingid");
125
                reorder_item( subscriptionid, routingid, $(this).val());
141
                reorder_item( subscriptionid, routingid, $(this).val());
126
            });
142
            });
143
            $("#date_selected").val( $("#date_selected_top").find("option:selected").val() );
144
            $(".date_selected_top").on("change",function(){
145
                $("#date_selected").val( $(this).val() );
146
            });
127
        });
147
        });
128
        function reorder_item(sid,rid,rank){
148
        function reorder_item(sid,rid,rank){
129
            var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
149
            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 308-314 Link Here
308
                                                        </td>
308
                                                        </td>
309
                                                        [% IF ( routing ) %]
309
                                                        [% IF ( routing ) %]
310
                                                            <td class="actions">
310
                                                            <td class="actions">
311
                                                                <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>
311
                                                                <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>
312
                                                            </td>
312
                                                            </td>
313
                                                        [% END %]
313
                                                        [% END %]
314
                                                    </tr>
314
                                                    </tr>
315
- 

Return to bug 37873