Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / edi_ean_accounts.tt
1 [% USE Asset %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Administration &rsaquo; Library EANs
5 [% IF ean_form %]
6   [% IF ean %]
7      &rsaquo; Modify library EAN
8   [% ELSE %]
9      &rsaquo; Add new library EAN
10   [% END %]
11 [% END %]
12 [% IF delete_confirm %]
13      &rsaquo; Confirm deletion of EAN
14 [% END %]
15 </title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 </head>
18 <body id="admin_edi_ean" class="admin">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'prefs-admin-search.inc' %]
21
22 <div id="breadcrumbs">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24  &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
25 [% IF ean_form %]
26   [% IF ean %]
27      &rsaquo; <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a> &rsaquo; Modify library EAN
28   [% ELSE %]
29      &rsaquo; <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a> &rsaquo; Add new library EAN
30   [% END %]
31 [% ELSIF delete_confirm %]
32      &rsaquo; <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a> &rsaquo; Confirm deletion of EAN
33 [% ELSE %]
34      &rsaquo; Library EANs
35 [% END %]
36 </div>
37
38 <div id="doc3" class="yui-t2">
39
40 <div id="bd">
41 <div id="yui-main">
42 <div class="yui-b">
43 [% IF display %]
44     <div id="toolbar" class="btn-toolbar">
45     <a class="btn btn-default btn-sm" id="newediean" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form">
46          <i class="fa fa-plus"></i>
47          New EAN
48     </a>
49     </div>
50 [% END %]
51
52 [% IF ean_form %]
53 <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" name="Eanform" method="post">
54   <input type="hidden" name="op" value="save" />
55   [% IF ean %]
56       <input type="hidden" name="oldbranchcode" value="[% ean.branch.branchcode %]" />
57       <input type="hidden" name="id" value="[% ean.id %]" />
58   [% END %]
59
60   <fieldset class="rows">
61       <legend>
62           [% IF ean %]
63              Modify EAN
64           [% ELSE %]
65             New EAN
66           [% END %]
67       </legend>
68
69       <ol>
70           <li>
71              <label for="branchcode">Library: </label>
72              <select name="branchcode" id="branchcode">
73                 [% FOREACH branch IN branches %]
74                     [% IF branch.branchcode == ean.branch.branchcode %]
75                        <option value="[% branch.branchcode %]" selected="selected">[% branch.branchname %]</option>
76                     [% ELSE %]
77                        <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
78                     [% END %]
79                 [% END %]
80               </select>
81           </li>
82           <li>
83              <label for="description">Description: </label>
84              <input type="text" name="description" id="description" size="30" maxlength="128" value="[% ean.description %]" />
85           </li>
86           <li>
87              <label for="ean">EAN: </label>
88              <input type="text" name="ean" id="ean" size="20" maxlength="15" value="[% ean.ean %]" />
89           </li>
90           <li>
91              <label for="id_code_qualifier">Qualifier: </label>
92              <select name="id_code_qualifier" id="id_code_qualifier">
93                  [% FOREACH qualifier IN code_qualifiers %]
94                     [% IF qualifier.code == ean.id_code_qualifier %]
95                        <option value="[% qualifier.code %]" selected="selected">
96                            [% qualifier.description %] ([% qualifier.code %])
97                        </option>
98                     [% ELSE %]
99                        <option value="[% qualifier.code %]">
100                           [% qualifier.description %] ([% qualifier.code %])
101                        </option>
102                     [% END %]
103                  [% END %]
104              </select>
105           </li>
106       </ol>
107   </fieldset>
108
109   <fieldset class="action">
110     <input type="submit" value="Submit"/>
111     <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl" class="cancel">Cancel</a>
112   </fieldset>
113 </form>
114 [% END %]
115
116 [% IF delete_confirm %]
117 <div class="dialog alert">
118 <h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3>
119 <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
120     <input type="hidden" name="op" value="delete_confirmed" />
121     <input type="hidden" name="id" value="[% ean.id %]" />
122     <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
123 </form>
124 <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get">
125     <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
126 </form>
127 </div>
128 [% END %]
129
130 [% IF display %]
131 [% IF ( eans ) %]
132     <h2>Library EANs</h2>
133     <table>
134         <tr>
135             <th>Library</th>
136             <th>Description</th>
137             <th>EAN</th>
138             <th>Qualifier</th>
139             <th>Actions</th>
140         </tr>
141         [% FOREACH ean IN eans %]
142             <tr>
143                 <td>[% ean.branch.branchname %]</td>
144                 <td>[% ean.description %]</td>
145                 <td>[% ean.ean %]</td>
146                 <td>
147                  [% FOREACH qualifier IN code_qualifiers %]
148                     [% IF qualifier.code == ean.id_code_qualifier %]
149                         [% qualifier.description %] ([% qualifier.code %])
150                     [% END %]
151                  [% END %]
152                 </td>
153                 <td class="actions">
154                     <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&id=[% ean.id %]"><i class="fa fa-pencil"></i> Edit</a>
155                     <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&id=[% ean.id %]"><i class="fa fa-trash"></i> Delete</a>
156                 </td>
157             </tr>
158         [% END %]
159     </table>
160 [% ELSE %]
161     <div class="dialog message">
162         There are no library EANs.
163     </div>
164 [% END %]
165 [% END %]
166
167 </div>
168 </div>
169 <div class="yui-b">
170     [% INCLUDE 'admin-menu.inc' %]
171 </div>
172 </div>
173
174 [% MACRO jsinclude BLOCK %]
175     [% Asset.js("js/admin-menu.js") %]
176 [% END %]
177 [% INCLUDE 'intranet-bottom.inc' %]