Bug 24201: (QA follow-up) Replace library select
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / set-library.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Branches %]
4 [% USE Desks %]
5 [% USE Koha %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 [% IF Koha.Preference('UseCirculationDesks') %]
9 <title>Koha &rsaquo; Circulation &rsaquo; Set library and desk</title>
10 [% ELSE %]
11 <title>Koha &rsaquo; Circulation &rsaquo; Set library</title>
12 [% END %]
13 [% INCLUDE 'doc-head-close.inc' %]
14 <style>
15     .noshow {display: none;}
16 </style>
17 </head>
18 <body id="circ_set-library" class="circ">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'circ-search.inc' %]
21
22 <div id="breadcrumbs">
23          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
25 &rsaquo; <a href="/cgi-bin/koha/circ/set-library.pl">Set library</a>
26 </div>
27
28 <div class="main container-fluid">
29     <div class="row">
30         <div class="col-sm-12">
31             <main>
32                 <div class="row">
33
34                 [% IF Koha.Preference('CircSidebar') %]
35                     <div class="col-sm-10 col-sm-push-2">
36                 [% ELSE %]
37                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
38                 [% END %]
39
40
41 [% IF ( updated ) %]
42
43 <h2>Update succeeded</h2>
44 Updated:<ul>
45     [% FOREACH update IN updated %]
46     [% IF ( update.updated_branch ) %]
47         <li>Library: [% update.old_branch or "?" | html %] &rArr; [% update.new_branch or "?" | html %]</li>
48     [% ELSIF (update.updated_desk) %]
49         <li>Desk: [% update.old_desk or "?" | html %] &rArr; [% LoginDeskname or "?" | html %]</li>
50     [% ELSE %]
51         <li>ERROR - unknown</li>
52     [% END %]
53     [% END %]
54     </ul>
55 <form method="post" action="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]">
56     <div class="noshow">
57         [% FOREACH recycle_loo IN recycle_loop %]
58         <input type="text" name="[% recycle_loo.param | html %]" value="[% recycle_loo.value | html %]" />
59         [% END %]
60     </div>
61     <button type="submit">Continue</button>
62 </form>
63
64 [% ELSE %]
65
66 <form method="post" action="set-library.pl">
67 [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
68 <fieldset class="rows">
69     <legend>Set library</legend>
70     <ol>
71         <li><label for="branch">Choose library:</label>
72         <select name="branch" id="branch">
73             [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
74         </select></li>
75     </ol>
76 </fieldset>
77 [% ELSE %]
78 <select name="branch" id="branch" style="visibility:hidden;">
79     [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
80 </select>
81 [% END %]
82
83 [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
84 <fieldset class="rows">
85     <legend>Set desk</legend>
86     <ol>
87         <li><label for="desk">Choose desk:</label>
88         <select name="desk_id" id="desk_id">
89             [% PROCESS options_for_desks desks => Desks.all(), selected => desk_id  %]
90         </select></li>
91     </ol>
92 </fieldset>
93 [% END %]
94 <fieldset class="action">
95     <input type="submit" value="Submit" />
96     <a class="cancel" id="cancel_set_library" href="[% referer or '/cgi-bin/koha/circ/circulation.pl' %]">Cancel</a>
97 </fieldset>
98 <div class="noshow">
99     [% FOREACH recycle_loo IN recycle_loop %]
100     <input type="text" name="[% recycle_loo.param | html %]" value="[% recycle_loo.value | html %]" />
101     [% END %]
102     <input type="hidden" name="oldreferer" value="[% referer or "/cgi-bin/koha/circ/circulation.pl" %]" />
103 </div>
104 </form>
105 <!-- /updated -->
106 [% END %]
107
108                     [% IF Koha.Preference('CircSidebar') %]
109                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
110                             <div class="col-sm-2 col-sm-pull-10">
111                                 <aside>
112                                     [% INCLUDE 'circ-nav.inc' %]
113                                 </aside>
114                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
115                         </div> <!-- /.row -->
116                     [% END %]
117
118             </main>
119         </div> <!-- /.col-sm-12 -->
120     </div> <!-- /.row -->
121
122
123 [% MACRO jsinclude BLOCK %]
124   [% Asset.js("js/desk_selection.js") | $raw %]
125 [% END %]
126
127 [% INCLUDE 'intranet-bottom.inc' %]