3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>[% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %] › [% title | html %] › Serials › Koha</title>
5 [% INCLUDE 'doc-head-close.inc' %]
7 <body id="ser_routing" class="ser">
8 [% INCLUDE 'header.inc' %]
9 [% INCLUDE 'serials-search.inc' %]
11 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
14 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
17 [% IF blocking_error %]
19 <a href="#" aria-current="page">
26 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
29 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><em>[% title | html %]</em></a>
32 <a href="#" aria-current="page">
44 <div class="main container-fluid">
46 <div class="col-sm-10 col-sm-push-2">
48 [% INCLUDE 'blocking_errors.inc' %]
51 <h1>Create routing list for <em>[% title | html %]</em></h1>
53 <h1>Edit routing list for <em>[% title | html %]</em></h1>
56 <form method="post" action="routing.pl">
57 <input type="hidden" name="op" value="save" />
58 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
59 <fieldset class="rows">
61 <li><label for="date_selected">Issue: </label>
62 <select name="date_selected" id="date_selected">
63 [% FOREACH date IN dates %]
64 [% IF ( date.selected ) %]
65 <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])" selected="selected">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
67 <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
70 </select> [% issue | html %]</li>
73 <span class="label">Recipients:</span>
75 <table style="clear:none;margin:0;">
80 [% USE m_loop = iterator(memberloop) %]
81 [% FOREACH member IN m_loop %]
82 <tr><td>[% member.name | html %]</td>
84 <select name="itemrank" class="itemrank" data-subscriptionid="[% subscriptionid | html %]" data-routingid="[% member.routingid | html %]">
85 [% rankings = [1 .. m_loop.size] %]
86 [% SET cur_rank = loop.count() %]
87 [% FOREACH r IN rankings %]
88 [% IF r == cur_rank %]
89 <option selected="selected" value="[% r | html %]">[% r | html %]</option>
91 <option value="[% r | html %]">[% r | html %]</option>
96 <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>
102 <p style="margin-left:10em;">
103 <a href="#" id="add_recipients"><i class="fa fa-plus"></i> Add recipients</a>
105 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&op=delete"><i class="fa fa-trash"></i> Delete all</a>
110 <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
114 <fieldset class="action"><input type="submit" name="submit" value="Save" /></fieldset>
118 </div> <!-- /.col-sm-10.col-sm-push-2 -->
120 <div class="col-sm-2 col-sm-pull-10">
122 [% INCLUDE 'serials-menu.inc' %]
124 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
125 </div> <!-- /.row -->
126 [% MACRO jsinclude BLOCK %]
128 $(document).ready(function(){
129 $("#add_recipients").on("click",function(e){
133 $(".itemrank").on("change",function(){
134 var subscriptionid = $(this).data("subscriptionid");
135 var routingid = $(this).data("routingid");
136 reorder_item( subscriptionid, routingid, $(this).val());
139 function reorder_item(sid,rid,rank){
140 var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
141 window.location.href=mylocation;
144 function userPopup() {
145 window.open("/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add",
147 'width=740,height=450,location=yes,toolbar=no,'
148 + 'scrollbars=yes,resize=yes'
152 function add_user(borrowernumber) {
153 var myurl = "/cgi-bin/koha/serials/routing.pl?subscriptionid="+[% subscriptionid | html %]+"&borrowernumber="+borrowernumber+"&op=add";
154 window.location.href = myurl;
159 [% INCLUDE 'intranet-bottom.inc' %]