Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketheader.tt
1 [% USE Asset %]
2 [% USE Branches %]
3 [% USE Koha %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Acquisitions &rsaquo;
7 [% IF ( add_form ) %]
8     [% IF ( basketno ) %]Edit basket '[% basketname %]'
9         [% ELSE %]Add a basket to [% booksellername %]
10     [% END %]
11 [% END %]
12 </title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15
16 <body id="acq_basketheader" class="acq">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'acquisitions-search.inc' %]
19
20 <div id="breadcrumbs">
21     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
22     <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
23     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo;
24     [% IF ( add_form ) %]
25         [% IF ( basketno ) %]Edit basket '[% basketname |html %]'
26         [% ELSE %]Add a basket to [% booksellername %]
27         [% END %]
28     [% END %]
29 </div>
30
31 <div class="main container-fluid">
32     <div class="row">
33         <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
34
35     [% IF ( add_form ) %]
36         [% IF ( basketno ) %]
37             <h1>Edit basket [% basketname |html %]</h1>
38         [% ELSE %]<h1>Add a basket to [% booksellername %]</h1>
39         [% END %]
40     <form name="Aform" action="[% script_name %]" method="post" class="validated">
41         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
42         <fieldset class="rows">
43             <ol>
44                 [% IF ( basketno ) %]
45                     <li>
46                         <input type="hidden" name="basketno" value="[% basketno %]" />
47                         <input type="hidden" name="is_an_edit" value="1" />
48                     </li>
49                 [% END %]
50                 <li>
51                     <label for="basketname" class="required">Basket name: </label> &nbsp;
52                         <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" required="required" class="required" />
53                         <span class="required">Required</span>
54                 </li>
55                  <li>
56                     <label for="billingplace">Billing place:</label>
57                     <select name="billingplace" id="billingplace">
58                         <option value="">--</option>
59                         [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
60                     </select>
61                 </li>
62                 <li>
63                     <label for="deliveryplace">Delivery place:</label>
64                     <select name="deliveryplace" id="deliveryplace">
65                         <option value="">--</option>
66                         [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
67                     </select>
68                 </li>
69                 <li>
70                     <label for="basketbooksellerid">Vendor: </label> &nbsp;
71                     <select name="basketbooksellerid" id="basketbooksellerid">
72                     [% FOREACH b IN booksellers %]
73                         [% IF booksellerid == b.id %]
74                            <option value="[% b.id %]" selected="selected">[% b.name %]</option>
75                         [% ELSE %]
76                            <option value="[% b.id %]">[% b.name %]</option>
77                         [% END %]
78                     [% END %]
79             </select>
80                 </li>
81                 <li>
82                     <label for="basketnote">Internal note: </label> &nbsp;
83                     <textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote |html %]</textarea>
84                 </li>
85                 <li>
86                     <label for="basketbooksellernote">Vendor note: </label> &nbsp;
87                     <textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote |html %]</textarea>
88                 </li>
89                 [% IF ( contractloop ) %]
90                     <li><label for="basketcontractnumber">Contract: </label>
91                         <select id="basketcontractnumber" name="basketcontractnumber">
92                             <option value=""></option>
93                             [% FOREACH contractloo IN contractloop %]
94                                 [% IF ( contractloo.selected ) %]
95                                     <option value="[% contractloo.contractnumber %]" selected="selected">[% contractloo.contractname %]</option>
96                                 [% ELSE %]
97                                      <option value="[% contractloo.contractnumber %]">[% contractloo.contractname %]</option>
98                                 [% END %]
99                             [% END %]
100                         </select>
101                     </li>
102                 [% END %]
103                 <li>
104                     <label for="is_standing">Orders are standing:</label>
105                     [% IF is_standing %]
106                         <input type="checkbox" id="is_standing" name="is_standing" checked="checked" />
107                     [% ELSE %]
108                         <input type="checkbox" id="is_standing" name="is_standing"/>
109                     [% END %]
110                     <div class="hint">Standing orders do not close when received.</div>
111                 </li>
112                 [% UNLESS basketno %]
113                  <li>
114                     <label for="create_items">Create items when:</label>
115                     <select name="create_items" id="create_items">
116                         [% SWITCH Koha.Preference('AcqCreateItem') %]
117                             [% CASE 'receiving' %]<option value="">use default (receiving an order)</option>
118                             [% CASE 'cataloguing' %]<option value="">use default (cataloging the record)</option>
119                             [% CASE %]<option value="">use default (placing an order)</option>
120                         [% END %]
121                         <option value="ordering">placing an order</option>
122                         <option value="receiving">receiving an order</option>
123                         <option value="cataloguing">cataloging the record</option>
124                     </select>
125                 </li>
126                 [% END %]
127             </ol>
128         </fieldset>
129         <fieldset class="action">
130             <input type="hidden" name="op" value="add_validate" />
131             <input type="submit" value="Save" />
132             [% IF ( basketno ) %]
133                 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
134             [% ELSE %]
135                 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a>
136             [% END %]
137         </fieldset>
138     </form>
139     [% END %]
140 </div>
141 </div>
142
143 [% MACRO jsinclude BLOCK %]
144     [% Asset.js("js/acquisitions-menu.js") %]
145     [% Asset.js("js/acq.js") %]
146 [% END %]
147
148 [% INCLUDE 'intranet-bottom.inc' %]