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