Bug 25744: replace <b> with <strong> in the staff interface
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / routing.tt
1 [% USE KohaDates %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Serials &rsaquo; [% title | html %] &rsaquo; [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 </head>
7 <body id="ser_routing" class="ser">
8 [% INCLUDE 'header.inc' %]
9 [% INCLUDE 'serials-search.inc' %]
10
11 <div id="breadcrumbs">
12     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
13     &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
14     [% UNLESS blocking_error %]
15         &rsaquo; <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><em>[% title | html %]</em></a>
16         &rsaquo; [% IF ( op ) %]Create routing list[% ELSE %]Edit routing list[% END %]
17     [% END %]
18 </div>
19
20 <div class="main container-fluid">
21     <div class="row">
22         <div class="col-sm-10 col-sm-push-2">
23             <main>
24 [% INCLUDE 'blocking_errors.inc' %]
25
26 [% IF ( op ) %]
27 <h1>Create routing list for <em>[% title | html %]</em></h1>
28 [% ELSE %]
29 <h1>Edit routing list for <em>[% title | html %]</em></h1>
30 [% END %]
31
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">
36         <ol>
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>
42         [% ELSE %]
43             <option value="[% date.serialseq | html %] ([% date.publisheddate | html %])">[% date.serialseq | html %] ([% date.publisheddate | $KohaDates %])</option>
44         [% END %]
45 [% END %]
46 </select> [% issue | html %]</li>
47
48 <li>
49     <span class="label">Recipients:</span>
50     [% IF memberloop %]
51         <table style="clear:none;margin:0;">
52             <tr><th>Name</th>
53                 <th>Rank</th>
54                 <th>Delete</th>
55             </tr>
56             [% USE m_loop = iterator(memberloop) %]
57             [% FOREACH member IN m_loop %]
58             <tr><td>[% member.name | html %]</td>
59                 <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>
66                         [% ELSE %]
67                           <option value="[% r | html %]">[% r | html %]</option>
68                         [% END %]
69                     [% END %]
70                     </select>
71                 </td>
72                 <td><a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/routing.pl?routingid=[% member.routingid | html %]&amp;subscriptionid=[% subscriptionid | html %]&amp;op=delete"><i class="fa fa-trash"></i> Delete</a></td>
73             </tr>
74             [% END %]
75         </table>
76     [% END %]
77
78     <p style="margin-left:10em;">
79         <a href="#" id="add_recipients"><i class="fa fa-plus"></i> Add recipients</a>
80         [% IF memberloop %]
81             <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid | uri %]&amp;op=delete"><i class="fa fa-trash"></i> Delete all</a>
82         [% END %]
83     </p>
84 </li>
85
86         <li><label for="notes">Notes:</label><textarea name="notes" id="notes" rows="3" cols="50">[% routingnotes | html %]</textarea></li>
87         </ol>
88
89 </fieldset>
90 <fieldset class="action"><input type="submit" name="submit" value="Save" /></fieldset>
91 </form>
92
93             </main>
94         </div> <!-- /.col-sm-10.col-sm-push-2 -->
95
96         <div class="col-sm-2 col-sm-pull-10">
97             <aside>
98                 [% INCLUDE 'serials-menu.inc' %]
99             </aside>
100         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
101      </div> <!-- /.row -->
102 [% MACRO jsinclude BLOCK %]
103     <script>
104         $(document).ready(function(){
105             $("#add_recipients").on("click",function(e){
106                 e.preventDefault();
107                 userPopup();
108             });
109             $(".itemrank").on("change",function(){
110                 var subscriptionid = $(this).data("subscriptionid");
111                 var routingid = $(this).data("routingid");
112                 reorder_item( subscriptionid, routingid, $(this).val());
113             });
114         });
115         function reorder_item(sid,rid,rank){
116             var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
117             window.location.href=mylocation;
118         }
119
120         function userPopup() {
121             window.open("/cgi-bin/koha/serials/add_user_search.pl",
122                 'PatronPopup',
123                 'width=740,height=450,location=yes,toolbar=no,'
124                 + 'scrollbars=yes,resize=yes'
125             );
126         }
127
128         function add_user(borrowernumber) {
129             var myurl = "routing.pl?subscriptionid="+[% subscriptionid | html %]+"&borrowernumber="+borrowernumber+"&op=add";
130             window.location.href = myurl;
131         }
132     </script>
133 [% END %]
134
135 [% INCLUDE 'intranet-bottom.inc' %]