Bug 27846: (follow-up) Add id back to breadcrumbs container
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / edi_accounts.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Administration &rsaquo; EDI accounts
6 [% IF acct_form %]
7   [% IF account %]
8      &rsaquo; Modify account
9   [% ELSE %]
10      &rsaquo; Add new account
11   [% END %]
12 [% END %]
13 [% IF delete_confirm %]
14      &rsaquo; Confirm deletion of account
15 [% END %]
16 </title>
17 [% INCLUDE 'doc-head-close.inc' %]
18 </head>
19 <body id="admin_edi_acct" class="admin">
20 [% INCLUDE 'header.inc' %]
21 [% INCLUDE 'prefs-admin-search.inc' %]
22
23 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
24     <ol>
25         <li>
26             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
27         </li>
28         <li>
29             <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
30         </li>
31
32         [% IF acct_form %]
33             <li>
34                 <a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a>
35             </li>
36             [% IF account %]
37                 <li>
38                     <a href="#" aria-current="page">
39                         Modify account
40                     </a>
41                 </li>
42             [% ELSE %]
43                 <li>
44                     <a href="#" aria-current="page">
45                         Add new account
46                     </a>
47                 </li>
48             [% END %]
49
50         [% ELSIF delete_confirm %]
51             <li>
52                 <a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a>
53             </li>
54             <li>
55                 <a href="#" aria-current="page">
56                     Confirm deletion of account
57                 </a>
58             </li>
59
60         [% ELSE %]
61             <li>
62                 <a href="#" aria-current="page">
63                     EDI accounts
64                 </a>
65             </li>
66         [% END %]
67     </ol>
68 </nav>
69
70 <div class="main container-fluid">
71     <div class="row">
72         <div class="col-sm-10 col-sm-push-2">
73             <main>
74
75 [% IF display %]
76     <div id="toolbar" class="btn-toolbar">
77     <a class="btn btn-default" id="newediacct" href="/cgi-bin/koha/admin/edi_accounts.pl?op=acct_form">
78          <i class="fa fa-plus"></i>
79          New account
80     </a>
81     </div>
82 [% END %]
83
84 [% IF acct_form %]
85 <form action="/cgi-bin/koha/admin/edi_accounts.pl" name="Actform" method="post">
86   <input type="hidden" name="op" value="save" />
87   [% IF account %]
88   <input type="hidden" name="id" value="[% account.id | html %]" />
89   [% END %]
90   <fieldset class="rows">
91   <legend>
92   [% IF account %]
93      Modify account
94   [% ELSE %]
95     New account
96   [% END %]
97   </legend>
98
99   <ol>
100   <li>
101      <label for="vendor_id">Vendor: </label>
102      <select name="vendor_id" id="vendor_id">
103      [% FOREACH vendor IN vendors %]
104        [% IF account.vendor_id == vendor.id %]
105           <option value="[% vendor.id | html %]" selected="selected">[% vendor.name | html %]</option>
106        [% ELSE %]
107           <option value="[% vendor.id | html %]">[% vendor.name | html %]</option>
108        [% END %]
109      [% END %]
110      </select>
111   </li>
112   [% IF plugins %]
113   <li>
114      <label for="plugin">Plugin: </label>
115      <select name="plugin" id="plugin">
116         <option value="">Do not use plugin</option>
117         [% FOREACH plugin IN plugins %]
118             [% IF account.plugin == plugin.class %]
119                 <option value="[% plugin.class | html %]" selected="selected">[% plugin.metadata.name | html %]</option>
120             [% ELSE %]
121                 <option value="[% plugin.class | html %]">[% plugin.metadata.name | html %]</option>
122             [% END %]
123         [% END %]
124      </select>
125   </li>
126   [% ELSE %]
127   <input type="hidden" name="plugin" value="" />
128   [% END %]
129   <li>
130      <label for="description">Description: </label>
131      <input type="text" name="description" id="description" size="20" value="[% account.description | html %]" />
132   </li>
133   <li>
134      [% transport_types = [ 'FTP', 'SFTP', 'FILE' ] %]
135      <label for="transport">Transport: </label>
136      <select name="transport" title="valid types of transport are FTP and SFTP"
137       id="transport">
138       [% FOREACH transport_type IN transport_types %]
139            [% IF transport_type == account.transport %]
140               <option value="[% transport_type | html %]" selected="selected">[% transport_type | html %]</option>
141            [% ELSE %]
142               <option value="[% transport_type | html %]">[% transport_type | html %]</option>
143            [% END %]
144        [% END %]
145      </select>
146   </li>
147   <li>
148      <label for="host">Remote host: </label>
149      <input type="text" name="host" id="host" size="20" maxlength="40" value="[% account.host | html %]" />
150   </li>
151   <li>
152      <label for="username">Username: </label>
153      <input type="text" name="username" id="username" size="20" maxlength="40" value="[% account.username | html %]" />
154   </li>
155   <li>
156      <label for="password">Password: </label>
157      <input type="text" name="password" id="password" size="20" maxlength="40" value="[% account.password | html %]" />
158   </li>
159   <li>
160      <label for="download_directory">Download directory: </label>
161      <input type="text" name="download_directory" id="download_directory" size="20" value="[% account.download_directory | html %]" />
162         <div class="hint">The download directory specifies the directory on the ftp site from which quotes and invoices are downloaded.</div>
163   </li>
164   <li>
165      <label for="upload_directory">Upload directory: </label>
166      <input type="text" name="upload_directory" id="upload_directory" size="20" value="[% account.upload_directory | html %]" />
167         <div class="hint">The upload directory specifies the directory on the ftp site to which orders are uploaded.</div>
168   </li>
169   <li>
170      <label for="id_code_qualifier">Qualifier:</label>
171      <select name="id_code_qualifier" id="id_code_qualifier">
172      [% FOREACH qualifier IN code_qualifiers %]
173         [% IF qualifier.code == account.id_code_qualifier %]
174            <option value="[% qualifier.code | html %]" selected="selected">
175                [% qualifier.description | html %] ([% qualifier.code | html %])
176            </option>
177         [% ELSE %]
178            <option value="[% qualifier.code | html %]">
179               [% qualifier.description | html %] ([% qualifier.code | html %])
180            </option>
181         [% END %]
182      [% END %]
183    </select>
184   </li>
185   <li>
186      <label for="san">SAN: </label>
187      <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san | html %]" />
188   </li>
189   <li>
190      <label for="quotes_enabled">Quotes enabled: </label>
191       [% IF account.quotes_enabled %]
192      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="1" checked="checked" />
193       [% ELSE %]
194      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="1" />
195       [% END %]
196   </li>
197   <li>
198      <label for="orders_enabled">Orders enabled: </label>
199 [% IF account.orders_enabled %]
200      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="1" checked="checked" />
201 [% ELSE %]
202      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="1" />
203 [% END %]
204   </li>
205   <li>
206      <label for="invoices_enabled">Invoices enabled: </label>
207 [% IF account.invoices_enabled %]
208      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="1" checked="checked" />
209 [% ELSE %]
210      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="1" />
211 [% END %]
212   </li>
213   <li>
214      <label for="responses_enabled">Responses enabled: </label>
215 [% IF account.responses_enabled %]
216      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="1" checked="checked" />
217 [% ELSE %]
218      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="1" />
219 [% END %]
220   </li>
221   <li>
222      <label for="auto_orders">Automatic ordering: </label>
223 [% IF account.auto_orders %]
224      <input type="checkbox" name="auto_orders" id="auto_orders" value="1" checked="checked" />
225 [% ELSE %]
226      <input type="checkbox" name="auto_orders" id="auto_orders" value="1" />
227 [% END %]
228     <div class="hint">
229         With automatic ordering quotes generate orders without staff intervention.
230     </div>
231   </li>
232   </ol>
233   </fieldset>
234
235   <fieldset class="action">
236     <input type="submit" value="Submit" />
237     <a href="/cgi-bin/koha/admin/edi_accounts.pl" class="cancel">Cancel</a>
238   </fieldset>
239 </form>
240
241 [% END %]
242 [% IF delete_confirm %]
243 <div class="dialog alert">
244 <h3>Delete this account?</h3>
245 <table>
246     <tr>
247     <th>Vendor</th>
248     <td>[% account.vendor.name | html %]</td>
249     </tr>
250     <tr>
251     <th>Description</th>
252     <td>[% account.description | html %]</td>
253     </tr>
254     <tr>
255     <th>SAN</th>
256     <td>[% account.san | html %]</td>
257     </tr>
258 </table>
259 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="post">
260     <table>
261     </table>
262     <input type="hidden" name="op" value="delete_confirmed" />
263     <input type="hidden" name="id" value="[% account.id | html %]" />
264     <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
265 </form>
266 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="get">
267     <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
268 </form>
269 </div>
270 [% END %]
271 [% IF display %]
272 [% IF ( ediaccounts ) %]
273 <h2>Vendor EDI accounts</h2>
274
275     <table>
276     <tr>
277        <th>ID</th>
278        <th>Vendor</th>
279        <th>Description</th>
280        <th>Transport</th>
281        <th>Remote host</th>
282        <th>Username</th>
283        <th>Password</th>
284        <th>Download directory</th>
285        <th>Upload directory</th>
286        <th>Qualifier</th>
287        <th>SAN</th>
288        <th>Quotes</th>
289        <th>Orders</th>
290        <th>Invoices</th>
291        <th>Responses</th>
292        <th>Auto ordering</th>
293        <th class="noExport">Actions</th>
294     </tr>
295     [% FOREACH account IN ediaccounts %]
296     <tr>
297       <td>[% account.id | html %]</td>
298       <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% account.vendor_id | uri %]">[% account.vendor.name | html %]</a></td>
299       <td>[% account.description | html %]</td>
300       <td>[% account.transport | html %]</td>
301       <td>[% account.host | html %]</td>
302       <td>[% account.username | html %]</td>
303       <td>[% IF account.password %]*****[% END %]</td>
304       <td>[% account.download_directory | html %]</td>
305       <td>[% account.upload_directory | html %]</td>
306       <td>
307          [% FOREACH qualifier IN code_qualifiers %]
308             [% IF qualifier.code == account.id_code_qualifier %]
309                    [% qualifier.description | html %]
310             [% END %]
311          [% END %]
312          ([% account.id_code_qualifier | html %])
313      </td>
314       <td>[% account.san | html %]</td>
315       [% IF account.quotes_enabled %]
316          <td>Yes</td>
317       [% ELSE %]
318          <td>No</td>
319       [% END %]
320       [% IF account.orders_enabled %]
321          <td>Yes</td>
322       [% ELSE %]
323          <td>No</td>
324       [% END %]
325       [% IF account.invoices_enabled %]
326          <td>Yes</td>
327       [% ELSE %]
328          <td>No</td>
329       [% END %]
330       [% IF account.responses_enabled %]
331          <td>Yes</td>
332       [% ELSE %]
333          <td>No</td>
334       [% END %]
335       [% IF account.auto_orders %]
336          <td>Yes</td>
337       [% ELSE %]
338          <td>No</td>
339       [% END %]
340       <td class="actions">
341           <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_accounts.pl?op=acct_form&id=[% account.id | html %]"><i class="fa fa-pencil"></i> Edit</a> <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_accounts.pl?op=delete_confirm&id=[% account.id | html %]"><i class="fa fa-trash"></i> Delete</a>
342       </td>
343     </tr>
344     [% END %]
345     </table>
346     [% ELSE %]
347         <div class="dialog message">
348             There are no EDI accounts.
349         </div>
350     [% END %]
351 [% END %]
352
353             </main>
354         </div> <!-- /.col-sm-10.col-sm-push-2 -->
355
356         <div class="col-sm-2 col-sm-pull-10">
357             <aside>
358                 [% INCLUDE 'admin-menu.inc' %]
359             </aside>
360         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
361      </div> <!-- /.row -->
362
363 [% MACRO jsinclude BLOCK %]
364     [% Asset.js("js/admin-menu.js") | $raw %]
365 [% END %]
366 [% INCLUDE 'intranet-bottom.inc' %]