1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › MARC frameworks
3 [% IF op == 'add_form' %]
4 › [% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]
5 [% ELSIF op == 'delete_confirm' %]
6 › Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])?
9 [% INCLUDE 'doc-head-close.inc' %]
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
11 [% INCLUDE 'datatables.inc' %]
12 <script type="text/javascript">
13 /* Set some variable needed in biblio_framework.js */
14 var MSG_IMPORT_ERROR = _("Error importing the framework");
15 var MSG_SELECT_FILE_FORMAT = _("Please select a CSV (.csv), ODS (.ods) or XML (.xml) spreadsheet file.");
16 var MSG_OVERWRITE_WARNING = _("Do you really want to import the framework fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup");
17 var MSG_IMPORTING_TO_FRAMEWORK = _("Importing to framework: %s. Importing from file: %s.");
18 var template_path = "[% interface %]/[% theme %]";
20 <script type="text/javascript" src="[% interface %]/[% theme %]/js/biblio_framework.js"></script>
23 <body id="admin_biblio_framework" class="admin">
24 [% INCLUDE 'header.inc' %]
25 [% INCLUDE 'cat-search.inc' %]
27 <div id="breadcrumbs">
28 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
29 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
30 › <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
31 [% IF op == 'add_form' %]
32 › [% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]
33 [% ELSIF op == 'delete_confirm' %]
34 › Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])?
38 <div id="doc3" class="yui-t2">
43 [% FOR m IN messages %]
44 <div class="dialog [% m.type %]">
46 [% CASE 'error_on_update' %]
47 An error occurred when updating this framework. Perhaps it already exists.
48 [% CASE 'error_on_insert' %]
49 An error occurred when adding this framework. The framework might already exist.
50 [% CASE 'error_on_delete' %]
51 An error occurred when deleting this framework. Check the logs.
52 [% CASE 'success_on_update' %]
53 Framework updated successfully.
54 [% CASE 'success_on_insert' %]
55 Framework added successfully.
56 [% CASE 'success_on_delete' %]
57 Framework deleted successfully.
58 [% CASE 'already_exists' %]
59 This framework code already exists.
69 <div id="toolbar" class="btn-toolbar">
70 <a class="btn btn-small" id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form"><i class="fa fa-plus"></i> New framework</a>
74 [% IF op == 'add_form' %]
75 <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
76 <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
77 <input type="hidden" name="op" value="add_validate" />
78 <fieldset class="rows">
82 <span class="label">Framework code: </span>
83 <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode %]" />[% framework.frameworkcode %]
84 <input type="hidden" name="is_a_modif" value="1" />
88 <label for="frameworkcode" class="required">Framework code: </label>
89 <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required" />
90 <span class="required">Required</span>
94 <label for="description" class="required">Description: </label>
95 <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext |html %]" required="required" class="required" />
96 <span class="required">Required</span>
100 <fieldset class="action">
101 <input type="submit" value="Submit" class="submit" />
106 [% IF op == 'delete_confirm' %]
107 <div class="dialog alert">
108 [% IF biblios_use_this_framework %]
109 <h3>This framework cannot be deleted</h3>
110 <p><strong><span class="ex">[% framework.frameworktext %] ([% framework.frameworkcode %])</span></strong></p>
111 <p>The framework is used [% biblios_use_this_framework %] times.</p>
112 <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
113 <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button>
116 <h3>Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])?</h3>
117 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post">
118 <input type="hidden" name="op" value="delete_confirmed" />
119 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
120 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button>
122 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
123 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
129 [% IF op == 'list' %]
130 <h1>MARC frameworks</h1>
131 <p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
132 <table id="table_biblio_frameworks">
143 <td>Default framework</td>
145 <div class="dropdown">
146 <a class="btn btn-mini dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
147 Actions <b class="caret"></b>
149 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
150 <li><a href="marctagstructure.pl?frameworkcode="><i class="fa fa-eye"></i> MARC structure</a></li>
151 <!-- Trigger modal -->
152 <li><a href="#" data-toggle="modal" data-target="#exportModal_default" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li>
153 <!-- Trigger modal -->
154 <li><a href="#" data-toggle="modal" data-target="#importModal_[% framework.frameworkcode %][% frameworks.count %]" title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-download"></i> Import</a></li>
156 <!-- Modal to export default framework -->
157 <div class="modal hide" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
158 <div class="modal-header">
159 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
160 <h3 id="exportLabelexportModal_default">Export default framework</h3>
162 <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export">
163 <div class="modal-body">
165 <input type="hidden" name="frameworkcode" value="" />
166 <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>
167 <p><label for="xml_type_export_default"><input type="radio" name="type_export_default" value="excel" id="xml_type_export_default" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p>
168 <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>
171 <div class="modal-footer">
172 <button type="submit" class="btn">Export</button>
173 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
178 <!-- Modal to import default framework -->
179 <div class="modal hide" id="importModal_[% framework.frameworkcode %][% frameworks.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count %]" aria-hidden="true">
180 <div class="modal-header">
181 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
182 <h3 id="importLabelexportModal_[% framework.frameworkcode %][% frameworks.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h>
184 <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">
185 <div class="modal-body">
186 <input type="hidden" name="frameworkcode" value="" />
187 <input type="hidden" name="action" value="import" />
188 <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
189 <div id="importing_default" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
191 <div class="modal-footer">
192 <button type="submit" class="btn">Import</button>
193 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
201 [% FOREACH loo IN frameworks %]
203 <td>[% loo.frameworkcode %]</td>
204 <td>[% loo.frameworktext %]</td>
206 <div class="dropdown">
207 <a class="btn btn-mini dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
208 Actions <b class="caret"></b>
210 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
211 <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]"><i class="fa fa-eye"></i> MARC structure</a></li>
212 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-pencil"></i> Edit</a></li>
213 <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-trash"></i> Delete</a></li>
214 <!-- Trigger modal -->
215 <li><a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode %][% loop.count %]" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li>
216 <!-- Trigger modal -->
217 <li><a href="#" data-toggle="modal" data-target="#importModal_[% loo.frameworkcode %][% loop.count %]" title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-download"></i> Import</a></li>
219 <!-- Modal to export other framework -->
220 <div class="modal hide" id="exportModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
221 <div class="modal-header">
222 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
223 <h3 id="exportLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Export [% loo.frameworktext %] framework</h3>
225 <form action="import_export_framework.pl" name="form_[% loo.frameworkcode %]" method="get" target="_blank" class="form_export">
226 <div class="modal-body">
228 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
229 <p><label for="csv_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="csv" id="csv_type_export_[% loo.frameworkcode %][% loop.count %]" checked="checked" /> Export to CSV spreadsheet</label></p>
230 <p><label for="xml_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="excel" id="xml_type_export_[% loo.frameworkcode %][% loop.count %]" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p>
231 <p><label for="ods_type_export_[% loo.frameworkcode %][% loop.count %]"><input type="radio" name="type_export_[% loo.frameworkcode %]" value="ods" id="ods_type_export_[% loo.frameworkcode %][% loop.count %]" /> Export to OpenDocument spreadsheet format</label></p>
234 <div class="modal-footer">
235 <button type="submit" class="btn">Export</button>
236 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
241 <!-- Modal to import other framework -->
242 <div class="modal hide" id="importModal_[% loo.frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]" aria-hidden="true">
243 <div class="modal-header">
244 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
245 <h3 id="importLabelexportModal_[% loo.frameworkcode %][% loop.count %]">Import [% loo.frameworkcode %] framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3>
247 <form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_[% loo.frameworkcode %]" id="form_i_[% loo.frameworkcode %]" method="post" enctype="multipart/form-data" class="form_import">
248 <div class="modal-body">
249 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode %]" />
250 <input type="hidden" name="action" value="import" />
251 <p><label for="file_import_[% loo.frameworkcode %]">Upload file:</label> <input type="file" name="file_import_[% loo.frameworkcode %]" id="file_import_[% loo.frameworkcode %]" class="input_import" /></p>
252 <div id="importing_[% loo.frameworkcode %]" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div>
254 <div class="modal-footer">
255 <button type="submit" class="btn">Import</button>
256 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
271 [% INCLUDE 'admin-menu.inc' %]
274 [% INCLUDE 'intranet-bottom.inc' %]