4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %] › [% title | html %] › Serials › Koha</title>
6 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="ser_routing" class="ser">
9 [% WRAPPER 'header.inc' %]
10 [% INCLUDE 'serials-search.inc' %]
13 [% WRAPPER 'sub-header.inc' %]
14 [% WRAPPER breadcrumbs %]
15 [% WRAPPER breadcrumb_item %]
16 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
18 [% UNLESS ( blocking_error ) %]
19 [% WRAPPER breadcrumb_item %]
20 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><em>[% title | html %]</em></a>
22 [% WRAPPER breadcrumb_item bc_active= 1 %]
24 <span>Create routing list</span>
26 <span>Edit routing list</span>
29 [% END # UNLESS blocking_error %]
30 [% END #/ WRAPPER breadcrumbs %]
31 [% END #/ WRAPPER sub-header.inc %]
33 <div class="main container-fluid">
35 <div class="col-sm-10 col-sm-push-2">
39 <h1>Create routing list for <em>[% title | html %]</em></h1>
41 <h1>Edit routing list for <em>[% title | html %]</em></h1>
44 [% INCLUDE 'blocking_errors.inc' %]
45 <form method="post" action="routing.pl">
46 <input type="hidden" name="op" value="save" />
47 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
48 <fieldset class="rows">
50 <li><label for="date_selected">Issue: </label>
51 <select name="date_selected" id="date_selected">
52 [% FOREACH date IN dates %]
53 [% IF ( date.selected ) %]
54 <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
56 <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
59 </select> [% issue | html %]</li>
62 <span class="label">Recipients:</span>
64 <table style="clear:none;margin:0;">
69 [% USE m_loop = iterator(memberloop) %]
70 [% FOREACH member IN m_loop %]
71 <tr><td>[% member.name | html %]</td>
73 <select name="itemrank" class="itemrank" data-subscriptionid="[% subscriptionid | html %]" data-routingid="[% member.routingid | html %]">
74 [% rankings = [1 .. m_loop.size] %]
75 [% SET cur_rank = loop.count() %]
76 [% FOREACH r IN rankings %]
77 [% IF r == cur_rank %]
78 <option selected="selected" value="[% r | html %]">[% r | html %]</option>
80 <option value="[% r | html %]">[% r | html %]</option>
85 <td><a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/routing.pl?routingid=[% member.routingid | html %]&subscriptionid=[% subscriptionid | html %]&op=delete"><i class="fa fa-trash-can"></i> Delete</a></td>
91 <p style="margin-left:10em;">
92 <a href="#" id="add_recipients"><i class="fa fa-plus"></i> Add recipients</a>
94 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&op=delete"><i class="fa fa-trash-can"></i> Delete all</a>
99 <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
103 <fieldset class="action"><input type="submit" name="submit" class="btn btn-primary" value="Save" /></fieldset>
107 </div> <!-- /.col-sm-10.col-sm-push-2 -->
109 <div class="col-sm-2 col-sm-pull-10">
111 [% INCLUDE 'serials-menu.inc' %]
113 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
114 </div> <!-- /.row -->
115 [% MACRO jsinclude BLOCK %]
117 $(document).ready(function(){
118 $("#add_recipients").on("click",function(e){
122 $(".itemrank").on("change",function(){
123 var subscriptionid = $(this).data("subscriptionid");
124 var routingid = $(this).data("routingid");
125 reorder_item( subscriptionid, routingid, $(this).val());
128 function reorder_item(sid,rid,rank){
129 var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
130 window.location.href=mylocation;
133 function userPopup() {
134 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add",
136 'width=1024,height=768,scrollbars=yes,toolbar=no,'
137 + 'scrollbars=yes,resize=yes'
141 function add_user(borrowernumber) {
142 var myurl = "/cgi-bin/koha/serials/routing.pl?subscriptionid="+[% subscriptionid | html %]+"&borrowernumber="+borrowernumber+"&op=add";
143 window.location.href = myurl;
148 [% INCLUDE 'intranet-bottom.inc' %]