Bugzilla – Attachment 34409 Details for
Bug 12404
CSV profiles improvements (concatenations, substrings, conditions...)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12404: Add some documentation in the help page.
Bug-12404-Add-some-documentation-in-the-help-page.patch (text/plain), 5.01 KB, created by
Jonathan Druart
on 2014-12-15 10:53:16 UTC
(
hide
)
Description:
Bug 12404: Add some documentation in the help page.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-12-15 10:53:16 UTC
Size:
5.01 KB
patch
obsolete
>From 981c6ac061d4b5991d39e32e9b7b5f8bfa25d1e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 11 Feb 2014 14:09:29 +0100 >Subject: [PATCH] Bug 12404: Add some documentation in the help page. > >Signed-off-by: Courret <scourret@gmail.com> >--- > .../prog/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 89a20bf..327bb04 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 @@ > > <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> > >+<h3>Template Toolkit tags</h3> >+[% TAGS [- -] %] >+<p>You can use Template Toolkit tags in order to build complex CSV files.</p> >+<p>To access to the field list of the current record, you have to use the 'fields' variables (which is a hashref).</p> >+<p>All fields of the record is content into this variable in a "field tag name" key.</p> >+<p>In order to manage multi-valuated field and subfields, the field and subfields are stored into an arrayref</p> >+<p>For example, the following MARC record:</p> >+<pre> >+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 >+</pre> >+<p>will be stored into the following structure:</p> >+<pre> >+{ >+ 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" >+ ] >+ } >+ ] >+ } >+} >+</pre> >+<p>The indicators can be accessible using the 'indicator' key.</p> >+<p>Example: [% fields.245.0.indicator.1 %] is the indicator 1 for the first 245 field.</p> >+ >+<p>Some examples:</p> >+<ul> >+ <li>Display all 245$a and 245$c into the same column: >+ <p> >+ [% FOREACH field IN fields.245 %] >+ [% field.a %] [% field.c %] >+ [% END %] >+ </p> >+ </li> >+ <li>Display 650$a if indicator 2 for 650 is set >+ <p> >+ Subject=[% FOREACH field IN fields.650 %][% IF field.indicator.2 %][% field.a.0 %][% END %][% END %] >+ </p> >+ </li> >+ <li>Display the language from the control field 008 >+ <p> >+ Language=[% fields.008.0.substr( 28, 3 ) %] >+ </p> >+ </li> >+ <li>Display the first subfield a for first field 245 if indicator 1 for field 100 is set >+ <p> >+ Title=[% IF fields.100.0.indicator.1 %][% fields.245.0.a.0 %][% END %] >+ </p> >+ </li> >+</ul> >+<p>Note that the authorized values won't be replaced by their descriptions.</p> >+ > <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> > >-[% 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 7bbb0e4..785d853 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) { > <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> >+ <p>You can use Template Toolkit tags too. See the help page for more information.</p> > </li> > <li class="sql_specific"> > <label for="new_profile_sql_content" class="required">Profile SQL fields: </label> >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12404
:
28767
|
28768
|
28769
|
28770
|
28771
|
33170
|
33171
|
33172
|
33173
|
33174
|
33263
|
33477
|
34288
|
34289
|
34290
|
34291
|
34292
|
34293
|
34294
|
34300
|
34301
|
34302
|
34303
|
34405
|
34406
|
34407
|
34408
|
34409
|
34410
|
34411
|
35048
|
35049
|
35050
|
35051
|
35052
|
35053
|
35054