4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › MARC frameworks
6 [% IF op == 'add_form' %]
7 › [% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]
8 [% ELSIF op == 'delete_confirm' %]
9 › Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
12 [% INCLUDE 'doc-head-close.inc' %]
15 <body id="admin_biblio_framework" class="admin">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'prefs-admin-search.inc' %]
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
28 [% IF op == 'add_form' %]
30 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
34 <a href="#" aria-current="page">
40 <a href="#" aria-current="page">
46 [% ELSIF op == 'delete_confirm' %]
48 <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
51 <a href="#" aria-current="page">
52 Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
58 <a href="#" aria-current="page">
66 <div class="main container-fluid">
68 <div class="col-sm-10 col-sm-push-2">
71 [% FOR m IN messages %]
72 <div class="dialog [% m.type | html %]">
74 [% CASE 'error_on_update' %]
75 An error occurred when updating this framework. Perhaps it already exists.
76 [% CASE 'error_on_insert' %]
77 An error occurred when adding this framework. The framework might already exist.
78 [% CASE 'error_on_delete' %]
79 An error occurred when deleting this framework. Check the logs.
80 [% CASE 'success_on_update' %]
81 Framework updated successfully.
82 [% CASE 'success_on_insert' %]
83 Framework added successfully.
84 [% CASE 'success_on_delete' %]
85 Framework deleted successfully.
86 [% CASE 'already_exists' %]
87 This framework code already exists.
97 <div id="toolbar" class="btn-toolbar">
98 <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>
102 [% IF op == 'add_form' %]
103 <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
104 <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
105 <input type="hidden" name="op" value="add_validate" />
106 <fieldset class="rows">
110 <span class="label">Framework code: </span>
111 <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode | html %]" />[% framework.frameworkcode | html %]
112 <input type="hidden" name="is_a_modif" value="1" />
116 <label for="frameworkcode" class="required">Framework code: </label>
117 <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required" />
118 <span class="required">Required</span>
122 <label for="description" class="required">Description: </label>
123 <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
124 <span class="required">Required</span>
128 <fieldset class="action">
129 <input type="submit" value="Submit" class="submit" />
134 [% IF op == 'delete_confirm' %]
135 <div class="dialog alert">
136 [% IF biblios_use_this_framework %]
137 <h3>This framework cannot be deleted</h3>
138 <p><strong><span class="ex">[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span></strong></p>
139 <p>The framework is used [% biblios_use_this_framework | html %] times.</p>
140 <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
141 <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button>
144 <h3>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</h3>
145 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post">
146 <input type="hidden" name="op" value="delete_confirmed" />
147 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
148 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button>
150 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
151 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
157 [% IF op == 'list' %]
158 <h1>MARC frameworks</h1>
160 <table id="table_biblio_frameworks">
171 <td>Default framework</td>
173 <div class="btn-group dropup">
174 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
175 Actions <b class="caret"></b>
177 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
178 <li><a href="marctagstructure.pl?frameworkcode="><i class="fa fa-eye"></i> MARC structure</a></li>
179 <!-- Trigger modal -->
180 <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>
181 <!-- Trigger modal -->
182 <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>
185 <!-- Modal to export default framework -->
186 <div class="modal" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
187 <div class="modal-dialog">
188 <div class="modal-content">
189 <div class="modal-header">
190 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
191 <h3 id="exportLabelexportModal_default">Export default framework</h3>
192 </div> <!-- /.modal-header -->
193 <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export">
194 <div class="modal-body">
196 <input type="hidden" name="frameworkcode" value="" />
197 <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>
198 <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>
200 </div> <!-- /.modal-body -->
201 <div class="modal-footer">
202 <button type="submit" class="btn btn-default">Export</button>
203 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
204 </div> <!-- /.modal-footer -->
205 </form> <!-- /.form_export -->
206 </div> <!-- /.modal-content -->
207 </div> <!-- /.modal-dialog -->
208 </div> <!-- /#exportModal_default.modal -->
210 <!-- Modal to import default framework -->
211 <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">
212 <div class="modal-dialog">
213 <div class="modal-content">
214 <div class="modal-header">
215 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
216 <h3 id="importLabelexportModal_[% framework.frameworkcode | html %][% frameworks.count | html %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h>
217 </div> <!-- /.modal-header -->
218 <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">
219 <div class="modal-body">
220 <input type="hidden" name="frameworkcode" value="default" />
221 <input type="hidden" name="action" value="import" />
222 <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
223 <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>
224 </div> <!-- /.modal-body -->
225 <div class="modal-footer">
226 <button type="submit" class="btn btn-default">Import</button>
227 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
228 </div> <!-- /.modal-footer -->
229 </form> <!-- /.form_export -->
230 </div> <!-- /.modal-content -->
231 </div> <!-- /.modal-dialog -->
232 </div> <!-- /#import_modal_... -->
236 [% FOREACH loo IN frameworks %]
238 <td>[% loo.frameworkcode | html %]</td>
239 <td>[% loo.frameworktext | html %]</td>
241 <div class="btn-group dropup">
242 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
243 Actions <b class="caret"></b>
245 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
246 <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-eye"></i> MARC structure</a></li>
247 <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>
248 <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>
249 <!-- Trigger modal -->
250 <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>
251 <!-- Trigger modal -->
252 <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>
255 <!-- Modal to export other framework -->
256 <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">
257 <div class="modal-dialog">
258 <div class="modal-content">
259 <div class="modal-header">
260 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
261 <h3 id="exportLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Export [% loo.frameworktext | html %] framework</h3>
262 </div> <!-- /.modal-header -->
263 <form action="import_export_framework.pl" name="form_[% loo.frameworkcode | html %]" method="get" target="_blank" class="form_export">
264 <div class="modal-body">
266 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
267 <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>
268 <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>
270 </div> <!-- /.modal-body -->
271 <div class="modal-footer">
272 <button type="submit" class="btn btn-default">Export</button>
273 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
274 </div> <!-- /.modal-footer -->
275 </form> <!-- /.form_export -->
276 </div> <!-- /.modal-content -->
277 </div> <!-- /.modal-dialog -->
278 </div> <!-- /#exportModal_... -->
280 <!-- Modal to import other framework -->
281 <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">
282 <div class="modal-dialog">
283 <div class="modal-content">
284 <div class="modal-header">
285 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
286 <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>
287 </div> <!-- /.modal-header -->
288 <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">
289 <div class="modal-body">
290 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
291 <input type="hidden" name="action" value="import" />
292 <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>
293 <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>
294 </div> <!-- /.modal-body -->
295 <div class="modal-footer">
296 <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button>
297 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
298 </div> <!-- /.modal-footer -->
299 </form> <!-- /.form_export -->
300 </div> <!-- /.modal-content -->
301 </div> <!-- /.modal-dialog -->
302 </div> <!-- /#importModal... -->
312 </div> <!-- /.col-sm-10.col-sm-push-2 -->
314 <div class="col-sm-2 col-sm-pull-10">
316 [% INCLUDE 'admin-menu.inc' %]
318 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
319 </div> <!-- /.row -->
321 [% MACRO jsinclude BLOCK %]
322 [% INCLUDE 'datatables.inc' %]
323 [% Asset.js("js/admin-menu.js") | $raw %]
325 var template_path = "[% interface | html %]/[% theme | html %]";
327 [% Asset.js("js/biblio_framework.js") | $raw %]
329 [% INCLUDE 'intranet-bottom.inc' %]