Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tmpl
Tomas Cohen Arazi 69d4d8f1cc Bug 6084: Follow up - fix more translation markers
grep -R 'alert("' *

was not enough. I needed

grep -R "alert('"

too!.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 21:46:47 +12:00

285 lines
17 KiB
Cheetah
Executable file

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Administration &rsaquo; MARC Frameworks
<!-- TMPL_IF NAME="add_form" -->
&rsaquo; <!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF -->
<!-- TMPL_ELSIF NAME="delete_confirm" -->
&rsaquo; Delete Framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?
<!-- /TMPL_IF -->
</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
function isNotNull(f,noalert) {
if (f.value.length ==0) {
return false;
}
return true;
}
function toUC(f) {
f.value = f.value.toUpperCase();
return true;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Check(f) {
var ok=1;
var _alertString="";
var alertString2;
if (f.frameworkcode.value.length==0) {
_alertString += "\n- " + _("Framework code missing");
}
if (!(isNotNull(window.document.Aform.frameworktext))) {
_alertString += "\n- " + _("Description missing");
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = _("Form not submitted because of the following problem(s)");
alertString2 += "\n------------------------------------------------------------------------------------\n";
alertString2 += _alertString;
alert(alertString2);
return false;
}
return true;
}
$(document).ready(function() {
new YAHOO.widget.Button("newframework");
});
//]]>
</script>
<script type="text/javascript">
/* Import/Export from/to spreadsheet */
var importing = false;
$(document).ready(function() {
$("body").css("cursor", "auto");
$('.import_export_options').hide();
$('a.import_export_fw').click(function() {
if (!importing) {
$('.import_export_options').hide();
$(this).next().show('slide');
}
return false;
});
$('.import_export_close').click(function() {
if (!importing) {
$('.import_export_options').fadeOut('fast');
$("body").css("cursor", "auto");
}
});
$('.input_import').val("");
var matches = new RegExp("\\?error_import_export=(.+)$").exec(window.location.search);
if (matches && matches.length > 1) {
alert(_("Error importing the framework ") + decodeURIComponent(matches[1]));
}
});
$(function() {
$('input.input_import').change( function() {
var filename = $(this).val();
if ( ! /(?:\.csv|\.sql|\.ods|\.xml)$/.test(filename)) {
$(this).css("background-color","yellow");
alert(_('Please select an ods or xml file'));
$(this).val("");
$(this).css("background-color","white");
}
});
$('form.form_export').submit(function() {
$('.import_export_options').hide();
return true;
});
$('form.form_import').submit(function() {
var id = $(this).attr('id');
var obj = $('#' + id + ' input:file');
if (/(?:\.csv|\.sql|\.ods|\.xml)$/.test(obj.val())) {
if (confirm('Do you really want to import the framework fields/subfields (will overwrite current configuration, for safety reasons please make before an export to have a backup file)?')) {
var frameworkcode = $('#' + id + ' input:hidden[name=frameworkcode]').val();
$('#importing_' + frameworkcode).find("span").html("Importing <strong>" + frameworkcode + "</strong> from <i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>");
if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
var timestamp = new Date().getTime();
$('#importing_' + frameworkcode).find("img").attr('src', '/intranet-tmpl/prog/img/loading.gif' + '?' +timestamp);
}
$('#importing_' + frameworkcode).css('display', 'block');
if (navigator.userAgent.toLowerCase().indexOf('firefox') == -1) $("body").css("cursor", "progress");
importing = true;
return true;
} else
return false;
}
obj.css("background-color","yellow");
alert(_('Please select an spreadsheet (csv, ods, xml) or sql file'));
obj.val("");
obj.css("background-color","white");
return false;
});
});
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
&rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Frameworks</a>
<!-- TMPL_IF NAME="add_form" -->
&rsaquo; <!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF -->
<!-- TMPL_ELSIF NAME="delete_confirm" -->
&rsaquo; Delete Framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?
<!-- /TMPL_IF -->
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="else" --><div id="toolbar">
<ul class="toolbar">
<li><a id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form">New Framework</a></li>
</ul></div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="add_form" -->
<h1><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --></h1>
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post" onsubmit="return Check(this);">
<input type="hidden" name="op" value="add_validate" />
<fieldset class="rows">
<ol>
<!-- TMPL_IF NAME="frameworkcode" -->
<li><span class="label">Framework Code</span><input type="hidden" id="frameworkcode" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!-- TMPL_VAR NAME="frameworkcode" -->
<input type="hidden" name="modif" value="1" />
</li>
<!-- TMPL_ELSE -->
<li><label for="frameworkcode">Framework Code</label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></li>
<!-- /TMPL_IF -->
<li><label for="description">Description</label>
<input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" ESCAPE="HTML" -->" /></li></ol></fieldset>
<fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirm" -->
<div class="dialog alert">
<h3>Delete framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?</h3>
<!-- TMPL_IF NAME="total" -->
<p><strong>This framework is used <!-- TMPL_VAR NAME="total" --> times</strong>.</p>
<!-- /TMPL_IF -->
<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="approve" value="Yes, Delete this Framework!" />
</form>
<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="submit" class="deny" value="No, Do not Delete!" /></form>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="else" -->
<h1>MARC Frameworks</h1>
<p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
<table>
<tr>
<th>Code</th>
<th>Description</th>
<th>&nbsp;</th>
<th>Edit</th>
<th>Delete</th>
<th title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods) or SQL file">Export</th>
<th title="Import framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods) or SQL file">Import</th>
</tr>
<tr>
<td>&nbsp;</td>
<td>Default framework</td>
<td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">MARC structure</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><div class="import_export"><a class="import_export_fw" href="#" title="Export <!-- TMPL_VAR NAME="frameworkcode" --> framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods) or SQL file">Export</a>
<div class="import_export_options">
<form action="import_export_framework.pl" name="form_<!-- TMPL_VAR NAME="frameworkcode" -->" method="get" target="_blank" class="form_export">
<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
<ul>
<li class="li_close_import_export"><span class="import_export_close" title="Close popup">Close</span></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="csv" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" checked="checked" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Export to CSV Spreadsheet">Export to CSV Spreadsheet</label></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="excel" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Export to Excel as xml format, compatible with OpenOffice/LibreOffice as well">Export to Excel with xml format</label></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="ods" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->">Export to OpenDocument Spreadsheet format</label></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="sql" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Export to SQL">Export to SQL</label></li>
<li><input type="submit" class="export_ok" href="#" value="Export" title="Export to a spreadsheet" /></li>
</ul>
</form>
</div>
</div>
</td>
<td><div class="import_export"><a href="#" class="import_export_fw" title="Import <!-- TMPL_VAR NAME="frameworkcode" --> framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods) or SQL file">Import</a>
<div class="import_export_options">
<form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_<!-- TMPL_VAR NAME="frameworkcode" -->" id="form_i_<!-- TMPL_VAR NAME="frameworkcode" -->" method="post" enctype="multipart/form-data" class="form_import">
<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
<input type="hidden" name="action" value="import" />
<ul>
<li class="li_close_import_export"><span class="import_export_close" title="Close popup">Close</span></li>
<li><label for="file_import_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Import from a spreadsheet, formats available: ods, xml (formatted from excel)">Spreadsheet file</label><input type="file" name="file_import_<!-- TMPL_VAR NAME="frameworkcode" -->" id="file_import_<!-- TMPL_VAR NAME="frameworkcode" -->" class="input_import" value="" autocomplete="off" /></li>
<li><input type="submit" class="import_ok" value="Import" title="Import from a spreadsheet" /><div id="importing_<!-- TMPL_VAR NAME="frameworkcode" -->" style="display:none" class="importing"><img src="/intranet-tmpl/prog/img/loading.gif" /><span class="importing_msg"></span></div></li>
</ul>
</form>
</div>
</div>
</td>
</tr>
<!-- note highlight assignment appears backwards because we already have a normal row for Default -->
<!-- TMPL_LOOP NAME="loop" -->
<!-- TMPL_IF NAME="__odd__" --><tr class="highlight">
<!-- TMPL_ELSE --><tr>
<!-- /TMPL_IF -->
<td><!-- TMPL_VAR name="frameworkcode" --></td>
<td><!-- TMPL_VAR name="frameworktext" --></td>
<td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" >MARC structure</a></td>
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Edit</a></td>
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Delete</a></td>
<td>
<div class="import_export"><a class="import_export_fw" href="#" title="Export <!-- TMPL_VAR NAME="frameworkcode" --> framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods) or SQL file">Export</a>
<div class="import_export_options">
<form action="import_export_framework.pl" name="form_<!-- TMPL_VAR NAME="frameworkcode" -->" method="get" target="_blank" class="form_export">
<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
<ul>
<li class="li_close_import_export"><span class="import_export_close" title="Close popup">Close</span></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="csv" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" checked="checked" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Export to CSV Spreadsheet">Export to CSV Spreadsheet</label></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="excel" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Export to Excel as xml format, compatible with OpenOffice/LibreOffice as well">Export to Excel as xml format</label></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="ods" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->">Export to OpenDocument Spreadsheet format</label></li>
<li><input type="radio" name="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" value="sql" id="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" /><label for="type_export_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Export to SQL">Export to SQL</label></li>
<li><input type="submit" class="export_ok" href="#" value="Export" title="Export to a spreadsheet" /></li>
</ul>
</form>
</div>
</div>
</td>
<td><div class="import_export"><a class="import_export_fw" href="#" title="Import <!-- TMPL_VAR NAME="frameworkcode" --> framework structure (fields, subfields) from a spreadsheet file (.csv, .xml, .ods) or SQL file">Import</a>
<div class="import_export_options">
<form action="/cgi-bin/koha/admin/import_export_framework.pl" name="form_i_<!-- TMPL_VAR NAME="frameworkcode" -->" id="form_i_<!-- TMPL_VAR NAME="frameworkcode" -->" method="post" enctype="multipart/form-data" class="form_import">
<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
<input type="hidden" name="action" value="import" />
<ul>
<li class="li_close_import_export"><span class="import_export_close" title="Close popup">Close</span></li>
<li><label for="file_import_<!-- TMPL_VAR NAME="frameworkcode" -->" title="Import from a spreadsheet, formats available: ods, xml (formatted from excel)">Spreadsheet file</label><input type="file" name="file_import_<!-- TMPL_VAR NAME="frameworkcode" -->" id="file_import_<!-- TMPL_VAR NAME="frameworkcode" -->" class="input_import" value="" autocomplete="off" /></li>
<li><input type="submit" class="import_ok" value="Import" title="Import from a spreadsheet" /><div id="importing_<!-- TMPL_VAR NAME="frameworkcode" -->" style="display:none" class="importing"><img src="/intranet-tmpl/prog/img/loading.gif" /><span class="importing_msg"></span></div></li>
</ul>
</form>
</div>
</div>
</td>
</tr>
<!-- /TMPL_LOOP -->
</table>
<!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->