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 [% WRAPPER 'header.inc' %]
20 [% INCLUDE 'prefs-admin-search.inc' %]
23 [% WRAPPER 'sub-header.inc' %]
24 [% WRAPPER breadcrumbs %]
25 [% WRAPPER breadcrumb_item %]
26 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
29 [% IF op == 'add_form' %]
30 [% WRAPPER breadcrumb_item %]
31 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
34 [% WRAPPER breadcrumb_item bc_active= 1 %]
38 [% WRAPPER breadcrumb_item bc_active= 1 %]
43 [% ELSIF op == 'delete_confirm' %]
44 [% WRAPPER breadcrumb_item %]
45 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
47 [% WRAPPER breadcrumb_item bc_active= 1 %]
48 Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
52 [% WRAPPER breadcrumb_item bc_active= 1 %]
56 [% END #/ WRAPPER breadcrumbs %]
57 [% END #/ WRAPPER sub-header.inc %]
59 <div class="main container-fluid">
61 <div class="col-sm-10 col-sm-push-2">
64 [% FOR m IN messages %]
65 <div class="dialog [% m.type | html %]">
67 [% CASE 'error_on_update' %]
68 <span>An error occurred when updating this framework. Perhaps it already exists.</span>
69 [% CASE 'error_on_insert' %]
70 <span>An error occurred when adding this framework. The framework might already exist.</span>
71 [% CASE 'error_on_delete' %]
72 <span>An error occurred when deleting this framework. Check the logs.</span>
73 [% CASE 'success_on_update' %]
74 <span>Framework updated successfully.</span>
75 [% CASE 'success_on_insert' %]
76 <span>Framework added successfully.</span>
77 [% CASE 'success_on_delete' %]
78 <span>Framework deleted successfully.</span>
79 [% CASE 'already_exists' %]
80 <span>This framework code already exists.</span>
82 <span>[% m.code | html %]</span>
90 <div id="toolbar" class="btn-toolbar">
91 <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>
95 [% IF op == 'add_form' %]
96 <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
97 <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
98 <input type="hidden" name="op" value="add_validate" />
99 <fieldset class="rows">
103 <span class="label">Framework code: </span>
104 <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode | html %]" />[% framework.frameworkcode | html %]
105 <input type="hidden" name="is_a_modif" value="1" />
109 <label for="frameworkcode" class="required">Framework code: </label>
110 <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required focus" />
111 <span class="required">Required</span>
115 <label for="description" class="required">Description: </label>
116 <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
117 <span class="required">Required</span>
121 <fieldset class="action">
122 <input type="submit" value="Submit" class="btn btn-primary" />
127 [% IF op == 'delete_confirm' %]
128 <div class="dialog alert">
129 [% IF biblios_use_this_framework %]
130 <h1>This framework cannot be deleted</h1>
131 <p><strong><span class="ex">[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span></strong></p>
132 <p>The framework is used [% biblios_use_this_framework | html %] times.</p>
133 <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
134 <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button>
137 <h1>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</h1>
138 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post">
139 <input type="hidden" name="op" value="delete_confirmed" />
140 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
141 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button>
143 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
144 <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
150 [% IF op == 'list' %]
151 <h1>MARC frameworks</h1>
152 <div class="page-section">
153 <table id="table_biblio_frameworks">
164 <td>Default framework</td>
166 <div class="btn-group dropup">
167 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
168 Actions <b class="caret"></b>
170 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
171 <li><a href="marctagstructure.pl?frameworkcode="><i class="fa-solid fa-eye"></i> MARC structure</a></li>
172 <!-- Trigger modal -->
173 <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>
174 <!-- Trigger modal -->
175 <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>
178 <!-- Modal to export default framework -->
179 <div class="modal" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
180 <div class="modal-dialog">
181 <div class="modal-content">
182 <div class="modal-header">
183 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
184 <h1 id="exportLabelexportModal_default">Export default framework</h1>
185 </div> <!-- /.modal-header -->
186 <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export">
187 <div class="modal-body">
189 <input type="hidden" name="frameworkcode" value="" />
190 <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>
191 <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>
193 </div> <!-- /.modal-body -->
194 <div class="modal-footer">
195 <button type="submit" class="btn btn-default">Export</button>
196 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
197 </div> <!-- /.modal-footer -->
198 </form> <!-- /.form_export -->
199 </div> <!-- /.modal-content -->
200 </div> <!-- /.modal-dialog -->
201 </div> <!-- /#exportModal_default.modal -->
203 <!-- Modal to import default framework -->
204 <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">
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 <h1 id="importLabelexportModal_[% framework.frameworkcode | html %][% frameworks.count | html %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h1>
210 </div> <!-- /.modal-header -->
211 <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">
212 <div class="modal-body">
213 <input type="hidden" name="frameworkcode" value="default" />
214 <input type="hidden" name="action" value="import" />
215 <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
216 <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>
217 </div> <!-- /.modal-body -->
218 <div class="modal-footer">
219 <button type="submit" class="btn btn-default">Import</button>
220 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
221 </div> <!-- /.modal-footer -->
222 </form> <!-- /.form_export -->
223 </div> <!-- /.modal-content -->
224 </div> <!-- /.modal-dialog -->
225 </div> <!-- /#import_modal_... -->
229 [% FOREACH loo IN frameworks %]
231 <td>[% loo.frameworkcode | html %]</td>
232 <td>[% loo.frameworktext | html %]</td>
234 <div class="btn-group dropup">
235 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
236 Actions <b class="caret"></b>
238 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
239 <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa-solid fa-eye"></i> MARC structure</a></li>
240 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-pencil-alt"></i> Edit</a></li>
241 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-trash-can"></i> Delete</a></li>
242 <!-- Trigger modal -->
243 <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>
244 <!-- Trigger modal -->
245 <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>
248 <!-- Modal to export other framework -->
249 <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">
250 <div class="modal-dialog">
251 <div class="modal-content">
252 <div class="modal-header">
253 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
254 <h1 id="exportLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Export [% loo.frameworktext | html %] framework</h1>
255 </div> <!-- /.modal-header -->
256 <form action="import_export_framework.pl" name="form_[% loo.frameworkcode | html %]" method="get" target="_blank" class="form_export">
257 <div class="modal-body">
259 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
260 <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>
261 <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>
263 </div> <!-- /.modal-body -->
264 <div class="modal-footer">
265 <button type="submit" class="btn btn-default">Export</button>
266 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
267 </div> <!-- /.modal-footer -->
268 </form> <!-- /.form_export -->
269 </div> <!-- /.modal-content -->
270 </div> <!-- /.modal-dialog -->
271 </div> <!-- /#exportModal_... -->
273 <!-- Modal to import other framework -->
274 <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">
275 <div class="modal-dialog">
276 <div class="modal-content">
277 <div class="modal-header">
278 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
279 <h1 id="importLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Import [% loo.frameworkcode | html %] framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h1>
280 </div> <!-- /.modal-header -->
281 <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">
282 <div class="modal-body">
283 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
284 <input type="hidden" name="action" value="import" />
285 <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>
286 <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>
287 </div> <!-- /.modal-body -->
288 <div class="modal-footer">
289 <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button>
290 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
291 </div> <!-- /.modal-footer -->
292 </form> <!-- /.form_export -->
293 </div> <!-- /.modal-content -->
294 </div> <!-- /.modal-dialog -->
295 </div> <!-- /#importModal... -->
301 </div> <!-- /.page-section -->
305 </div> <!-- /.col-sm-10.col-sm-push-2 -->
307 <div class="col-sm-2 col-sm-pull-10">
309 [% INCLUDE 'admin-menu.inc' %]
311 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
312 </div> <!-- /.row -->
314 [% MACRO jsinclude BLOCK %]
315 [% INCLUDE 'datatables.inc' %]
316 [% Asset.js("js/admin-menu.js") | $raw %]
318 var template_path = "[% interface | html %]/[% theme | html %]";
320 [% Asset.js("js/biblio_framework.js") | $raw %]
322 [% INCLUDE 'intranet-bottom.inc' %]