Bug 27631: (follow-up) Various corrections
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / edi_ean_accounts.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>
6 [% IF ean_form %]
7     [% IF ean %]
8         Modify library EAN
9     [% ELSE %]
10         Add new library EAN
11     [% END %] &rsaquo; [% END %]
12 [% IF delete_confirm %]
13     Confirm deletion of EAN &rsaquo; [% END %]
14 Library EANs &rsaquo; Administration &rsaquo; Koha
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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23     <ol>
24         <li>
25             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26         </li>
27         <li>
28             <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
29         </li>
30
31         [% IF ean_form %]
32             <li>
33                 <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a>
34             </li>
35             <li>
36                 <a href="#" aria-current="page">
37                     [% IF ean %]
38                         Modify library EAN
39                     [% ELSE %]
40                         Add new library EAN
41                     [% END %]
42                 </a>
43             </li>
44
45         [% ELSIF delete_confirm %]
46             <li>
47                 <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a>
48             </li>
49             <li>
50                 <a href="#" aria-current="page">
51                     Confirm deletion of EAN
52                 </a>
53             </li>
54
55         [% ELSE %]
56             <li>
57                 <a href="#" aria-current="page">
58                     Library EANs
59                 </a>
60             </li>
61         [% END %]
62     </ol>
63 </nav>
64
65 <div class="main container-fluid">
66     <div class="row">
67         <div class="col-sm-10 col-sm-push-2">
68             <main>
69
70 [% IF display %]
71     <div id="toolbar" class="btn-toolbar">
72     <a class="btn btn-default" id="newediean" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form">
73          <i class="fa fa-plus"></i>
74          New EAN
75     </a>
76     </div>
77 [% END %]
78
79 [% IF ean_form %]
80 <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" name="Eanform" method="post">
81   <input type="hidden" name="op" value="save" />
82   [% IF ean %]
83       <input type="hidden" name="oldbranchcode" value="[% ean.branch.branchcode | html %]" />
84       <input type="hidden" name="id" value="[% ean.id | html %]" />
85   [% END %]
86
87   <fieldset class="rows">
88       <legend>
89             <h1>
90                 [% IF ean %]
91                     Modify EAN
92                 [% ELSE %]
93                     New EAN
94                 [% END %]
95             </h1>
96       </legend>
97
98       <ol>
99           <li>
100              <label for="branchcode">Library: </label>
101              <select name="branchcode" id="branchcode">
102                 <option value="">All libraries</option>
103                 [% FOREACH branch IN branches %]
104                     [% IF branch.branchcode == ean.branch.branchcode %]
105                        <option value="[% branch.branchcode | html %]" selected="selected">[% branch.branchname | html %]</option>
106                     [% ELSE %]
107                        <option value="[% branch.branchcode | html %]">[% branch.branchname | html %]</option>
108                     [% END %]
109                 [% END %]
110               </select>
111           </li>
112           <li>
113              <label for="description">Description: </label>
114              <input type="text" name="description" id="description" size="30" maxlength="128" value="[% ean.description | html %]" />
115           </li>
116           <li>
117              <label for="ean">EAN: </label>
118              <input type="text" name="ean" id="ean" size="20" maxlength="15" value="[% ean.ean | html %]" />
119           </li>
120           <li>
121              <label for="id_code_qualifier">Qualifier: </label>
122              <select name="id_code_qualifier" id="id_code_qualifier">
123                  [% FOREACH qualifier IN code_qualifiers %]
124                     [% IF qualifier.code == ean.id_code_qualifier %]
125                        <option value="[% qualifier.code | html %]" selected="selected">
126                            [% qualifier.description | html %] ([% qualifier.code | html %])
127                        </option>
128                     [% ELSE %]
129                        <option value="[% qualifier.code | html %]">
130                           [% qualifier.description | html %] ([% qualifier.code | html %])
131                        </option>
132                     [% END %]
133                  [% END %]
134              </select>
135           </li>
136       </ol>
137   </fieldset>
138
139   <fieldset class="action">
140     <input type="submit" value="Submit"/>
141     <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl" class="cancel">Cancel</a>
142   </fieldset>
143 </form>
144 [% END %]
145
146 [% IF delete_confirm %]
147 <div class="dialog alert">
148 <h1>Delete EAN [% ean.ean | html %] for [% ean.branch.branchname | html %]?</h1>
149 <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
150     <input type="hidden" name="op" value="delete_confirmed" />
151     <input type="hidden" name="id" value="[% ean.id | html %]" />
152     <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
153 </form>
154 <form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="get">
155     <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
156 </form>
157 </div>
158 [% END %]
159
160 [% IF display %]
161     <h1>Library EANs</h1>
162 [% IF ( eans ) %]
163     <table>
164         <tr>
165             <th>Library</th>
166             <th>Description</th>
167             <th>EAN</th>
168             <th>Qualifier</th>
169             <th class="noExport">Actions</th>
170         </tr>
171         [% FOREACH ean IN eans %]
172             <tr>
173                 [% IF ean.branch %]
174                 <td>[% ean.branch.branchname | html %]</td>
175                 [% ELSE %]
176                 <td>All libraries</td>
177                 [% END %]
178                 <td>[% ean.description | html %]</td>
179                 <td>[% ean.ean | html %]</td>
180                 <td>
181                  [% FOREACH qualifier IN code_qualifiers %]
182                     [% IF qualifier.code == ean.id_code_qualifier %]
183                         [% qualifier.description | html %] ([% qualifier.code | html %])
184                     [% END %]
185                  [% END %]
186                 </td>
187                 <td class="actions">
188                     <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&id=[% ean.id | html %]"><i class="fa fa-pencil"></i> Edit</a>
189                     <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&id=[% ean.id | html %]"><i class="fa fa-trash"></i> Delete</a>
190                 </td>
191             </tr>
192         [% END %]
193     </table>
194 [% ELSE %]
195     <div class="dialog message">
196         There are no library EANs.
197     </div>
198 [% END %]
199 [% END %]
200
201             </main>
202         </div> <!-- /.col-sm-10.col-sm-push-2 -->
203
204         <div class="col-sm-2 col-sm-pull-10">
205             <aside>
206                 [% INCLUDE 'admin-menu.inc' %]
207             </aside>
208         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
209      </div> <!-- /.row -->
210
211 [% MACRO jsinclude BLOCK %]
212     [% Asset.js("js/admin-menu.js") | $raw %]
213 [% END %]
214 [% INCLUDE 'intranet-bottom.inc' %]