Bug 30733: Simplify translatable strings
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / authtypes.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>
6 [% IF op == 'add_form' %]
7     [% IF authority_type.authtypecode.defined %]
8         Modify authority type
9     [% ELSE %]
10         New authority type
11     [% END %] &rsaquo; [% ELSIF op == 'delete_confirm' %]
12     Confirm deletion of authority type &rsaquo; [% END %]
13 Authority types &rsaquo; Administration &rsaquo; Koha
14 </title>
15 [% INCLUDE 'doc-head-close.inc' %]
16 </head>
17
18 <body id="admin_authtypes" 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 op == 'add_form' %]
32             <li>
33                 <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
34             </li>
35             <li>
36                 <a href="#" aria-current="page">
37                     [% IF authority_type.authtypecode.defined %]
38                         <span>Modify</span>
39                     [% ELSE %]
40                         <span>New</span>
41                     [% END %] <span>Authority type</span>
42                 </a>
43             </li>
44
45         [% ELSIF op == 'delete_confirm' %]
46             <li>
47                 <a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
48             </li>
49             <li>
50                 <a href="#" aria-current="page">
51                     Confirm deletion of authority type
52                 </a>
53             </li>
54
55         [% ELSE %]
56             <li>
57                 <a href="#" aria-current="page">Authority types</a>
58             </li>
59         [% END %]
60     </ol>
61 </nav>
62
63 <div class="main container-fluid">
64     <div class="row">
65         <div class="col-sm-10 col-sm-push-2">
66             <main>
67
68 [% FOR m IN messages %]
69     <div class="dialog [% m.type | html %]">
70         [% SWITCH m.code %]
71         [% CASE 'error_on_update' %]
72             <span>An error occurred when updating this authority type. Perhaps it already exists.</span>
73         [% CASE 'error_on_insert' %]
74             <span>An error occurred when adding this authority type. The authority type code might already exist.</span>
75         [% CASE 'error_on_delete' %]
76             <span>An error occurred when deleting this authority type. Check the logs.</span>
77         [% CASE 'success_on_update' %]
78             <span>Authority type updated successfully.</span>
79         [% CASE 'success_on_insert' %]
80             <span>Authority type added successfully.</span>
81         [% CASE 'success_on_delete' %]
82             <span>Authority type deleted successfully.</span>
83         [% CASE %]
84             [% m.code | html %]
85         [% END %]
86     </div>
87 [% END %]
88
89
90
91 [% IF op == 'add_form' %]
92     <form action="/cgi-bin/koha/admin/authtypes.pl" name="Aform" method="post" class="validated">
93         <fieldset class="rows">
94             <legend>
95                 <h1>
96                 [% IF authority_type.authtypecode.defined %]
97                     Modify authority type
98                 [% ELSE %]
99                     New authority type
100                 [% END %]
101                 </h1>
102             </legend>
103             <ol>
104                 <li>
105                     [% IF authority_type.authtypecode.defined %]
106                             <span class="label">Authority type</span>
107                             <input type="hidden" name="op" value="add_validate" />
108                             <input type="hidden" name="checked" value="0" />
109                             <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode | html %]" />[% authority_type.authtypecode | html %]
110                     [% ELSE %]
111                             <div class="hint">10 characters maximum</div>
112                             <label for="authtypecode" class="required">Authority type: </label>
113                             <input id="authtypecode" type="text" class="required" required="required" name="authtypecode" size="20" maxlength="10" />
114                             <span class="required">Required</span>
115                     [% END %]
116                 </li>
117                 <li>
118                     <label for="authtypetext" class="required">Description: </label>
119                     <input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="[% authority_type.authtypetext | html %]" class="required" required="required" />
120                     <span class="required">Required</span>
121                 </li>
122                 <li>
123                     <label for="summary">Summary: </label>
124                     <textarea id="summary" name="summary" cols="55" rows="7">[% authority_type.summary | html %]</textarea>
125                 </li>
126                 <li>
127                     <div class="hint">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</div>
128                     <label for="auth_tag_to_report">Authority field to copy: </label>
129                     <input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="[% authority_type.auth_tag_to_report | html %]" />
130                     <input type="hidden" name="op" value="add_validate" />
131                     [% IF authority_type.authtypecode.defined %]
132                         <input type="hidden" name="is_a_modif" value="1" />
133                     [% END %]
134                 </li>
135             </ol>
136         </fieldset>
137         <fieldset class="action">
138             <input type="submit" value="Submit" />
139             <a class="cancel" href="/cgi-bin/koha/admin/authtypes.pl">Cancel</a>
140         </fieldset>
141     </form>
142 [% END %]
143
144 [% IF op == 'delete_confirm' %]
145     <div class="dialog alert">
146         [% IF authorities_using_it %]
147             <h1>This authority type cannot be deleted</h1>
148             <p>This record is used <strong>[% authorities_using_it | html %]</strong> times</p>
149             <a class="cancel" href="/cgi-bin/koha/admin/authtypes.pl">Back to the list</a>
150         [% ELSE %]
151             <h1>Confirm deletion of authority structure definition for <span class="ex">'[% authority_type.authtypetext | html %]' ([% authority_type.authtypecode | html %])</span></h1>
152             <form action="/cgi-bin/koha/admin/authtypes.pl" method="post">
153                 <input type="hidden" name="op" value="delete_confirmed" />
154                 <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode | html %]" />
155                 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
156             </form>
157             <form action="/cgi-bin/koha/admin/authtypes.pl" method="get">
158                 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
159             </form>
160         [% END %]
161     </div>
162 [% END %]
163
164 [% IF op == 'list' %]
165     <div id="toolbar" class="btn-toolbar">
166         <a id="authtype" class="btn btn-default" href="/cgi-bin/koha/admin/authtypes.pl?op=add_form"><i class="fa fa-plus"></i> New authority type</a>
167     </div>
168
169     <h1>Authority types</h1>
170     <p>Define authority types, then authority MARC structure in the same way you define itemtypes and bibliographic MARC tag structure. Authority values are managed through plugins</p>
171     <table id="authtypes">
172         <thead>
173         <tr>
174             <th>Code</th>
175             <th>Description</th>
176             <th>Summary</th>
177             <th>Auth field copied</th>
178             <th>&nbsp;</th>
179         </tr>
180         </thead>
181         <tbody>
182         [% FOREACH authority_type IN authority_types %]
183             <tr>
184                 <td>[% authority_type.authtypecode | html %]</td>
185                 <td>[% authority_type.authtypetext | html %]</td>
186                 <td>[% authority_type.summary | html %]</td>
187                 <td>[% authority_type.auth_tag_to_report | html %]</td>
188                 <td>
189                   <div class="btn-group dropup">
190                     <a class="btn btn-default btn-xs dropdown-toggle" id="authtypeactions[% authority_type.authtypecode | html %]" role="button" data-toggle="dropdown" href="#">
191                       Actions <b class="caret"></b></a>
192                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtypeactions[% authority_type.authtypecode | html %]">
193                       <li><a href="auth_tag_structure.pl?authtypecode=[% authority_type.authtypecode | uri %]" class="button parameters"><i class="fa fa-eye"></i> MARC structure</a></li>
194                       <li><a href="/cgi-bin/koha/admin/authtypes.pl?op=add_form&amp;authtypecode=[% authority_type.authtypecode | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
195                       [% IF authority_type.authtypecode %]<li><a href="/cgi-bin/koha/admin/authtypes.pl?op=delete_confirm&amp;authtypecode=[% authority_type.authtypecode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>[% END %]
196                       <!-- Button to trigger modal -->
197                       <li><a href="#" data-toggle="modal" data-target="#exportModal_[% authority_type.authtypecode | html %][% loop.count | html %]" title="Export authority type (fields, subfields) to a spreadsheet file (.csv, .ods)"><i class="fa fa-upload"></i> Export</a></li>
198                       <!-- Button to trigger modal -->
199                       <li><a href="#" data-toggle="modal" data-target="#importModal_[% authority_type.authtypecode | html %][% loop.count | html %]" title="Import authority type (fields, subfields) from a spreadsheet file (.csv, .ods)"><i class="fa fa-download"></i> Import</a></li>
200                     </ul>
201                   </div>
202
203                   <!-- Modal for export -->
204                   <div class="modal" id="exportModal_[% authority_type.authtypecode | html %][% loop.count | html %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% authority_type.authtypecode | html %][% loop.count | html %]" aria-hidden="true">
205                       <div class="modal-dialog">
206                           <div class="modal-content">
207                               <div class="modal-header">
208                                   <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
209                                   <h3 id="exportLabelexportModal_[% authority_type.authtypecode | html %][% loop.count | html %]">Export [% authority_type.authtypetext | html %] authority type</h3>
210                               </div>
211                               <form action="/cgi-bin/koha/admin/import_export_authtype.pl" name="form_[% authority_type.authtypecode | html %]" method="get" target="_blank" class="form_export">
212                                   <div class="modal-body">
213                                       <fieldset>
214                                           <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode | html %]" />
215                                           <p><label for="csv_type_export_[% authority_type.authtypecode | html %][% loop.count | html %]"><input type="radio" name="type_export_[% authority_type.authtypecode | html %]" value="csv" id="csv_type_export_[% authority_type.authtypecode | html %][% loop.count | html %]" checked="checked" /> Export to CSV spreadsheet</label></p>
216                                           <p><label for="ods_type_export_[% authority_type.authtypecode | html %][% loop.count | html %]"><input type="radio" name="type_export_[% authority_type.authtypecode | html %]" value="ods" id="ods_type_export_[% authority_type.authtypecode | html %][% loop.count | html %]" /> Export to OpenDocument spreadsheet format</label></p>
217                                       </fieldset>
218                                   </div>
219                                   <div class="modal-footer">
220                                       <button type="submit" class="btn btn-default">Export</button>
221                                       <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
222                                   </div>
223                               </form>
224                           </div>
225                       </div>
226                   </div>
227
228                   <!-- Modal for import -->
229                   <div class="modal" id="importModal_[% authority_type.authtypecode | html %][% loop.count | html %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% authority_type.authtypecode | html %][% loop.count | html %]" aria-hidden="true">
230                       <div class="modal-dialog">
231                           <div class="modal-content">
232                               <div class="modal-header">
233                                   <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
234                                   <h3 id="importLabelexportModal_[% authority_type.authtypecode | html %][% loop.count | html %]">Import [% authority_type.authtypecode | html %] authority type (fields and subfields) from a spreadsheet file (.csv, .ods)</h3>
235                               </div>
236                               <form action="/cgi-bin/koha/admin/import_export_authtype.pl" name="form_i_[% authority_type.authtypecode | html %]" id="form_i_[% authority_type.authtypecode | html %]" method="post" enctype="multipart/form-data" class="form_import">
237                                   <div class="modal-body">
238                                       <input type="hidden" name="authtypecode" value="[% authority_type.authtypecode | html %]" />
239                                       <input type="hidden" name="action" value="import" />
240                                       <p><label for="file_import_[% authority_type.authtypecode | html %]">Upload file:</label> <input type="file" name="file_import_[% authority_type.authtypecode | html %]" id="file_import_[% authority_type.authtypecode | html %]" class="input_import" /></p>
241                                       <div id="importing_[% authority_type.authtypecode | html %]" style="display:none" class="importing"><img src="[% interface | html %]/[% theme | html %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
242                                   </div>
243                                   <div class="modal-footer">
244                                       <button type="submit" class="btn btn-default">Import</button>
245                                       <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
246                                   </div>
247                               </form>
248                           </div>
249                       </div>
250                   </div>
251
252                 </td>
253             </tr>
254         [% END %]
255         <tbody>
256     </table>
257 [% END %]
258
259             </main>
260         </div> <!-- /.col-sm-10.col-sm-push-2 -->
261
262         <div class="col-sm-2 col-sm-pull-10">
263             <aside>
264                 [% INCLUDE 'admin-menu.inc' %]
265             </aside>
266         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
267      </div> <!-- /.row -->
268
269 [% MACRO jsinclude BLOCK %]
270     [% INCLUDE 'datatables.inc' %]
271     [% Asset.js("js/admin-menu.js") | $raw %]
272     [% Asset.js("js/authtype.js") | $raw %]
273 [% END %]
274 [% INCLUDE 'intranet-bottom.inc' %]