Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tmpl
Matthias Meusburger 64b79bf620 MT2116 : CSV Exports : add 'new line' as separator
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-17 08:00:53 -05:00

312 lines
15 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo; Tools &rsaquo; CSV export profiles</title><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/javascript">
//<![CDATA[
function reloadPage(p) {
var id = p.value;
if (id != 0) { document.location = "/cgi-bin/koha/tools/csv-profiles.pl?id=" + id; }
}
$(document).ready(function() {
$('#csvexporttabs > ul').tabs();
});
//]]>
</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/tools/tools-home.pl">Tools</a>
&rsaquo; CSV export profiles
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF EXPR="success || error" -->
<!-- TMPL_IF NAME="success" -->
<!-- TMPL_IF EXPR="action eq 'create'" --><p>The new CSV profile "<!-- TMPL_VAR NAME="profile_name" -->" has been successfully created.</p><!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="action eq 'edit'" --><p>The CSV profile has been successfully modified.</p><!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="action eq 'delete'" --><p>The CSV profile has been successfully deleted.</p><!-- /TMPL_IF -->
<!-- TMPL_ELSE -->
<!-- TMPL_IF EXPR="action eq 'create'" --><p class="error">The new CSV profile "<!-- TMPL_VAR NAME="profile_name" -->" has not been created.</p><!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="action eq 'edit'" --><p class="error">The CSV profile has not been modified.</p><!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="action eq 'delete'" --><p class="error">The CSV profile has not been deleted.</p><!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<div id="csvexporttabs" class="toptabs">
<ul>
<li><a href="csv-profiles.pl#csvnew">New profile</a></li>
<!-- TMPL_IF NAME="existing_profiles" -->
<!-- TMPL_IF NAME="selected_profile_id" -->
<li class="ui-tabs-selected">
<!-- TMPL_ELSE -->
<li>
<!-- /TMPL_IF -->
<a href="csv-profiles.pl#csvedit">Edit existing profile</a></li> <!-- /TMPL_IF -->
</ul>
<div id="csvnew">
<h3>New CSV export profile</h3>
<form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
<fieldset class="rows">
<ol><li><label for="profile_name" class="required">Profile name: </label>
<input type="text" id="profile_name" name="profile_name" /></li>
<li><label for="profile_description">Profile description: </label>
<textarea cols="50" rows="2" name="profile_description" id="profile_description"></textarea></li>
<li><label for="new_csv_separator">CSV separator: </label>
<select name="csv_separator" id="new_csv_separator">
<option value=":">Colon (:)</option>
<option value="," selected="selected">Comma (,)</option>
<option value="|">Pipe (|)</option>
<option value=";">Semi-colon (;)</option>
<option value="#">Sharp (#)</option>
<option value=" ">Space ( )</option>
<option value="\t">Tabulation (\t)</option>
<option value="\n">New line (\n)</option>
</select>
</li>
<li><label for="new_field_separator">Field separator: </label>
<select name="field_separator" id="new_field_separator">
<option value=":">Colon (:)</option>
<option value=",">Comma (,)</option>
<option value="|">Pipe (|)</option>
<option value=";">Semi-colon (;)</option>
<option value="#" selected="selected">Sharp (#)</option>
<option value=" ">Space ( )</option>
<option value="\t">Tabulation (\t)</option>
<option value="\n">New line (\n)</option>
</select>
</li>
<li><label for="new_subfield_separator">Subfield separator: </label>
<select name="subfield_separator" id="new_subfield_separator">
<option value=":">Colon (:)</option>
<option value=",">Comma (,)</option>
<option value="|" selected="selected">Pipe (|)</option>
<option value=";">Semi-colon (;)</option>
<option value="#">Sharp (#)</option>
<option value=" ">Space ( )</option>
<option value="\t">Tabulation (\t)</option>
<option value="\n">New line (\n)</option>
</select>
</li>
<li><label for="new_encoding">Encoding: </label>
<select name="encoding" id="new_encoding">
<!-- TMPL_LOOP NAME="encodings" -->
<option<!-- TMPL_IF EXPR="encoding eq 'utf8'" --> selected="selected" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="encoding" --></option>
<!-- /TMPL_LOOP -->
</select></li>
<li><label for="new_profile_content">Profile marcfields: </label>
<textarea cols="50" rows="2" name="profile_content" id="new_profile_content"></textarea>
<p>You have to define which fields or subfields you want to export, separated by pipes.</p>
<p>You can also use your own headers (instead of the ones from koha) by prefixing the field number with an header, followed by the equal sign.</p>
<p>Example: Personal name=200|Entry element=210$a|300|009</p>
</li>
</ol>
</fieldset>
<fieldset class="action"><input type="hidden" name="action" value="create" />
<input type="submit" value="Submit" /></fieldset>
</form>
<br style="clear:both;" />
</div>
<!-- TMPL_IF NAME="existing_profiles" -->
<div id="csvedit">
<h3>Modify or delete a CSV export profile</h3>
<form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
<fieldset class="rows">
<ol><li><label for="modify_profile_name">Profile name: </label>
<select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)">
<option value="0">-- Choose One --</option>
<!-- TMPL_LOOP NAME="existing_profiles" -->
<!-- TMPL_IF EXPR="export_format_id eq selected_profile_id" -->
<option value="<!-- TMPL_VAR NAME="export_format_id" -->" selected="selected"><!-- TMPL_VAR NAME="profile" --></option>
<!--TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="export_format_id" -->"><!-- TMPL_VAR NAME="profile" --></option>
<!-- /TMPL_IF-->
<!-- /TMPL_LOOP -->
</select></li>
<li><label for="modify_profile_description">Profile description: </label>
<textarea cols="50" rows="2" name="profile_description" id="modify_profile_description"><!-- TMPL_VAR NAME="selected_profile_description" --></textarea></li>
<li><label for="csv_separator">CSV separator: </label>
<select name="csv_separator" id="csv_separator">
<option value=":">Colon (:)</option>
<!-- TMPL_IF EXPR="selected_csv_separator eq ','" -->
<option value="," selected="selected">Comma (,)</option>
<!--TMPL_ELSE -->
<option value=",">Comma (,)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_csv_separator eq '|'" -->
<option value="|" selected="selected">Pipe (|)</option>
<!--TMPL_ELSE -->
<option value="|">Pipe (|)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_csv_separator eq ';'" -->
<option value=";" selected="selected">Semi-colon (;)</option>
<!--TMPL_ELSE -->
<option value=";">Semi-colon (;)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_csv_separator eq '#'" -->
<option value="#" selected="selected">Sharp (#)</option>
<!--TMPL_ELSE -->
<option value="#">Sharp (#)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_csv_separator eq ' '" -->
<option value=" " selected="selected">Space ( )</option>
<!--TMPL_ELSE -->
<option value=" ">Space ( )</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_csv_separator eq '\t'" -->
<option value="\t" selected="selected">Tabulation (\t)</option>
<!--TMPL_ELSE -->
<option value="\t">Tabulation (\t)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_csv_separator eq '\n'" -->
<option value="\n" selected="selected">New line (\n)</option>
<!--TMPL_ELSE -->
<option value="\n">New line (\n)</option>
<!-- /TMPL_IF -->
</select></li>
<li><label for="field_separator">Field separator: </label>
<select name="field_separator" id="field_separator">
<option value=":">Colon (:)</option>
<!-- TMPL_IF EXPR="selected_field_separator eq ','" -->
<option value="," selected="selected">Comma (,)</option>
<!--TMPL_ELSE -->
<option value=",">Comma (,)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_field_separator eq '|'" -->
<option value="|" selected="selected">Pipe (|)</option>
<!--TMPL_ELSE -->
<option value="|">Pipe (|)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_field_separator eq ';'" -->
<option value=";" selected="selected">Semi-colon (;)</option>
<!--TMPL_ELSE -->
<option value=";">Semi-colon (;)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_field_separator eq '#'" -->
<option value="#" selected="selected">Sharp (#)</option>
<!--TMPL_ELSE -->
<option value="#">Sharp (#)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_field_separator eq ' '" -->
<option value=" " selected="selected">Space ( )</option>
<!--TMPL_ELSE -->
<option value=" ">Space ( )</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_field_separator eq '\t'" -->
<option value="\t" selected="selected">Tabulation (\t)</option>
<!--TMPL_ELSE -->
<option value="\t">Tabulation (\t)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_field_separator eq '\n'" -->
<option value="\n" selected="selected">New line (\n)</option>
<!--TMPL_ELSE -->
<option value="\n">New line (\n)</option>
<!-- /TMPL_IF -->
</select></li>
<li><label for="subfield_separator">Subfield separator: </label>
<select name="subfield_separator" id="subfield_separator">
<option value=":">Colon (:)</option>
<!-- TMPL_IF EXPR="selected_subfield_separator eq ','" -->
<option value="," selected="selected">Comma (,)</option>
<!--TMPL_ELSE -->
<option value=",">Comma (,)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_subfield_separator eq '|'" -->
<option value="|" selected="selected">Pipe (|)</option>
<!--TMPL_ELSE -->
<option value="|">Pipe (|)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_subfield_separator eq ';'" -->
<option value=";" selected="selected">Semi-colon (;)</option>
<!--TMPL_ELSE -->
<option value=";">Semi-colon (;)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_subfield_separator eq '#'" -->
<option value="#" selected="selected">Sharp (#)</option>
<!--TMPL_ELSE -->
<option value="#">Sharp (#)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_subfield_separator eq ' '" -->
<option value=" " selected="selected">Space ( )</option>
<!--TMPL_ELSE -->
<option value=" ">Space ( )</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_subfield_separator eq '\t'" -->
<option value="\t" selected="selected">Tabulation (\t)</option>
<!--TMPL_ELSE -->
<option value="\t">Tabulation (\t)</option>
<!-- /TMPL_IF -->
<!-- TMPL_IF EXPR="selected_subfield_separator eq '\n'" -->
<option value="\n" selected="selected">New line (\n)</option>
<!--TMPL_ELSE -->
<option value="\n">New line (\n)</option>
<!-- /TMPL_IF -->
</select></li>
<li><label for="encoding">Encoding: </label>
<select name="encoding" id="encoding">
<!-- TMPL_LOOP NAME="encodings" -->
<!-- TMPL_IF EXPR="selected_encoding eq encoding" -->
<option selected="selected"><!-- TMPL_VAR NAME="encoding" --></option>
<!--TMPL_ELSE -->
<option><!-- TMPL_VAR NAME="encoding" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></li>
<li><label for="modify_profile_content">Profile marcfields: </label>
<textarea cols="50" rows="2" name="profile_content" id="modify_profile_content"><!-- TMPL_VAR NAME="selected_profile_marcfields" --></textarea></li>
<li class="radio"> <label for="delete">Delete selected profile ?</label>
<input type="checkbox" name="delete" id="delete" /></li>
</ol>
</fieldset>
<fieldset class="action"><input type="hidden" name="modify_profile_id" value="<!-- TMPL_VAR NAME="selected_profile_id" -->" />
<input type="hidden" name="action" value="edit" />
<input type="submit" value="Submit" /> <a href="/cgi-bin/koha/tools/csv-profiles.pl" class="cancel">Cancel</a></fieldset>
</form>
</div>
<!-- /TMPL_IF -->
</div>
</div>
</div>
<div class="yui-b noprint">
<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->