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 class="main container-fluid">
21 <div class="col-sm-10 col-sm-push-2">
23 [% INCLUDE 'blocking_errors.inc' %]
26 <h1>Create routing list for <i>[% title | html %]</i></h1>
28 <h1>Edit routing list for <i>[% title | html %]</i></h1>
31 <form method="post" action="routing.pl">
32 <input type="hidden" name="op" value="save" />
33 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
34 <fieldset class="rows">
36 <li><label for="date_selected">Issue: </label>
37 <select name="date_selected" id="date_selected">
38 [% FOREACH date IN dates %]
39 [% 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 %]
41 </select> [% issue | html %]</li>
44 <span class="label">Recipients:</span>
46 <table style="clear:none;margin:0;">
51 [% USE m_loop = iterator(memberloop) %]
52 [% FOREACH member IN m_loop %]
53 <tr><td>[% member.name | html %]</td>
55 <select name="itemrank" class="itemrank" data-subscriptionid="[% subscriptionid | html %]" data-routingid="[% member.routingid | html %]">
56 [% rankings = [1 .. m_loop.size] %]
57 [% FOREACH r IN rankings %]
58 [% IF r == member.ranking %]
59 <option selected="selected" value="[% r | html %]">[% r | html %]</option>
61 <option value="[% r | html %]">[% r | html %]</option>
66 <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>
72 <p style="margin-left:10em;">
73 <a href="#" id="add_recipients"><i class="fa fa-plus"></i> Add recipients</a>
75 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&op=delete"><i class="fa fa-trash"></i> Delete all</a>
80 <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
84 <fieldset class="action"><input type="submit" name="submit" value="Save" /></fieldset>
88 </div> <!-- /.col-sm-10.col-sm-push-2 -->
90 <div class="col-sm-2 col-sm-pull-10">
92 [% INCLUDE 'serials-menu.inc' %]
94 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
96 [% MACRO jsinclude BLOCK %]
98 $(document).ready(function(){
99 $("#add_recipients").on("click",function(e){
103 $(".itemrank").on("change",function(){
104 var subscriptionid = $(this).data("subscriptionid");
105 var routingid = $(this).data("routingid");
106 reorder_item( subscriptionid, routingid, $(this).val());
109 function reorder_item(sid,rid,rank){
110 var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
111 window.location.href=mylocation;
114 function userPopup() {
115 window.open("/cgi-bin/koha/serials/add_user_search.pl",
117 'width=740,height=450,location=yes,toolbar=no,'
118 + 'scrollbars=yes,resize=yes'
122 function add_user(borrowernumber) {
123 var myurl = "routing.pl?subscriptionid="+[% subscriptionid | html %]+"&borrowernumber="+borrowernumber+"&op=add";
124 window.location.href = myurl;
129 [% INCLUDE 'intranet-bottom.inc' %]