Lines 1-18
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › Administration › MARC frameworks |
2 |
<title>Koha › Administration › MARC frameworks |
3 |
[% IF ( add_form ) %] |
3 |
[% IF op == 'add_form' %] |
4 |
› [% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %] |
4 |
› [% IF framework %]Modify framework text[% ELSE %]Add framework[% END %] |
5 |
[% ELSIF ( delete_confirm ) %] |
5 |
[% ELSIF op == 'delete_confirm' %] |
6 |
› Delete framework for [% frameworktext %] ([% frameworkcode %])? |
6 |
› Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])? |
7 |
[% END %] |
7 |
[% END %] |
8 |
</title> |
8 |
</title> |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
|
|
10 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
11 |
[% INCLUDE 'datatables.inc' %] |
10 |
<script type="text/javascript"> |
12 |
<script type="text/javascript"> |
11 |
/* Import/Export from/to spreadsheet */ |
13 |
/* Import/Export from/to spreadsheet */ |
12 |
|
14 |
|
13 |
var importing = false; |
15 |
var importing = false; |
14 |
|
16 |
|
15 |
$(document).ready(function() { |
17 |
$(document).ready(function() { |
|
|
18 |
$("#table_biblio_frameworks").dataTable($.extend(true, {}, dataTablesDefaults, { |
19 |
"aoColumnDefs": [ |
20 |
{ "aTargets": [ -1, -2, -3, -4, -5 ], "bSortable": false, "bSearchable": false }, |
21 |
{ "aTargets": [ 0, 1 ], "sType": "natural" }, |
22 |
], |
23 |
"bSort": false, |
24 |
"sPaginationType": "four_button" |
25 |
})); |
26 |
|
16 |
$("body").css("cursor", "auto"); |
27 |
$("body").css("cursor", "auto"); |
17 |
$('.import_export_options').hide(); |
28 |
$('.import_export_options').hide(); |
18 |
$('a.import_export_fw').click(function() { |
29 |
$('a.import_export_fw').click(function() { |
Lines 87-96
Link Here
|
87 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
98 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
88 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
99 |
› <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> |
89 |
› <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> |
100 |
› <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a> |
90 |
[% IF ( add_form ) %] |
101 |
[% IF op == 'add_form' %] |
91 |
› [% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %] |
102 |
› [% IF framework %]Modify framework text[% ELSE %]Add framework[% END %] |
92 |
[% ELSIF ( delete_confirm ) %] |
103 |
[% ELSIF op == 'delete_confirm' %] |
93 |
› Delete framework for [% frameworktext %] ([% frameworkcode %])? |
104 |
› Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])? |
94 |
[% END %] |
105 |
[% END %] |
95 |
</div> |
106 |
</div> |
96 |
|
107 |
|
Lines 99-154
Link Here
|
99 |
<div id="yui-main"> |
110 |
<div id="yui-main"> |
100 |
<div class="yui-b"> |
111 |
<div class="yui-b"> |
101 |
|
112 |
|
102 |
[% IF ( else ) %] |
113 |
[% FOR m IN messages %] |
103 |
<div id="toolbar" class="btn-toolbar"> |
114 |
<div class="dialog [% m.type %]"> |
104 |
<a class="btn btn-small" id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form"><i class="icon-plus"></i> New framework</a> |
115 |
[% SWITCH m.code %] |
105 |
</div> |
116 |
[% CASE 'error_on_update' %] |
|
|
117 |
An error occurred when updating this framework. Perhaps it already exists. |
118 |
[% CASE 'error_on_insert' %] |
119 |
An error occurred when inserting this framework. The framework might already exist. |
120 |
[% CASE 'error_on_delete' %] |
121 |
An error occurred when deleting this framework. Check the logs. |
122 |
[% CASE 'success_on_update' %] |
123 |
Framework updated successfully. |
124 |
[% CASE 'success_on_insert' %] |
125 |
Framework inserted successfully. |
126 |
[% CASE 'success_on_delete' %] |
127 |
Framework deleted successfully. |
128 |
[% CASE 'already_exists' %] |
129 |
This framework code already exists. |
130 |
[% CASE %] |
131 |
[% m.code %] |
132 |
[% END %] |
133 |
</div> |
134 |
[% END %] |
135 |
|
136 |
|
137 |
|
138 |
[% IF op == 'list'%] |
139 |
<div id="toolbar" class="btn-toolbar"> |
140 |
<a class="btn btn-small" id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form"><i class="icon-plus"></i> New framework</a> |
141 |
</div> |
106 |
[% END %] |
142 |
[% END %] |
107 |
|
143 |
|
108 |
[% IF ( add_form ) %] |
144 |
[% IF op == 'add_form' %] |
109 |
<h1>[% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]</h1> |
145 |
<h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1> |
110 |
<form action="[% script_name %]" name="Aform" method="post" class="validated"> |
146 |
<form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated"> |
111 |
<input type="hidden" name="op" value="add_validate" /> |
147 |
<input type="hidden" name="op" value="add_validate" /> |
112 |
<fieldset class="rows"> |
148 |
<fieldset class="rows"> |
113 |
<ol> |
149 |
<ol> |
114 |
[% IF ( frameworkcode ) %] |
150 |
[% IF framework %] |
115 |
<li><span class="label">Framework code: </span><input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" />[% frameworkcode %] |
151 |
<li> |
116 |
<input type="hidden" name="modif" value="1" /> |
152 |
<span class="label">Framework code: </span> |
117 |
</li> |
153 |
<input type="hidden" id="frameworkcode" name="frameworkcode" value="[% framework.frameworkcode %]" />[% framework.frameworkcode %] |
118 |
[% ELSE %] |
154 |
</li> |
119 |
<li> |
155 |
[% ELSE %] |
120 |
<label for="frameworkcode" class="required">Framework code: </label> |
156 |
<li> |
121 |
<input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" required="required" class="required" /> |
157 |
<label for="frameworkcode" class="required">Framework code: </label> |
122 |
<span class="required">Required</span> |
158 |
<input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" required="required" class="required" /> |
123 |
</li> |
159 |
<span class="required">Required</span> |
124 |
[% END %] |
160 |
</li> |
125 |
<li> |
161 |
[% END %] |
126 |
<label for="description" class="required">Description: </label> |
162 |
<li> |
127 |
<input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" required="required" class="required" /> |
163 |
<label for="description" class="required">Description: </label> |
128 |
<span class="required">Required</span> |
164 |
<input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext |html %]" required="required" class="required" /> |
129 |
</li> |
165 |
<span class="required">Required</span> |
130 |
</ol> |
166 |
</li> |
131 |
</fieldset> |
167 |
</ol> |
132 |
<fieldset class="action"><input type="submit" value="Submit" class="submit" /></fieldset> |
168 |
</fieldset> |
|
|
169 |
<fieldset class="action"> |
170 |
<input type="submit" value="Submit" class="submit" /> |
171 |
</fieldset> |
133 |
</form> |
172 |
</form> |
134 |
[% END %] |
173 |
[% END %] |
135 |
|
174 |
|
136 |
[% IF ( delete_confirm ) %] |
175 |
[% IF op == 'delete_confirm' %] |
137 |
<div class="dialog alert"> |
176 |
<div class="dialog alert"> |
138 |
<h3>Delete framework for [% frameworktext %] ([% frameworkcode %])?</h3> |
177 |
<h3>Delete framework for [% framework.frameworktext %] ([% framework.frameworkcode %])?</h3> |
139 |
[% IF ( total ) %] |
178 |
[% IF biblios_use_this_framework %] |
140 |
<p><strong>This framework is used [% total %] times</strong>.</p> |
179 |
<p><strong>This framework is used [% biblios_use_this_framework %] times</strong>.</p> |
141 |
[% END %] |
180 |
[% END %] |
142 |
<form class="inline" action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" class="approve" value="Yes, delete this framework!" /> |
181 |
<form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="post"> |
143 |
</form> |
182 |
<input type="hidden" name="op" value="delete_confirmed" /> |
144 |
<form class="inline" action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, do not delete!" /></form> |
183 |
<input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" /> |
145 |
</div> |
184 |
<input type="submit" class="approve" value="Yes, delete this framework!" /> |
|
|
185 |
</form> |
186 |
<form class="inline" action="/cgi-bin/koha/admin/biblio_framework.pl" method="get"> |
187 |
<input type="submit" class="deny" value="No, do not delete!" /> |
188 |
</form> |
189 |
</div> |
146 |
[% END %] |
190 |
[% END %] |
147 |
|
191 |
|
148 |
[% IF ( else ) %] |
192 |
[% IF op == 'list' %] |
149 |
<h1>MARC frameworks</h1> |
193 |
<h1>MARC frameworks</h1> |
150 |
<p>Framework name, then go to MARC biblio to set MARC editor parameters</p> |
194 |
<p>Framework name, then go to MARC biblio to set MARC editor parameters</p> |
151 |
<table> |
195 |
<table id="table_biblio_frameworks"> |
|
|
196 |
<thead> |
152 |
<tr> |
197 |
<tr> |
153 |
<th>Code</th> |
198 |
<th>Code</th> |
154 |
<th>Description</th> |
199 |
<th>Description</th> |
Lines 158-186
Link Here
|
158 |
<th title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)">Export</th> |
203 |
<th title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)">Export</th> |
159 |
<th title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)">Import</th> |
204 |
<th title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods)">Import</th> |
160 |
</tr> |
205 |
</tr> |
|
|
206 |
</thead> |
207 |
<tbody> |
161 |
<tr> |
208 |
<tr> |
162 |
<td> </td> |
209 |
<td> </td> |
163 |
<td>Default framework</td> |
210 |
<td>Default framework</td> |
164 |
<td><a href="marctagstructure.pl?frameworkcode=[% frameworkcode %]">MARC structure</a></td> |
211 |
<td><a href="marctagstructure.pl?frameworkcode=">MARC structure</a></td> |
165 |
<td> </td> |
212 |
<td> </td> |
166 |
<td> </td> |
213 |
<td> </td> |
167 |
<td> |
214 |
<td> |
168 |
|
215 |
|
169 |
<!-- Button to trigger modal --> |
216 |
<!-- Button to trigger modal --> |
170 |
<a href="#" data-toggle="modal" data-target="#exportModal_[% frameworkcode %]">Export</a> |
217 |
<a href="#" data-toggle="modal" data-target="#exportModal_default">Export</a> |
171 |
<!-- Modal --> |
218 |
<!-- Modal --> |
172 |
<div class="modal hide" id="exportModal_[% frameworkcode %]" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_[% frameworkcode %]" aria-hidden="true"> |
219 |
<div class="modal hide" id="exportModal_default" tabindex="-1" role="dialog" aria-labelledby="exportLabelexportModal_default" aria-hidden="true"> |
173 |
<div class="modal-header"> |
220 |
<div class="modal-header"> |
174 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
221 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
175 |
<h3 id="exportLabelexportModal_[% frameworkcode %]">Export default framework</h3> |
222 |
<h3 id="exportLabelexportModal_default">Export default framework</h3> |
176 |
</div> |
223 |
</div> |
177 |
<form action="import_export_framework.pl" name="form_[% frameworkcode %]" method="get" target="_blank" class="form_export"> |
224 |
<form action="import_export_framework.pl" name="form_defaul" method="get" target="_blank" class="form_export"> |
178 |
<div class="modal-body"> |
225 |
<div class="modal-body"> |
179 |
<fieldset> |
226 |
<fieldset> |
180 |
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> |
227 |
<input type="hidden" name="frameworkcode" value="" /> |
181 |
<p><label for="csv_type_export_[% frameworkcode %]"><input type="radio" name="type_export_[% frameworkcode %]" value="csv" id="csv_type_export_[% frameworkcode %]" checked="checked" /> Export to CSV spreadsheet</label></p> |
228 |
<p><label for="csv_type_export_default"><input type="radio" name="type_export_defaul" value="csv" id="csv_type_export_default" checked="checked" /> Export to CSV spreadsheet</label></p> |
182 |
<p><label for="xml_type_export_[% frameworkcode %]"><input type="radio" name="type_export_[% frameworkcode %]" value="excel" id="xml_type_export_[% frameworkcode %]" /> Export to Excel with XML format, compatible with OpenOffice/LibreOffice as well</label></p> |
229 |
<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> |
183 |
<p><label for="ods_type_export_[% frameworkcode %]"><input type="radio" name="type_export_[% frameworkcode %]" value="ods" id="ods_type_export_[% frameworkcode %]" /> Export to OpenDocument spreadsheet format</label></p> |
230 |
<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> |
184 |
|
231 |
|
185 |
</fieldset> |
232 |
</fieldset> |
186 |
</div> |
233 |
</div> |
Lines 195-213
Link Here
|
195 |
<td> |
242 |
<td> |
196 |
|
243 |
|
197 |
<!-- Button to trigger modal --> |
244 |
<!-- Button to trigger modal --> |
198 |
<a href="#" data-toggle="modal" data-target="#importModal_[% frameworkcode %][% loop.count %]">Import</a> |
245 |
<a href="#" data-toggle="modal" data-target="#importModal_[% framework.frameworkcode %][% frameworks.count %]">Import</a> |
199 |
<!-- Modal --> |
246 |
<!-- Modal --> |
200 |
<div class="modal hide" id="importModal_[% frameworkcode %][% loop.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_[% frameworkcode %][% loop.count %]" aria-hidden="true"> |
247 |
<div class="modal hide" id="importModal_[% framework.frameworkcode %][% frameworks.count %]" tabindex="-1" role="dialog" aria-labelledby="importLabelexportModal_default[% frameworks.count %]" aria-hidden="true"> |
201 |
<div class="modal-header"> |
248 |
<div class="modal-header"> |
202 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
249 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
203 |
<h3 id="importLabelexportModal_[% frameworkcode %][% loop.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3> |
250 |
<h3 id="importLabelexportModal_[% framework.frameworkcode %][% frameworks.count %]">Import default framework structure (fields and subfields) from a spreadsheet file (.csv, .xml, .ods)</h3> |
204 |
</div> |
251 |
</div> |
205 |
<form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_[% frameworkcode %]" id="form_i_[% frameworkcode %]" method="post" enctype="multipart/form-data" class="form_import"> |
252 |
<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"> |
206 |
<div class="modal-body"> |
253 |
<div class="modal-body"> |
207 |
<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> |
254 |
<input type="hidden" name="frameworkcode" value="default" /> |
208 |
<input type="hidden" name="action" value="import" /> |
255 |
<input type="hidden" name="action" value="import" /> |
209 |
<p><label for="file_import_[% frameworkcode %]">Upload file:</label> <input type="file" name="file_import_[% frameworkcode %]" id="file_import_[% frameworkcode %]" class="input_import" /></p> |
256 |
<p><label for="file_import_default">Upload file:</label> <input type="file" name="file_import_default" id="file_import_default" class="input_import" /></p> |
210 |
<div id="importing_[% frameworkcode %]" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div> |
257 |
<div id="importing_default" style="display:none" class="importing"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /><span class="importing_msg"></span></div> |
211 |
</div> |
258 |
</div> |
212 |
<div class="modal-footer"> |
259 |
<div class="modal-footer"> |
213 |
<button type="submit" class="btn">Import</button> |
260 |
<button type="submit" class="btn">Import</button> |
Lines 219-231
Link Here
|
219 |
</td> |
266 |
</td> |
220 |
</tr> |
267 |
</tr> |
221 |
<!-- note highlight assignment appears backwards because we already have a normal row for Default --> |
268 |
<!-- note highlight assignment appears backwards because we already have a normal row for Default --> |
222 |
[% FOREACH loo IN loop %] |
269 |
[% FOREACH loo IN frameworks %] |
223 |
<tr> |
270 |
<tr> |
224 |
<td>[% loo.frameworkcode %]</td> |
271 |
<td>[% loo.frameworkcode %]</td> |
225 |
<td>[% loo.frameworktext %]</td> |
272 |
<td>[% loo.frameworktext %]</td> |
226 |
<td><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]" >MARC structure</a></td> |
273 |
<td><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]" >MARC structure</a></td> |
227 |
<td><a href="[% loo.script_name %]?op=add_form&frameworkcode=[% loo.frameworkcode |html %]">Edit</a></td> |
274 |
<td><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&frameworkcode=[% loo.frameworkcode |html %]">Edit</a></td> |
228 |
<td><a href="[% loo.script_name %]?op=delete_confirm&frameworkcode=[% loo.frameworkcode |html %]">Delete</a></td> |
275 |
<td><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&frameworkcode=[% loo.frameworkcode |html %]">Delete</a></td> |
229 |
<td> |
276 |
<td> |
230 |
|
277 |
|
231 |
<!-- Button to trigger modal --> |
278 |
<!-- Button to trigger modal --> |
Lines 280-287
Link Here
|
280 |
</tr> |
327 |
</tr> |
281 |
[% END %] |
328 |
[% END %] |
282 |
</table> |
329 |
</table> |
283 |
[% IF ( previous ) %]<a href="[% previous %]"><< Previous</a>[% END %] |
|
|
284 |
[% IF ( next ) %]<a href="[% next %]">Next >></a>[% END %] |
285 |
|
330 |
|
286 |
[% END %] |
331 |
[% END %] |
287 |
</div> |
332 |
</div> |
288 |
- |
|
|