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