From 57b48279bdf781e74329735fc3f5068da8398ac4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 Feb 2014 14:09:29 +0100 Subject: [PATCH] Bug 12404: Add some documentation in the help page. Signed-off-by: Courret Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../en/modules/help/tools/csv-profiles.tt | 87 ++++++++++++++++++- .../prog/en/modules/tools/csv-profiles.tt | 1 + 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt index 89a20bf954..327bb04797 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt @@ -52,6 +52,91 @@

Your CSV Profiles will appear on the export list or cart menu under the 'Download' button in both the staff client and the OPAC

+

Template Toolkit tags

+[% TAGS [- -] %] +

You can use Template Toolkit tags in order to build complex CSV files.

+

To access to the field list of the current record, you have to use the 'fields' variables (which is a hashref).

+

All fields of the record is content into this variable in a "field tag name" key.

+

In order to manage multi-valuated field and subfields, the field and subfields are stored into an arrayref

+

For example, the following MARC record:

+
+008 - FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION
+  @ 140211b xxu||||| |||| 00| 0 eng d
+
+100 ## - MAIN ENTRY--PERSONAL NAME
+  a Personal name My author
+
+245 ## - TITLE STATEMENT
+  a Title My first title
+  a Title My second title
+  b Remainder of title My remainder
+
+245 ## - TITLE STATEMENT
+  a Title My third title
+
+

will be stored into the following structure:

+
+{
+    fields => {
+                008 => [
+                        "140211b xxu||||| |||| 00| 0 eng d"
+                ],
+                100 => [
+                            {
+                                a => [
+                                    "My author"
+                                ]
+                            }
+                ]
+                245 => [
+                            {
+                                a => [
+                                    "My first title",
+                                    "My second title"
+                                ],
+                                b => [
+                                    "My remainder"
+                                ]
+                            },
+                            {
+                                a => [
+                                    "My third title"
+                                ]
+                            }
+                ]
+    }
+}
+
+

The indicators can be accessible using the 'indicator' key.

+

Example: [% fields.245.0.indicator.1 %] is the indicator 1 for the first 245 field.

+ +

Some examples:

+
    +
  • Display all 245$a and 245$c into the same column: +

    + [% FOREACH field IN fields.245 %] + [% field.a %] [% field.c %] + [% END %] +

    +
  • +
  • Display 650$a if indicator 2 for 650 is set +

    + Subject=[% FOREACH field IN fields.650 %][% IF field.indicator.2 %][% field.a.0 %][% END %][% END %] +

    +
  • +
  • Display the language from the control field 008 +

    + Language=[% fields.008.0.substr( 28, 3 ) %] +

    +
  • +
  • Display the first subfield a for first field 245 if indicator 1 for field 100 is set +

    + Title=[% IF fields.100.0.indicator.1 %][% fields.245.0.a.0 %][% END %] +

    +
  • +
+

Note that the authorized values won't be replaced by their descriptions.

+

See the full documentation for CSV Profiles in the manual (online).

-[% INCLUDE 'help-bottom.inc' %] \ No newline at end of file +[- INCLUDE 'help-bottom.inc' -] 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 7bbb0e46ce..785d853008 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 @@ -163,6 +163,7 @@ function reloadPage(p) {

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.

  • -- 2.39.5