X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Ftools%2Fcsv-profiles.tt;h=35b7b46132b84145281187fe603b29110440959e;hb=c0d420f42a293e68228bbe7fa95545a08fd2c964;hp=242e7f9a7c151ce3588f15526640883d01715973;hpb=60186fa42fa0742eb3e8484f1fd4b16e04d32ae1;p=koha.git diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt index 242e7f9a7c..35b7b46132 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt @@ -6,7 +6,40 @@ function reloadPage(p) { if (id != 0) { document.location = "/cgi-bin/koha/tools/csv-profiles.pl?id=" + id; } } $(document).ready(function() { - $('#csvexporttabs > ul').tabs(); + $('#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(); }); //]]> @@ -28,33 +61,46 @@ function reloadPage(p) {
[% IF ( success || error ) %] [% IF ( success ) %] - [% IF ( action == 'create' ) %]

The new CSV profile "[% profile_name %]" has been successfully created.

[% END %] - [% IF ( action == 'edit' ) %]

The CSV profile has been successfully modified.

[% END %] - [% IF ( action == 'delete' ) %]

The CSV profile has been successfully deleted.

[% END %] - [% ELSE %] - [% IF ( action == 'create' ) %]

The new CSV profile "[% profile_name %]" has not been created.

[% END %] - [% IF ( action == 'edit' ) %]

The CSV profile has not been modified.

[% END %] - [% IF ( action == 'delete' ) %]

The CSV profile has not been deleted.

[% END %] + [% IF ( action == 'create' ) %]
The new CSV profile "[% profile_name %]" has been successfully created.
[% END %] + [% IF ( action == 'edit' ) %]
The CSV profile has been successfully modified.
[% END %] + [% IF ( action == 'delete' ) %]
The CSV profile has been successfully deleted.
[% END %] + [% ELSE %] + [% IF ( action == 'create' ) %]
The new CSV profile "[% profile_name %]" has not been created.
[% END %] + [% IF ( action == 'edit' ) %]
The CSV profile has not been modified.
[% END %] + [% IF ( action == 'delete' ) %]
The CSV profile has not been deleted.
[% END %] [% END %] [% END %]

New CSV export profile

-
+
-
  1. -
  2. +
      +
    1. + + + Required +
    2. + +
    3. + + + Required +
    4. @@ -72,7 +118,7 @@ function reloadPage(p) { -
    5. +
    6. -
    7. +
    8. -
    9. +
    10. -
    11. - +
    12. + + + Required

      You have to define which fields or subfields you want to export, separated by pipes.

      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.

      Example: Personal name=200|Entry element=210$a|300|009

      +

      You can use Template Toolkit tags too. See the help page for more information.

    13. +
    14. + + +

      You have to define which fields you want to export, separated by pipes.

      +

      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.

      +

      Example: Name=subscription.name|Title=subscription.title|Issue number=serial.serialseq

      +
@@ -127,10 +183,11 @@ function reloadPage(p) {

Modify or delete a CSV export profile

- +
-
  1. - [% FOREACH existing_profile IN existing_profiles %] [% IF ( existing_profile.export_format_id == selected_profile_id ) %] @@ -139,7 +196,23 @@ function reloadPage(p) { [% END %] [% END %] -
  2. + + Required + + +
  3. + + + Required +
  4. +
  5. @@ -184,7 +257,7 @@ function reloadPage(p) { [% END %] -
  6. +
  7. -
  8. +
  9. -
  10. +
  11. -
  12. -
  13. +
  14. + + + Required +
  15. + +
  16. + + +
  17. -
  18. +