3 [% PROCESS 'i18n.inc' %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% FILTER collapse %]
7 [% IF op == 'add_form' %]
9 [% t("Modify framework text") | html %]
11 [% t("Add framework") | html %]
13 [% ELSIF op == 'delete_confirm' %]
14 [% tx("Delete framework for {framework} ({frameworkcode})?", { framework = framework.frameworktext, frameworkcode = framework.frameworkcode }) | html %] ›
16 [% t("MARC frameworks") | html %] ›
17 [% t("Administration") | html %] ›
18 [% t("Koha") | html %]
20 [% INCLUDE 'doc-head-close.inc' %]
23 <body id="admin_biblio_framework" class="admin">
24 [% WRAPPER 'header.inc' %]
25 [% INCLUDE 'prefs-admin-search.inc' %]
28 [% WRAPPER 'sub-header.inc' %]
29 [% WRAPPER breadcrumbs %]
30 [% WRAPPER breadcrumb_item %]
31 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
34 [% IF op == 'add_form' %]
35 [% WRAPPER breadcrumb_item %]
36 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
39 [% WRAPPER breadcrumb_item bc_active= 1 %]
40 <span>Modify framework text</span>
43 [% WRAPPER breadcrumb_item bc_active= 1 %]
44 <span>Add framework</span>
48 [% ELSIF op == 'delete_confirm' %]
49 [% WRAPPER breadcrumb_item %]
50 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
52 [% WRAPPER breadcrumb_item bc_active= 1 %]
53 <span>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</span>
57 [% WRAPPER breadcrumb_item bc_active= 1 %]
58 <span>MARC frameworks</span>
61 [% END #/ WRAPPER breadcrumbs %]
62 [% END #/ WRAPPER sub-header.inc %]
64 <div class="main container-fluid">
66 <div class="col-sm-10 col-sm-push-2">
69 [% FOR m IN messages %]
70 <div class="dialog [% m.type | html %]">
72 [% CASE 'error_on_update' %]
73 <span>An error occurred when updating this framework. Perhaps it already exists.</span>
74 [% CASE 'error_on_insert' %]
75 <span>An error occurred when adding this framework. The framework might already exist.</span>
76 [% CASE 'error_on_delete' %]
77 <span>An error occurred when deleting this framework. Check the logs.</span>
78 [% CASE 'success_on_update' %]
79 <span>Framework updated successfully.</span>
80 [% CASE 'success_on_insert' %]
81 <span>Framework added successfully.</span>
82 [% CASE 'success_on_delete' %]
83 <span>Framework deleted successfully.</span>
84 [% CASE 'already_exists' %]
85 <span>This framework code already exists.</span>
87 <span>[% m.code | html %]</span>
95 <div id="toolbar" class="btn-toolbar">
96 <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>
100 [% IF op == 'add_form' %]
101 <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
102 <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
103 <input type="hidden" name="op" value="add_validate" />
104 <fieldset class="rows">
108 <span class="label">Framework code: </span>
109 <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode | html %]" />[% framework.frameworkcode | html %]
110 <input type="hidden" name="is_a_modif" value="1" />
114 <label for="frameworkcode" class="required">Framework code: </label>
115 <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required focus" />
116 <span class="required">Required</span>
120 <label for="description" class="required">Description: </label>
121 <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
122 <span class="required">Required</span>
126 <fieldset class="action">
127 <input type="submit" value="Submit" class="btn btn-primary" />
132 [% IF op == 'delete_confirm' %]
133 <div class="dialog alert">
134 [% IF biblios_use_this_framework %]
135 <h1>This framework cannot be deleted</h1>
136 <p><strong><span class="ex">[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span></strong></p>
137 <p>The framework is used [% biblios_use_this_framework | html %] times.</p>
138 <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
139 <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button>
142 <h1>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</h1>
143 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post">
144 <input type="hidden" name="op" value="delete_confirmed" />
145 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
146 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button>
148 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
149 <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
155 [% IF op == 'list' %]
156 <h1>MARC frameworks</h1>
157 <div class="page-section">
158 <table id="table_biblio_frameworks">
169 <td>Default framework</td>
171 <div class="btn-group dropup">
172 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
173 Actions <b class="caret"></b>
175 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
176 <li><a href="marctagstructure.pl?frameworkcode="><i class="fa-solid fa-eye"></i> MARC structure</a></li>
177 <!-- Trigger modal -->
178 <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>
179 <!-- Trigger modal -->
180 <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>
183 <!-- Modal to export default framework -->
184 <div class="modal" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
185 <div class="modal-dialog">
186 <div class="modal-content">
187 <div class="modal-header">
188 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
189 <h1 id="exportLabelexportModal_default">Export default framework</h1>
190 </div> <!-- /.modal-header -->
191 <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export">
192 <div class="modal-body">
194 <input type="hidden" name="frameworkcode" value="" />
195 <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>
196 <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>
198 </div> <!-- /.modal-body -->
199 <div class="modal-footer">
200 <button type="submit" class="btn btn-default">Export</button>
201 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
202 </div> <!-- /.modal-footer -->
203 </form> <!-- /.form_export -->
204 </div> <!-- /.modal-content -->
205 </div> <!-- /.modal-dialog -->
206 </div> <!-- /#exportModal_default.modal -->
208 <!-- Modal to import default framework -->
209 <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">
210 <div class="modal-dialog">
211 <div class="modal-content">
212 <div class="modal-header">
213 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
214 <h1 id="importLabelexportModal_[% framework.frameworkcode | html %][% frameworks.count | html %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h1>
215 </div> <!-- /.modal-header -->
216 <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">
217 <div class="modal-body">
218 <input type="hidden" name="frameworkcode" value="default" />
219 <input type="hidden" name="action" value="import" />
220 <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
221 <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>
222 </div> <!-- /.modal-body -->
223 <div class="modal-footer">
224 <button type="submit" class="btn btn-default">Import</button>
225 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
226 </div> <!-- /.modal-footer -->
227 </form> <!-- /.form_export -->
228 </div> <!-- /.modal-content -->
229 </div> <!-- /.modal-dialog -->
230 </div> <!-- /#import_modal_... -->
234 [% FOREACH loo IN frameworks %]
236 <td>[% loo.frameworkcode | html %]</td>
237 <td>[% loo.frameworktext | html %]</td>
239 <div class="btn-group dropup">
240 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
241 Actions <b class="caret"></b>
243 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
244 <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa-solid fa-eye"></i> MARC structure</a></li>
245 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a></li>
246 <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>
247 <!-- Trigger modal -->
248 <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>
249 <!-- Trigger modal -->
250 <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>
253 <!-- Modal to export other framework -->
254 <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">
255 <div class="modal-dialog">
256 <div class="modal-content">
257 <div class="modal-header">
258 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
259 <h1 id="exportLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Export [% loo.frameworktext | html %] framework</h1>
260 </div> <!-- /.modal-header -->
261 <form action="import_export_framework.pl" name="form_[% loo.frameworkcode | html %]" method="get" target="_blank" class="form_export">
262 <div class="modal-body">
264 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
265 <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>
266 <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>
268 </div> <!-- /.modal-body -->
269 <div class="modal-footer">
270 <button type="submit" class="btn btn-default">Export</button>
271 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
272 </div> <!-- /.modal-footer -->
273 </form> <!-- /.form_export -->
274 </div> <!-- /.modal-content -->
275 </div> <!-- /.modal-dialog -->
276 </div> <!-- /#exportModal_... -->
278 <!-- Modal to import other framework -->
279 <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">
280 <div class="modal-dialog">
281 <div class="modal-content">
282 <div class="modal-header">
283 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
284 <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>
285 </div> <!-- /.modal-header -->
286 <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">
287 <div class="modal-body">
288 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
289 <input type="hidden" name="action" value="import" />
290 <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>
291 <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>
292 </div> <!-- /.modal-body -->
293 <div class="modal-footer">
294 <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button>
295 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
296 </div> <!-- /.modal-footer -->
297 </form> <!-- /.form_export -->
298 </div> <!-- /.modal-content -->
299 </div> <!-- /.modal-dialog -->
300 </div> <!-- /#importModal... -->
306 </div> <!-- /.page-section -->
310 </div> <!-- /.col-sm-10.col-sm-push-2 -->
312 <div class="col-sm-2 col-sm-pull-10">
314 [% INCLUDE 'admin-menu.inc' %]
316 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
317 </div> <!-- /.row -->
319 [% MACRO jsinclude BLOCK %]
320 [% INCLUDE 'datatables.inc' %]
321 [% Asset.js("js/admin-menu.js") | $raw %]
323 var template_path = "[% interface | html %]/[% theme | html %]";
325 [% Asset.js("js/biblio_framework.js") | $raw %]
327 [% INCLUDE 'intranet-bottom.inc' %]