2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Serials › [% title | html %] › [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
6 <body id="ser_routing" class="ser">
7 [% INCLUDE 'header.inc' %]
8 [% INCLUDE 'serials-search.inc' %]
10 <div id="breadcrumbs">
11 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
12 › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
13 [% UNLESS blocking_error %]
14 › <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><i>[% title | html %]</i></a>
15 › [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]
19 <div id="doc3" class="yui-t2">
25 [% INCLUDE 'blocking_errors.inc' %]
28 <h1>Create routing list for <i>[% title | html %]</i></h1>
30 <h1>Edit routing list for <i>[% title | html %]</i></h1>
33 <form method="post" action="routing.pl">
34 <input type="hidden" name="op" value="save" />
35 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
36 <fieldset class="rows">
38 <li><label for="date_selected">Issue: </label>
39 <select name="date_selected" id="date_selected">
40 [% FOREACH date IN dates %]
41 [% IF ( date.selected ) %]<option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | html %])</option>[% ELSE %]<option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | html %])</option>[% END %]
43 </select> [% issue | html %]</li>
46 <span class="label">Recipients:</span>
48 <table style="clear:none;margin:0;">
53 [% USE m_loop = iterator(memberloop) %]
54 [% FOREACH member IN m_loop %]
55 <tr><td>[% member.name | html %]</td>
57 <select name="itemrank" class="itemrank" data-subscriptionid="[% subscriptionid | html %]" data-routingid="[% member.routingid | html %]">
58 [% rankings = [1 .. m_loop.size] %]
59 [% FOREACH r IN rankings %]
60 [% IF r == member.ranking %]
61 <option selected="selected" value="[% r | html %]">[% r | html %]</option>
63 <option value="[% r | html %]">[% r | html %]</option>
68 <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>
74 <p style="margin-left:10em;">
75 <a href="#" id="add_recipients"><i class="fa fa-plus"></i> Add recipients</a>
77 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | html %]&op=delete"><i class="fa fa-trash"></i> Delete all</a>
82 <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
86 <fieldset class="action"><input type="submit" name="submit" value="Save" /></fieldset>
94 [% INCLUDE 'serials-menu.inc' %]
98 [% MACRO jsinclude BLOCK %]
99 <script type="text/javascript">
100 $(document).ready(function(){
101 $("#add_recipients").on("click",function(e){
105 $(".itemrank").on("change",function(){
106 var subscriptionid = $(this).data("subscriptionid");
107 var routingid = $(this).data("routingid");
108 reorder_item( subscriptionid, routingid, $(this).val());
111 function reorder_item(sid,rid,rank){
112 var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
113 window.location.href=mylocation;
116 function userPopup() {
117 window.open("/cgi-bin/koha/serials/add_user_search.pl",
119 'width=740,height=450,location=yes,toolbar=no,'
120 + 'scrollbars=yes,resize=yes'
124 function add_user(borrowernumber) {
125 var myurl = "routing.pl?subscriptionid="+[% subscriptionid | html %]+"&borrowernumber="+borrowernumber+"&op=add";
126 window.location.href = myurl;
131 [% INCLUDE 'intranet-bottom.inc' %]