1st draft for MARC biblio deletion.
Still does not work well, but at least, Biblio.pm compiles & it should'nt break too many things
(Note the trash in the MARCdetail, but don't use it, please :-) )
The 3 problem from yesterday are fixed :
* cc the + to each tab (for instance, only in tab 0)
* doing the french template
* fixing an annoying bug : everything is stored in the same field :
200$a$b$c$a$b$c and not
200$a$b$c
200$a$b$c
as expected.
100% FUNCTIONNAL (at least I expect !)
IMPORTANT NOTE :
ALL subfields from a field MUST be in the same tab. Otherwise, Koha can't magically find how to group subfields in case of repeted fields.
I'll add a check in checkmarc immediatly.
That's not a "bug" in Koha. That's mandatory because of MARC structure.
Near each field is a +
If you click on it, it's duplicated.
TODO :
* cc the + to each tab (for instance, only in tab 0)
* doing the french template
* fixing an annoying bug : everything is stored in the same field :
200$a$b$c$a$b$c and not
200$a$b$c
200$a$b$c
as expected.
You can add a new biblio/biblioitem/item now.
Currently you can only do this by using the Add biblio without ISBN/ISSN
link. The next task is to get the isbnsearch and title search linking to the
nonmarc scripts if marc support is off, and then to template them all.
z3950 search and import seems to works fine.
Let me explain how :
* a "search z3950" button is added in the addbiblio template.
* when clicked, a popup appears and z3950/search.pl is called
* z3950/search.pl calls addz3950search in the DB
* the z3950 daemon retrieve the records and stores them in z3950results AND in marc_breeding table.
* as long as there as searches pending, the popup auto refresh every 2 seconds, and says how many searches are pending.
* when the user clicks on a z3950 result => the parent popup is called with the requested biblio, and auto-filled
Note :
* character encoding support : (It's a nightmare...) In the z3950servers table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in this column. Depending on this, the char_decode in C4::Biblio.pm replaces marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import this value has been added too, for a better support.
* the marc_breeding and z3950* tables have been modified : they have an encoding column and the random z3950 number is stored too for convenience => it's the key I use to list only requested biblios in the popup.
It was due to an illegal contruction in Koha : we tried to retrive subfields from <10 tags.
That's not possible. MARC::Record accepted this in 0.93 version, but it was fixed after.
Now, the construct/retrieving is OK !
* worked in 1.9.0, but not in 1.9.1 :
- modif of a biblio didn't work
- empty fields where not shown when modifying a biblio. empty fields managed by the library (ie in tab 0->9 in MARC parameter table) MUST be entered, even if not presented.
* did not work before :
- repeatable subfields now works correctly. Enter 2 subfields separated by | and they will be splitted during saving.
- dropped the last subfield of the MARC form :-(
Internal changes :
- MARCmodbiblio now works by deleting and recreating the biblio. It's not perf optimized, but MARC is a "do_something_impossible_to_trace" standard, so, it's the best solution. not a problem for me, as biblio are rarely modified.
Note the MARCdelbiblio has been rewritted to enable deletion of a biblio WITHOUT deleting items.
Those fields doesn't have subfields.
In koha, we will use a specific "trick" : fields <10 will have a "virtual" subfield : "@".
Note it's only virtual : when rebuilding the MARC::Record, the koha API handle correctly "@" subfields => the resulting MARC record has a 00x field without subfield.
'mandatory' property to a per-subfield 'tag_mandatory' template parameter,
so that addbiblio.tmpl can distinguish between mandatory subfields in a
mandatory tag and mandatory subfields in an optional tag
Not-minor factoring in acqui.simple/addbiblio.pl to make the if-else blocks
smaller, and to add some POD; need further testing for this
Added function to check if a MARC subfield name is "koha-internal" (instead
of checking it for 'lib' and 'tag' everywhere); temporarily added to Koha.pm
Use above function in acqui.simple/additem.pl and search.marc/search.pl
Create output_html_with_http_headers function to contain the "print $query
->header(-type => guesstype...),..." call. This is in preparation for
non-HTML output (e.g., text/xml) and charset conversion before output in
the future.
Created C4/Interface/CGI/Template.pm to hold convenience functions specific
to the CGI interface using HTML::Template
Modified moremembers.pl to make the "sex" field localizable for languages
where M and F doesn't make sense
in ISO-8859-1.
A new C4::Charset module (tentative name) has been created to guess the
charset of a piece of HTML markup. The CGI programs will be modified to use
this module as they are encountered during translation.