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