View | Details | Raw Unified | Return to bug 12404
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/csv-profiles.tt (-1 / +86 lines)
Lines 52-57 Link Here
52
52
53
<p>Your CSV Profiles will appear on the export list or cart menu under the 'Download' button in both the staff client and the OPAC</p>
53
<p>Your CSV Profiles will appear on the export list or cart menu under the 'Download' button in both the staff client and the OPAC</p>
54
54
55
<h3>Template Toolkit tags</h3>
56
[% TAGS [- -] %]
57
<p>You can use Template Toolkit tags in order to build complex CSV files.</p>
58
<p>To access to the field list of the current record, you have to use the 'fields' variables (which is a hashref).</p>
59
<p>All fields of the record is content into this variable in a "field tag name" key.</p>
60
<p>In order to manage multi-valuated field and subfields, the field and subfields are stored into an arrayref</p>
61
<p>For example, the following MARC record:</p>
62
<pre>
63
008 - FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION
64
  @ 140211b xxu||||| |||| 00| 0 eng d
65
66
100 ## - MAIN ENTRY--PERSONAL NAME
67
  a Personal name My author
68
69
245 ## - TITLE STATEMENT
70
  a Title My first title
71
  a Title My second title
72
  b Remainder of title My remainder
73
74
245 ## - TITLE STATEMENT
75
  a Title My third title
76
</pre>
77
<p>will be stored into the following structure:</p>
78
<pre>
79
{
80
    fields =&gt; {
81
                008 =&gt; [
82
                        "140211b xxu||||| |||| 00| 0 eng d"
83
                ],
84
                100 =&gt; [
85
                            {
86
                                a =&gt; [
87
                                    "My author"
88
                                ]
89
                            }
90
                ]
91
                245 =&gt; [
92
                            {
93
                                a =&gt; [
94
                                    "My first title",
95
                                    "My second title"
96
                                ],
97
                                b =&gt; [
98
                                    "My remainder"
99
                                ]
100
                            },
101
                            {
102
                                a =&gt; [
103
                                    "My third title"
104
                                ]
105
                            }
106
                ]
107
    }
108
}
109
</pre>
110
<p>The indicators can be accessible using the 'indicator' key.</p>
111
<p>Example: [% fields.245.0.indicator.1 %] is the indicator 1 for the first 245 field.</p>
112
113
<p>Some examples:</p>
114
<ul>
115
  <li>Display all 245$a and 245$c into the same column:
116
    <p>
117
    [% FOREACH field IN fields.245 %]
118
        [% field.a %] [% field.c %]
119
    [% END %]
120
    </p>
121
  </li>
122
  <li>Display 650$a if indicator 2 for 650 is set
123
    <p>
124
    Subject=[% FOREACH field IN fields.650 %][% IF field.indicator.2 %][% field.a.0 %][% END %][% END %]
125
    </p>
126
  </li>
127
  <li>Display the language from the control field 008
128
    <p>
129
    Language=[% fields.008.0.substr( 28, 3 ) %]
130
    </p>
131
  </li>
132
  <li>Display the first subfield a for first field 245 if indicator 1 for field 100 is set
133
    <p>
134
    Title=[% IF fields.100.0.indicator.1 %][% fields.245.0.a.0 %][% END %]
135
    </p>
136
  </li>
137
</ul>
138
<p>Note that the authorized values won't be replaced by their descriptions.</p>
139
55
<p><strong>See the full documentation for CSV Profiles in the <a href="http://manual.koha-community.org/[% helpVersion %]/en/csvprofiles.html">manual</a> (online).</strong></p>
140
<p><strong>See the full documentation for CSV Profiles in the <a href="http://manual.koha-community.org/[% helpVersion %]/en/csvprofiles.html">manual</a> (online).</strong></p>
56
141
57
[% INCLUDE 'help-bottom.inc' %]
142
[- INCLUDE 'help-bottom.inc' -]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt (-1 / +1 lines)
Lines 163-168 function reloadPage(p) { Link Here
163
						    <p>You have to define which fields or subfields you want to export, separated by pipes.</p>
163
						    <p>You have to define which fields or subfields you want to export, separated by pipes.</p>
164
                            <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>
164
                            <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>
165
						    <p>Example: Personal name=200|Entry element=210$a|300|009</p>
165
						    <p>Example: Personal name=200|Entry element=210$a|300|009</p>
166
                            <p>You can use Template Toolkit tags too. See the help page for more information.</p>
166
						    </li>
167
						    </li>
167
                            <li class="sql_specific">
168
                            <li class="sql_specific">
168
                              <label for="new_profile_sql_content" class="required">Profile SQL fields: </label>
169
                              <label for="new_profile_sql_content" class="required">Profile SQL fields: </label>
169
- 

Return to bug 12404