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