* synching some recent changes to default template
* correction to markup that was preventing cloneTag function from working
* changing several embedded color specifications to class specifications to allow alternate color stylesheets
* markup and javascript syntax cleanup
when cloning a tag, there was a problem to detect the tag change when rebuilding the XML/MARC record :
the test was done on an empty field.
with the new CloneTag sub, this empty field was quite tricky to create on the fly.
so i've added on each subfield a <input name="firstsubfield"> saying wether the subfield is the 1st or not.
Thus, when a tag is cloned, it is cloned properly.
HTML2marc and well as HTML2xml have been modified, but PLEASE DOUBLE CHECK my work
2 things in this commit
- npl templates worked well for cloneSubfield, default one didn't. I couldn't understand why, so I ported npl template to default & just updated the stylesheet
- npl templates were awfully indented, so I indented them a little bit
- I thought for months that the idea of 10 tabs passed separately was crazy. So I fixed it : now there is just 1 (ONE) tab described in templates, that is looped by BIG_LOOP. The BIG_LOOP is filled by the build_tabs.
Works the same way as previously, except there is just 1 tab described in templates !!!
Things still to do :
- making cloneTag work correctly
- handle authorities popup, that is broken
- handle authorities reporting, that is broken too.
- ******** IMPORTANT *********
if TemplateEncoding system preference is set to iso8859-1, there are a lot of encoding problems : MARC::File::XML don't like it, as MARC::Record is supposed to work in MARC8 or UNICODE.
Thus, it seems that all accents are transformed in the process html => xml => marc.
Thus, i've reintroduced the html => marc behaviour if the TemplateEncoding is set to iso8859-1
(i've fixed the html2marc as joshua proposed previously, fixing a remaining bug)
This solution is a workaround : we will have to find a correct solution for Koha 3.0, to move every Koha to UNICODE and UNICODE only. But for instance, I tried some things but failed. Thust this solution, that works correctly for french libraries and should change nothing for unicode ones.
- moving color change on Check to the field itself, not to error$i container. error$i container is now useless and removed.
- changing active color to grey, yellow being for mandatory fields.
OPTIONS:
-format <format> MARC, MARCXML [MARC]
-e <encoding> MARC-8 or UTF-8 [UTF-8]
-ignoreerrors Ignore encoding errors
-assumeunicode Assume Unicode when unsure of encoding
-file <filename> Filename to store dump [koha.mrc]
-h This file
EXAMPLES:
\$ ./export.pl --format=MARCXML --encoding=UTF-8 -file=2005-05-23-koha.mrc --ignoreerrors
Once I'm able, I'll include unicode support in this script, or if
someone else has time, feel free. I'd suggest using the new code
in MARC::File::XML for dealing with encoding in UNIMARC