4 [% INCLUDE 'doc-head-open.inc' %]
6 [% IF op == 'add_form' %]
11 [% END %] › [% ELSIF op == 'delete_confirm' %]
12 Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])? › [% END %]
13 MARC frameworks › Administration › Koha
15 [% INCLUDE 'doc-head-close.inc' %]
18 <body id="admin_biblio_framework" class="admin">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'prefs-admin-search.inc' %]
22 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
25 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
28 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
31 [% IF op == 'add_form' %]
33 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
37 <a href="#" aria-current="page">
43 <a href="#" aria-current="page">
49 [% ELSIF op == 'delete_confirm' %]
51 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
54 <a href="#" aria-current="page">
55 Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
61 <a href="#" aria-current="page">
69 <div class="main container-fluid">
71 <div class="col-sm-10 col-sm-push-2">
74 [% FOR m IN messages %]
75 <div class="dialog [% m.type | html %]">
77 [% CASE 'error_on_update' %]
78 An error occurred when updating this framework. Perhaps it already exists.
79 [% CASE 'error_on_insert' %]
80 An error occurred when adding this framework. The framework might already exist.
81 [% CASE 'error_on_delete' %]
82 An error occurred when deleting this framework. Check the logs.
83 [% CASE 'success_on_update' %]
84 Framework updated successfully.
85 [% CASE 'success_on_insert' %]
86 Framework added successfully.
87 [% CASE 'success_on_delete' %]
88 Framework deleted successfully.
89 [% CASE 'already_exists' %]
90 This framework code already exists.
100 <div id="toolbar" class="btn-toolbar">
101 <a class="btn btn-default" id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form"><i class="fa fa-plus"></i> New framework</a>
105 [% IF op == 'add_form' %]
106 <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
107 <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
108 <input type="hidden" name="op" value="add_validate" />
109 <fieldset class="rows">
113 <span class="label">Framework code: </span>
114 <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode | html %]" />[% framework.frameworkcode | html %]
115 <input type="hidden" name="is_a_modif" value="1" />
119 <label for="frameworkcode" class="required">Framework code: </label>
120 <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required" />
121 <span class="required">Required</span>
125 <label for="description" class="required">Description: </label>
126 <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
127 <span class="required">Required</span>
131 <fieldset class="action">
132 <input type="submit" value="Submit" class="submit" />
137 [% IF op == 'delete_confirm' %]
138 <div class="dialog alert">
139 [% IF biblios_use_this_framework %]
140 <h3>This framework cannot be deleted</h3>
141 <p><strong><span class="ex">[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span></strong></p>
142 <p>The framework is used [% biblios_use_this_framework | html %] times.</p>
143 <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
144 <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button>
147 <h3>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</h3>
148 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post">
149 <input type="hidden" name="op" value="delete_confirmed" />
150 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
151 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button>
153 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
154 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
160 [% IF op == 'list' %]
161 <h1>MARC frameworks</h1>
163 <table id="table_biblio_frameworks">
174 <td>Default framework</td>
176 <div class="btn-group dropup">
177 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
178 Actions <b class="caret"></b>
180 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
181 <li><a href="marctagstructure.pl?frameworkcode="><i class="fa fa-eye"></i> MARC structure</a></li>
182 <!-- Trigger modal -->
183 <li><a href="#" data-toggle="modal" data-target="#exportModal_default" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv or .ods)"><i class="fa fa-upload"></i> Export</a></li>
184 <!-- Trigger modal -->
185 <li><a href="#" data-toggle="modal" data-target="#importModal_[% framework.frameworkcode | html %][% frameworks.count | html %]" title="Import framework structure (fields, subfields) from a spreadsheet file (.csv or .ods)"><i class="fa fa-download"></i> Import</a></li>
188 <!-- Modal to export default framework -->
189 <div class="modal" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
190 <div class="modal-dialog">
191 <div class="modal-content">
192 <div class="modal-header">
193 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
194 <h3 id="exportLabelexportModal_default">Export default framework</h3>
195 </div> <!-- /.modal-header -->
196 <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export">
197 <div class="modal-body">
199 <input type="hidden" name="frameworkcode" value="" />
200 <p><label for="csv_type_export_default"><input type="radio" name="type_export_default" value="csv" id="csv_type_export_default" checked="checked" /> Export to CSV spreadsheet</label></p>
201 <p><label for="ods_type_export_default"><input type="radio" name="type_export_default" value="ods" id="ods_type_export_default" /> Export to OpenDocument spreadsheet format</label></p>
203 </div> <!-- /.modal-body -->
204 <div class="modal-footer">
205 <button type="submit" class="btn btn-default">Export</button>
206 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
207 </div> <!-- /.modal-footer -->
208 </form> <!-- /.form_export -->
209 </div> <!-- /.modal-content -->
210 </div> <!-- /.modal-dialog -->
211 </div> <!-- /#exportModal_default.modal -->
213 <!-- Modal to import default framework -->
214 <div class="modal" id="importModal_[% framework.frameworkcode | html %][% frameworks.count | html %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count | html %]" aria-hidden="true">
215 <div class="modal-dialog">
216 <div class="modal-content">
217 <div class="modal-header">
218 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
219 <h3 id="importLabelexportModal_[% framework.frameworkcode | html %][% frameworks.count | html %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h>
220 </div> <!-- /.modal-header -->
221 <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_default" id="form_i_default" method="post" enctype="multipart/form-data" class="form_import">
222 <div class="modal-body">
223 <input type="hidden" name="frameworkcode" value="default" />
224 <input type="hidden" name="action" value="import" />
225 <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
226 <div id="importing_default" style="display:none" class="importing"><img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /><span class="importing_msg"></span></div>
227 </div> <!-- /.modal-body -->
228 <div class="modal-footer">
229 <button type="submit" class="btn btn-default">Import</button>
230 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
231 </div> <!-- /.modal-footer -->
232 </form> <!-- /.form_export -->
233 </div> <!-- /.modal-content -->
234 </div> <!-- /.modal-dialog -->
235 </div> <!-- /#import_modal_... -->
239 [% FOREACH loo IN frameworks %]
241 <td>[% loo.frameworkcode | html %]</td>
242 <td>[% loo.frameworktext | html %]</td>
244 <div class="btn-group dropup">
245 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
246 Actions <b class="caret"></b>
248 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
249 <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-eye"></i> MARC structure</a></li>
250 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
251 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
252 <!-- Trigger modal -->
253 <li><a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode | html %][% loop.count | html %]" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv or .ods)"><i class="fa fa-upload"></i> Export</a></li>
254 <!-- Trigger modal -->
255 <li><a href="#" data-toggle="modal" data-target="#importModal_[% loo.frameworkcode | html %][% loop.count | html %]" title="Import framework structure (fields, subfields) from a spreadsheet file (.csv or .ods)"><i class="fa fa-download"></i> Import</a></li>
258 <!-- Modal to export other framework -->
259 <div class="modal" id="exportModal_[% loo.frameworkcode | html %][% loop.count | html %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]" aria-hidden="true">
260 <div class="modal-dialog">
261 <div class="modal-content">
262 <div class="modal-header">
263 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
264 <h3 id="exportLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Export [% loo.frameworktext | html %] framework</h3>
265 </div> <!-- /.modal-header -->
266 <form action="import_export_framework.pl" name="form_[% loo.frameworkcode | html %]" method="get" target="_blank" class="form_export">
267 <div class="modal-body">
269 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
270 <p><label for="csv_type_export_[% loo.frameworkcode | html %][% loop.count | html %]"><input type="radio" name="type_export_[% loo.frameworkcode | html %]" value="csv" id="csv_type_export_[% loo.frameworkcode | html %][% loop.count | html %]" checked="checked" /> Export to CSV spreadsheet</label></p>
271 <p><label for="ods_type_export_[% loo.frameworkcode | html %][% loop.count | html %]"><input type="radio" name="type_export_[% loo.frameworkcode | html %]" value="ods" id="ods_type_export_[% loo.frameworkcode | html %][% loop.count | html %]" /> Export to OpenDocument spreadsheet format</label></p>
273 </div> <!-- /.modal-body -->
274 <div class="modal-footer">
275 <button type="submit" class="btn btn-default">Export</button>
276 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
277 </div> <!-- /.modal-footer -->
278 </form> <!-- /.form_export -->
279 </div> <!-- /.modal-content -->
280 </div> <!-- /.modal-dialog -->
281 </div> <!-- /#exportModal_... -->
283 <!-- Modal to import other framework -->
284 <div class="modal" id="importModal_[% loo.frameworkcode | html %][% loop.count | html %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]" aria-hidden="true">
285 <div class="modal-dialog">
286 <div class="modal-content">
287 <div class="modal-header">
288 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
289 <h3 id="importLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Import [% loo.frameworkcode | html %] framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h3>
290 </div> <!-- /.modal-header -->
291 <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_[% loo.frameworkcode | html %]" id="form_i_[% loo.frameworkcode | html %]" method="post" enctype="multipart/form-data" class="form_import">
292 <div class="modal-body">
293 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
294 <input type="hidden" name="action" value="import" />
295 <p><label for="file_import_[% loo.frameworkcode | html %]">Upload file:</label> <input type="file" name="file_import_[% loo.frameworkcode | html %]" id="file_import_[% loo.frameworkcode | html %]" class="input_import" /></p>
296 <div id="importing_[% loo.frameworkcode | html %]" style="display:none" class="importing"><img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /><span class="importing_msg"></span></div>
297 </div> <!-- /.modal-body -->
298 <div class="modal-footer">
299 <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button>
300 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
301 </div> <!-- /.modal-footer -->
302 </form> <!-- /.form_export -->
303 </div> <!-- /.modal-content -->
304 </div> <!-- /.modal-dialog -->
305 </div> <!-- /#importModal... -->
315 </div> <!-- /.col-sm-10.col-sm-push-2 -->
317 <div class="col-sm-2 col-sm-pull-10">
319 [% INCLUDE 'admin-menu.inc' %]
321 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
322 </div> <!-- /.row -->
324 [% MACRO jsinclude BLOCK %]
325 [% INCLUDE 'datatables.inc' %]
326 [% Asset.js("js/admin-menu.js") | $raw %]
328 var template_path = "[% interface | html %]/[% theme | html %]";
330 [% Asset.js("js/biblio_framework.js") | $raw %]
332 [% INCLUDE 'intranet-bottom.inc' %]