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 <div id="breadcrumbs">
20 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
22 › <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
23 [% IF op == 'add_form' %]
24 › [% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]
25 [% ELSIF op == 'delete_confirm' %]
26 › Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?
30 <div class="main container-fluid">
32 <div class="col-sm-10 col-sm-push-2">
35 [% FOR m IN messages %]
36 <div class="dialog [% m.type | html %]">
38 [% CASE 'error_on_update' %]
39 An error occurred when updating this framework. Perhaps it already exists.
40 [% CASE 'error_on_insert' %]
41 An error occurred when adding this framework. The framework might already exist.
42 [% CASE 'error_on_delete' %]
43 An error occurred when deleting this framework. Check the logs.
44 [% CASE 'success_on_update' %]
45 Framework updated successfully.
46 [% CASE 'success_on_insert' %]
47 Framework added successfully.
48 [% CASE 'success_on_delete' %]
49 Framework deleted successfully.
50 [% CASE 'already_exists' %]
51 This framework code already exists.
61 <div id="toolbar" class="btn-toolbar">
62 <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>
66 [% IF op == 'add_form' %]
67 <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
68 <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
69 <input type="hidden" name="op" value="add_validate" />
70 <fieldset class="rows">
74 <span class="label">Framework code: </span>
75 <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode | html %]" />[% framework.frameworkcode | html %]
76 <input type="hidden" name="is_a_modif" value="1" />
80 <label for="frameworkcode" class="required">Framework code: </label>
81 <input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required" />
82 <span class="required">Required</span>
86 <label for="description" class="required">Description: </label>
87 <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext | html %]" required="required" class="required" />
88 <span class="required">Required</span>
92 <fieldset class="action">
93 <input type="submit" value="Submit" class="submit" />
98 [% IF op == 'delete_confirm' %]
99 <div class="dialog alert">
100 [% IF biblios_use_this_framework %]
101 <h3>This framework cannot be deleted</h3>
102 <p><strong><span class="ex">[% framework.frameworktext | html %] ([% framework.frameworkcode | html %])</span></strong></p>
103 <p>The framework is used [% biblios_use_this_framework | html %] times.</p>
104 <form action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
105 <button type="submit"><i class="fa fa-fw fa-arrow-left"></i> Return to frameworks</button>
108 <h3>Delete framework for [% framework.frameworktext | html %] ([% framework.frameworkcode | html %])?</h3>
109 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post">
110 <input type="hidden" name="op" value="delete_confirmed" />
111 <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode | html %]" />
112 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this framework</button>
114 <form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get">
115 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
121 [% IF op == 'list' %]
122 <h1>MARC frameworks</h1>
124 <table id="table_biblio_frameworks">
135 <td>Default framework</td>
137 <div class="btn-group dropup">
138 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
139 Actions <b class="caret"></b>
141 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
142 <li><a href="marctagstructure.pl?frameworkcode="><i class="fa fa-eye"></i> MARC structure</a></li>
143 <!-- Trigger modal -->
144 <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>
145 <!-- Trigger modal -->
146 <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>
148 <!-- Modal to export default framework -->
149 <div class="modal" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true">
150 <div class="modal-dialog">
151 <div class="modal-content">
152 <div class="modal-header">
153 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
154 <h3 id="exportLabelexportModal_default">Export default framework</h3>
156 <form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export">
157 <div class="modal-body">
159 <input type="hidden" name="frameworkcode" value="" />
160 <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>
161 <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>
164 <div class="modal-footer">
165 <button type="submit" class="btn btn-default">Export</button>
166 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
173 <!-- Modal to import default framework -->
174 <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">
175 <div class="modal-dialog">
176 <div class="modal-content">
177 <div class="modal-header">
178 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
179 <h3 id="importLabelexportModal_[% framework.frameworkcode | html %][% frameworks.count | html %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv or .ods)</h>
181 <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">
182 <div class="modal-body">
183 <input type="hidden" name="frameworkcode" value="default" />
184 <input type="hidden" name="action" value="import" />
185 <p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p>
186 <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>
188 <div class="modal-footer">
189 <button type="submit" class="btn btn-default">Import</button>
190 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
200 [% FOREACH loo IN frameworks %]
202 <td>[% loo.frameworkcode | html %]</td>
203 <td>[% loo.frameworktext | html %]</td>
205 <div class="btn-group dropup">
206 <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode | html %]" role="button" data-toggle="dropdown" href="#">
207 Actions <b class="caret"></b>
209 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode | html %]">
210 <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode | uri %]"><i class="fa fa-eye"></i> MARC structure</a></li>
211 <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>
212 <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>
213 <!-- Trigger modal -->
214 <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>
215 <!-- Trigger modal -->
216 <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>
218 <!-- Modal to export other framework -->
219 <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">
220 <div class="modal-dialog">
221 <div class="modal-content">
222 <div class="modal-header">
223 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
224 <h3 id="exportLabelexportModal_[% loo.frameworkcode | html %][% loop.count | html %]">Export [% loo.frameworktext | html %] framework</h3>
226 <form action="import_export_framework.pl" name="form_[% loo.frameworkcode | html %]" method="get" target="_blank" class="form_export">
227 <div class="modal-body">
229 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
230 <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>
231 <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>
234 <div class="modal-footer">
235 <button type="submit" class="btn btn-default">Export</button>
236 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button>
243 <!-- Modal to import other framework -->
244 <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">
245 <div class="modal-dialog">
246 <div class="modal-content">
247 <div class="modal-header">
248 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
249 <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>
251 <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">
252 <div class="modal-body">
253 <input type="hidden" name="frameworkcode" value="[% loo.frameworkcode | html %]" />
254 <input type="hidden" name="action" value="import" />
255 <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>
256 <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>
258 <div class="modal-footer">
259 <button type="submit" class="btn btn-default" title="[% loo.frameworkcode | html %]">Import</button>
260 <button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Close</button>
276 </div> <!-- /.col-sm-10.col-sm-push-2 -->
278 <div class="col-sm-2 col-sm-pull-10">
280 [% INCLUDE 'admin-menu.inc' %]
282 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
283 </div> <!-- /.row -->
285 [% MACRO jsinclude BLOCK %]
286 [% INCLUDE 'datatables.inc' %]
287 [% Asset.js("js/admin-menu.js") | $raw %]
289 var template_path = "[% interface | html %]/[% theme | html %]";
291 [% Asset.js("js/biblio_framework.js") | $raw %]
293 [% INCLUDE 'intranet-bottom.inc' %]