3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Serials › [% title | html %] › [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
7 <body id="ser_routing" class="ser">
8 [% INCLUDE 'header.inc' %]
9 [% INCLUDE 'serials-search.inc' %]
11 <div id="breadcrumbs">
12 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
13 › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
14 [% UNLESS blocking_error %]
15 › <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><i>[% title | html %]</i></a>
16 › [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]
20 <div class="main container-fluid">
22 <div class="col-sm-10 col-sm-push-2">
24 [% INCLUDE 'blocking_errors.inc' %]
27 <h1>Create routing list for <i>[% title | html %]</i></h1>
29 <h1>Edit routing list for <i>[% title | html %]</i></h1>
32 <form method="post" action="routing.pl">
33 <input type="hidden" name="op" value="save" />
34 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
35 <fieldset class="rows">
37 <li><label for="date_selected">Issue: </label>
38 <select name="date_selected" id="date_selected">
39 [% FOREACH date IN dates %]
40 [% IF ( date.selected ) %]
41 <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
43 <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
46 </select> [% issue | html %]</li>
49 <span class="label">Recipients:</span>
51 <table style="clear:none;margin:0;">
56 [% USE m_loop = iterator(memberloop) %]
57 [% FOREACH member IN m_loop %]
58 <tr><td>[% member.name | html %]</td>
60 <select name="itemrank" class="itemrank" data-subscriptionid="[% subscriptionid | html %]" data-routingid="[% member.routingid | html %]">
61 [% rankings = [1 .. m_loop.size] %]
62 [% SET cur_rank = loop.count() %]
63 [% FOREACH r IN rankings %]
64 [% IF r == cur_rank %]
65 <option selected="selected" value="[% r | html %]">[% r | html %]</option>
67 <option value="[% r | html %]">[% r | html %]</option>
72 <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"></i> Delete</a></td>
78 <p style="margin-left:10em;">
79 <a href="#" id="add_recipients"><i class="fa fa-plus"></i> Add recipients</a>
81 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&op=delete"><i class="fa fa-trash"></i> Delete all</a>
86 <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
90 <fieldset class="action"><input type="submit" name="submit" value="Save" /></fieldset>
94 </div> <!-- /.col-sm-10.col-sm-push-2 -->
96 <div class="col-sm-2 col-sm-pull-10">
98 [% INCLUDE 'serials-menu.inc' %]
100 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
101 </div> <!-- /.row -->
102 [% MACRO jsinclude BLOCK %]
104 $(document).ready(function(){
105 $("#add_recipients").on("click",function(e){
109 $(".itemrank").on("change",function(){
110 var subscriptionid = $(this).data("subscriptionid");
111 var routingid = $(this).data("routingid");
112 reorder_item( subscriptionid, routingid, $(this).val());
115 function reorder_item(sid,rid,rank){
116 var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
117 window.location.href=mylocation;
120 function userPopup() {
121 window.open("/cgi-bin/koha/serials/add_user_search.pl",
123 'width=740,height=450,location=yes,toolbar=no,'
124 + 'scrollbars=yes,resize=yes'
128 function add_user(borrowernumber) {
129 var myurl = "routing.pl?subscriptionid="+[% subscriptionid | html %]+"&borrowernumber="+borrowernumber+"&op=add";
130 window.location.href = myurl;
135 [% INCLUDE 'intranet-bottom.inc' %]