Owen Leonard
8a124f8951
The recent upgrade to jQueryUI didn't take into account the new method for forcing selection of a tab by adding a class to the tab markup. This patch corrects this by updating the class name. This patch also updates one instance where it was necessary to switch to the new function for selecting a tab by ID, introduced by Bug 12075. To test, view the following pages: - Perform a catalog search in the staff client. On the search results page the "Search the catalog" tab should be selected. - In Acquisitions, view the basket groups page for a vendor which has open and closed basket groups (/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=X). Append "&listclosed=1" to the URL. The "Closed" tab should be selected. - In Administration -> Authorized values, modify an authorized value for which an icon has been selected. When the edit form loads the corresponding icon tab should be selected. - In Administration -> Item types, modify an itemtype for which an icon has been selected. When the edit form loads the corresponding icon tab should be selected. - In Cataloging, open an existing record and select any tab besides the first one. Choose "Save and continue editing" from the Save menu. When the page reloads you should be returned to the tab you selected before. - In Suggestions, markup for selected the tab has been removed because it didn't appear to be performing any function. The first tab is selected by default. The template doesn't need to explicitly add a class to make it so. - In Tools -> CSV profiles, choose an existing profile for editing. When the page loads the "Edit existing profile" tab should be selected. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: Unable to duplicate Cataloging step issue, but there is no visible regression with the patch. The second part of the addbiblio.tt portion of the patch is clearly correct, because it is the same type of change as made in the other sections. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
383 lines
18 KiB
Text
383 lines
18 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Tools › CSV export profiles</title>[% INCLUDE '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').tabs();
|
|
|
|
$("#profile_type").find("option:first").attr("selected", "selected");
|
|
$("#csvnew").find("li.marc_specific").show();
|
|
$("#csvnew").find("li.sql_specific").hide();
|
|
|
|
$("#profile_type").change(function(){
|
|
if ( $(this).find("option:selected").val() == "marc" ) {
|
|
$("#csvnew li.marc_specific").show();
|
|
$("#new_profile_marc_content").attr("required", "required");
|
|
$("#csvnew li.sql_specific").hide();
|
|
$("#new_profile_sql_content").removeAttr("required");
|
|
} else {
|
|
$("#csvnew li.marc_specific").hide();
|
|
$("#new_profile_marc_content").removeAttr("required");
|
|
$("#csvnew li.sql_specific").show();
|
|
$("#new_profile_sql_content").attr("required", "required");
|
|
}
|
|
});
|
|
$("#modify_profile_type").change(function(){
|
|
if ( $(this).find("option:selected").val() == "marc" ) {
|
|
$("#csvedit li.marc_specific").show();
|
|
$("#modify_profile_marc_content").attr("required", "required");
|
|
$("#csvedit li.sql_specific").hide();
|
|
$("#modify_profile_sql_content").removeAttr("required");
|
|
} else {
|
|
$("#csvedit li.marc_specific").hide();
|
|
$("#modify_profile_marc_content").removeAttr("required");
|
|
$("#csvedit li.sql_specific").show();
|
|
$("#modify_profile_sql_content").attr("required", "required");
|
|
}
|
|
});
|
|
$("#profile_type").change();
|
|
$("#modify_profile_type").change();
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
|
|
<body id="tools_csv-profiles" class="tools">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
|
|
› CSV export profiles
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
[% IF ( success || error ) %]
|
|
[% IF ( success ) %]
|
|
[% IF ( action == 'create' ) %]<div class="dialog message">The new CSV profile "[% profile_name %]" has been successfully created.</div>[% END %]
|
|
[% IF ( action == 'edit' ) %]<div class="dialog message">The CSV profile has been successfully modified.</div>[% END %]
|
|
[% IF ( action == 'delete' ) %]<div class="dialog message">The CSV profile has been successfully deleted.</div>[% END %]
|
|
[% ELSE %]
|
|
[% IF ( action == 'create' ) %]<div class="dialog alert">The new CSV profile "[% profile_name %]" has not been created.</div>[% END %]
|
|
[% IF ( action == 'edit' ) %]<div class="dialog alert">The CSV profile has not been modified.</div>[% END %]
|
|
[% IF ( action == 'delete' ) %]<div class="dialog alert">The CSV profile has not been deleted.</div>[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
<div id="csvexporttabs" class="toptabs">
|
|
<ul>
|
|
<li><a href="#csvnew">New profile</a></li>
|
|
[% IF ( existing_profiles ) %]
|
|
[% IF ( selected_profile_id ) %]
|
|
<li class="ui-tabs-active">
|
|
[% ELSE %]
|
|
<li>
|
|
[% END %]
|
|
<a href="#csvedit">Edit existing profile</a></li> [% END %]
|
|
</ul>
|
|
<div id="csvnew">
|
|
<h3>New CSV export profile</h3>
|
|
|
|
<form action="/cgi-bin/koha/tools/csv-profiles.pl" class="validated" 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" required="required" /></li>
|
|
|
|
<li>
|
|
<label for="profile_type" class="required">Profile type: </label>
|
|
<select id="profile_type" name="profile_type">
|
|
<option value="marc" selected="selected">MARC</option>
|
|
<option value="sql">SQL</option>
|
|
</select>
|
|
</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 class="marc_specific"><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 class="marc_specific"><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 class="marc_specific"><label for="new_encoding">Encoding: </label>
|
|
<select name="encoding" id="new_encoding">
|
|
[% FOREACH encoding IN encodings %]
|
|
[% IF ( encoding.encoding == 'utf8' ) %]
|
|
<option selected="selected">[% encoding.encoding %]</option>
|
|
[% ELSE %]
|
|
<option>[% encoding.encoding %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
|
|
|
|
<li class="marc_specific"><label for="new_profile_marc_content" class="required">Profile MARC fields: </label>
|
|
<textarea cols="50" rows="2" name="profile_marc_content" id="new_profile_marc_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>
|
|
<li class="sql_specific">
|
|
<label for="new_profile_sql_content" class="required">Profile SQL fields: </label>
|
|
<textarea cols="50" rows="2" name="profile_sql_content" id="new_profile_sql_content"></textarea>
|
|
<p>You have to define which fields 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 name with an header, followed by the equal sign.</p>
|
|
<p>Example: Name=subscription.name|Title=subscription.title|Issue number=serial.serialseq</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>
|
|
[% IF ( existing_profiles ) %]
|
|
<div id="csvedit">
|
|
<h3>Modify or delete a CSV export profile</h3>
|
|
|
|
<form action="/cgi-bin/koha/tools/csv-profiles.pl" class="validated" method="post">
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li><label for="modify_profile_name" class="required">Profile name: </label>
|
|
<select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)">
|
|
<option value="0">-- Choose One --</option>
|
|
[% FOREACH existing_profile IN existing_profiles %]
|
|
[% IF ( existing_profile.export_format_id == selected_profile_id ) %]
|
|
<option value="[% existing_profile.export_format_id %]" selected="selected">[% existing_profile.profile %]</option>
|
|
[% ELSE %]
|
|
<option value="[% existing_profile.export_format_id %]">[% existing_profile.profile %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
|
|
<li>
|
|
<label for="modify_profile_type" class="required">Profile type: </label>
|
|
<select id="modify_profile_type" name="profile_type">
|
|
<option value="marc">MARC</option>
|
|
[% IF selected_profile_type == "sql" %]
|
|
<option value="sql" selected="selected">SQL</option>
|
|
[% ELSE %]
|
|
<option value="sql">SQL</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
|
|
<li><label for="modify_profile_description">Profile description: </label>
|
|
<textarea cols="50" rows="2" name="profile_description" id="modify_profile_description">[% selected_profile_description %]</textarea></li>
|
|
|
|
<li><label for="csv_separator">CSV separator: </label>
|
|
<select name="csv_separator" id="csv_separator">
|
|
<option value=":">Colon (:)</option>
|
|
[% IF ( selected_csv_separator == ',' ) %]
|
|
<option value="," selected="selected">Comma (,)</option>
|
|
[% ELSE %]
|
|
<option value=",">Comma (,)</option>
|
|
[% END %]
|
|
[% IF ( selected_csv_separator == '|' ) %]
|
|
<option value="|" selected="selected">Pipe (|)</option>
|
|
[% ELSE %]
|
|
<option value="|">Pipe (|)</option>
|
|
[% END %]
|
|
[% IF ( selected_csv_separator == ';' ) %]
|
|
<option value=";" selected="selected">Semi-colon (;)</option>
|
|
[% ELSE %]
|
|
<option value=";">Semi-colon (;)</option>
|
|
[% END %]
|
|
[% IF ( selected_csv_separator == '#' ) %]
|
|
<option value="#" selected="selected">Sharp (#)</option>
|
|
[% ELSE %]
|
|
<option value="#">Sharp (#)</option>
|
|
[% END %]
|
|
[% IF ( selected_csv_separator == ' ' ) %]
|
|
<option value=" " selected="selected">Space ( )</option>
|
|
[% ELSE %]
|
|
<option value=" ">Space ( )</option>
|
|
[% END %]
|
|
[% IF ( selected_csv_separator == '\t' ) %]
|
|
<option value="\t" selected="selected">Tabulation (\t)</option>
|
|
[% ELSE %]
|
|
<option value="\t">Tabulation (\t)</option>
|
|
[% END %]
|
|
[% IF ( selected_csv_separator == '\n' ) %]
|
|
<option value="\n" selected="selected">New line (\n)</option>
|
|
[% ELSE %]
|
|
<option value="\n">New line (\n)</option>
|
|
[% END %]
|
|
</select></li>
|
|
|
|
<li class="marc_specific"><label for="field_separator">Field separator: </label>
|
|
<select name="field_separator" id="field_separator">
|
|
<option value=":">Colon (:)</option>
|
|
|
|
[% IF ( selected_field_separator == ',' ) %]
|
|
<option value="," selected="selected">Comma (,)</option>
|
|
[% ELSE %]
|
|
<option value=",">Comma (,)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_field_separator == '|' ) %]
|
|
<option value="|" selected="selected">Pipe (|)</option>
|
|
[% ELSE %]
|
|
<option value="|">Pipe (|)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_field_separator == ';' ) %]
|
|
<option value=";" selected="selected">Semi-colon (;)</option>
|
|
[% ELSE %]
|
|
<option value=";">Semi-colon (;)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_field_separator == '#' ) %]
|
|
<option value="#" selected="selected">Sharp (#)</option>
|
|
[% ELSE %]
|
|
<option value="#">Sharp (#)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_field_separator == ' ' ) %]
|
|
<option value=" " selected="selected">Space ( )</option>
|
|
[% ELSE %]
|
|
<option value=" ">Space ( )</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_field_separator == '\t' ) %]
|
|
<option value="\t" selected="selected">Tabulation (\t)</option>
|
|
[% ELSE %]
|
|
<option value="\t">Tabulation (\t)</option>
|
|
[% END %]
|
|
[% IF ( selected_field_separator == '\n' ) %]
|
|
<option value="\n" selected="selected">New line (\n)</option>
|
|
[% ELSE %]
|
|
<option value="\n">New line (\n)</option>
|
|
[% END %]
|
|
</select></li>
|
|
|
|
|
|
<li class="marc_specific"><label for="subfield_separator">Subfield separator: </label>
|
|
<select name="subfield_separator" id="subfield_separator">
|
|
<option value=":">Colon (:)</option>
|
|
|
|
[% IF ( selected_subfield_separator == ',' ) %]
|
|
<option value="," selected="selected">Comma (,)</option>
|
|
[% ELSE %]
|
|
<option value=",">Comma (,)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_subfield_separator == '|' ) %]
|
|
<option value="|" selected="selected">Pipe (|)</option>
|
|
[% ELSE %]
|
|
<option value="|">Pipe (|)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_subfield_separator == ';' ) %]
|
|
<option value=";" selected="selected">Semi-colon (;)</option>
|
|
[% ELSE %]
|
|
<option value=";">Semi-colon (;)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_subfield_separator == '#' ) %]
|
|
<option value="#" selected="selected">Sharp (#)</option>
|
|
[% ELSE %]
|
|
<option value="#">Sharp (#)</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_subfield_separator == ' ' ) %]
|
|
<option value=" " selected="selected">Space ( )</option>
|
|
[% ELSE %]
|
|
<option value=" ">Space ( )</option>
|
|
[% END %]
|
|
|
|
[% IF ( selected_subfield_separator == '\t' ) %]
|
|
<option value="\t" selected="selected">Tabulation (\t)</option>
|
|
[% ELSE %]
|
|
<option value="\t">Tabulation (\t)</option>
|
|
[% END %]
|
|
[% IF ( selected_subfield_separator == '\n' ) %]
|
|
<option value="\n" selected="selected">New line (\n)</option>
|
|
[% ELSE %]
|
|
<option value="\n">New line (\n)</option>
|
|
[% END %]
|
|
|
|
</select></li>
|
|
|
|
<li class="marc_specific"><label for="encoding">Encoding: </label>
|
|
<select name="encoding" id="encoding">
|
|
[% FOREACH encoding IN encodings %]
|
|
[% IF ( selected_encoding == encoding.encoding ) %]
|
|
<option selected="selected">[% encoding.encoding %]</option>
|
|
[% ELSE %]
|
|
<option>[% encoding.encoding %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
|
|
<li class="marc_specific"><label for="modify_profile_marc_content" class="required">Profile MARC fields: </label>
|
|
<textarea cols="50" rows="2" name="profile_marc_content" id="modify_profile_marc_content">[% selected_profile_content %]</textarea></li>
|
|
|
|
<li class="sql_specific">
|
|
<label for="modify_profile_sql_content" class="required">Profile SQL fields: </label>
|
|
<textarea cols="50" rows="2" name="profile_sql_content" id="modify_profile_sql_content">[% selected_profile_content %]</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="[% 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>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="yui-b noprint">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|