Commit Graph

240 Commits

Author SHA1 Message Date
Michael Hafen 9cd7de6f98 bugfix breeding results of cataloging search has wrong id
The breeding id, rather than coming from the database, was set by a counter.
Not so good links in the search results that way.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:46 +02:00
Nahuel ANGELINETTI 32ff18380b (bug #2829) fix some mistakes extracting editor segment
This patch fix how to extract the editor segment, and improve ISBN10/13 support.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
2009-09-16 23:19:45 +02:00
Galen Charlton 36f9ac9be2 fix crash introduced in previous patch
In the previous patch,

-    my @subf = $field->subfields;
-    (defined @subf) or @subf = ();

is not equivalent to

+    my @subf = $field->subfields || ();

as, the results of $field->subields is interpeted in scalar
context, not list context, resutling in @subf containing
the number of subfields, not the subfield data itself, which
engenders the error

Can't use string ("1") as an ARRAY ref while "strict refs" in use

later on.  Changing the operator to 'or' instead of '||'
fixes this.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:41 +02:00
Joe Atzberger f6d2ffa984 Branch auto-selection in additem
Adding a new item should pre-select the library you are logged in at, where possible.
Use GetBranchesLoop.  This solves indy branches filtering, and sort order problems.
Set default off of ->{selected}, to establish pre-selected branch.
Fix flags check in onlymine sub, so superlibrarian + other flags still gets everything.
Removed defined(@array) check, since perl -wc warns it is deprecated.
Note new FIXME for botched date processing.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:41 +02:00
Colin Campbell a4f02a0fe7 Enable warnings in addbooks.pl Fix code generating undef and mis-matched op warnings Remove toggle variable
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:40 +02:00
Galen Charlton 84fe754654 bug 3263: Staff Search Results Interface Changes
Coding by Rick Welykochy <rick@praxis.com.au>

[1] Three new system preferences to enable particular
bib record views in the staff interface:

viewMARC
viewLabeledMARC
viewISBD

Implements enhancement 2642.

[2] New button in the regular and cataloging search results
   pages in the staff interface to allow the operator to redo
   the search against Z39.50 targets instead of the Koha database.

[3] Added copyright date and edition to cataloging and Z39.50 search results.
    Implements enhancement 2640.

Feature sponsored by MassCat.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-09-16 23:19:37 +02:00
Nahuel ANGELINETTI fae56bb880 (bug #3458) fix die and unimarc 700-4 plugin
This patch, fix the unimarc 700-4 plugin, adding the plugin_parameters() function.
And add an eval, that permit to have error in plugin, but don't die the editor.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:32 +02:00
Jean-André Santoni 6823b2387c [3.0.x](bug #3560) This add a filter to search by itemtype
The value builder for 4XX should be able to filter results by itemtype.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:31 +02:00
Jean-André Santoni 89d3293666 [3.0.x](bug #3549) Sorted framework options in the dropdown menu
In addbook.pl, the framwork options are sorted in random order. They should be
sorted in alphabetical order of value or code.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:30 +02:00
Nahuel ANGELINETTI ddd379f558 [followup](bug #3505) order collections by alphabetical order
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:30 +02:00
Nahuel ANGELINETTI cfee3bd2fb (bug #3505) fix 210c and 225a unimarc's plugins
This fix the 2 plugins, make 225a to work with koha 3.0, and fix 210c to be xhtml valid

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:30 +02:00
Jean-André Santoni c0e6e93dfa Auto incremental inventory number plugin
Renamed it stocknumber.pl to avoid confusion with the already existing inventory.pl

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:29 +02:00
Jean-André Santoni f45e342cdf This is a calatoguing plugin based on auth_finder but specific to one of our customers.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:29 +02:00
Nahuel ANGELINETTI cae90fc55b (bug #3395) fix unimarc plugin 225$a
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:28 +02:00
Colin Campbell f9f78672ea Avoid numeric comparisons with leading zeroes
Numbers in perl with leading zeros are interpreted in octal
Ensure that comparisons are done using string operators
or where appropriate use the MARC::Field method

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:28 +02:00
Nahuel ANGELINETTI 6b24bfa5a4 (bug #3505) fix 210c and 225a unimarc's plugins
This fix the 2 plugins, make 225a to work with koha 3.0, and fix 210c to be xhtml valid

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:23 +02:00
Nahuel ANGELINETTI f588516902 (bug #3398) fix unimarc 210c plugin
this add some args to SearchAuthority();
Fix the pagination, and fix javascript script.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:19 +02:00
Nahuel ANGELINETTI 89970dac25 (bug #3395) fix unimarc plugin 225$a
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:18 +02:00
Garry Collum a04a3241df Bug 2889: Removed toggle variable from z3950_search.pl.
Removed unused toggle variable from z3959_search.pl.  Added __odd__ variable to table in z3950_search.tmpl for non-javascript users.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:19:14 +02:00
Brian Harrington ba5ac9af28 Revisions to auto-generated authorities patch
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl.  I
also realized I can't count. :-)

Modified per comments by Joe and Galen to keep SetMarcUnicodeFlag
and move it and the leader set to earlier in the process.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:18:50 +02:00
Darrell Ulm 76cb1f06e8 BUG 1277 Enhance: Z39.50 More search criteria
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:18:50 +02:00
Michael Hafen 49a75f4d4f Use biblioitems.itemtype as a default for items.itype
This correct the html select default in additem.pl, and enforces use of
biblioitems.itemtype as the default in Items::AddItem.  The code in
Items is to catch items added through MARC record staging.

Thanks to Joe Atzberger for suggestion.

[RM note: this patch means that an item's item-level item type,
 once that item is added or updated via additem.pl,
 now cannot be blank or NULL unless the biblio-level item type
 is blank.]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:18:48 +02:00
Brian Harrington 5d21e60ad4 Patch to improve auto-generated MARC21 authorities
This patch makes sure that MARC21 authorities have a minimal
Leader, 008, and 040.  If an authority record is created through
BiblioAddsAuthority it generates a 670 based on information in
the bib record.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-09-16 23:18:48 +02:00
Chris Cormack 8e56810685 bug 2615: remove unneeded 'require Exporter'
Most Perl scripts (as opposed to modules) do
not need to require Exporter.

No user-visible or documentation changes.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>

Conflicts:

	catalogue/detail.pl
	cataloguing/value_builder/barcode.pl
	cataloguing/value_builder/dateaccessioned.pl
	cataloguing/value_builder/marc21_field_003.pl
	cataloguing/value_builder/marc21_field_005.pl
	cataloguing/value_builder/marc21_field_040c.pl
	cataloguing/value_builder/marc21_field_040d.pl
	opac/opac-authorities-home.pl
	opac/opac-detail.pl
	opac/opac-main.pl
	opac/opac-showreviews.pl
	opac/opac-suggestions.pl
	opac/sco/sco-main.pl
	tools/export.pl
2009-09-04 12:52:34 +12:00
Henri-Damien LAURENT f15c5eb843 Bug Fix 3320 : condition on enabling field input was wrong 2009-06-26 10:33:59 +02:00
Henri-Damien LAURENT cb58b0e2bc Fixing Labtheses.pl 2009-05-26 21:15:31 +02:00
Galen Charlton 843ba6119c bug 3212: MARC21 bib leader plugin sets Leader/09 to 'a'
Changed the plugin so that the form for editing the MARC21
leader now sets postion 9 (character coding) to 'a' (UCS/Unicode)
and no longer gives the cataloger the option to change it.  Koha
uses UTF-8 exclusively for MARC records, and a number of bugs
can be triggered by storing MARC21 bib and authority record
whose Leader/09 is anything other than 'a'.  Since internal
routines are increasingly ensuring that the MARC21 Leader/09 is
set to 'a', it doesn't make sense to give catalogers the idea
that it's possible (or a good idea) to set the Leader/09 to any
other value.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:28 +02:00
Owen Leonard 215faf57ee Changes to tabindex values to improve keyboard access.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:25 +02:00
Joe Atzberger 139ffdf7d7 Remove unused $toggle code
Some trivial other cleanups also.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:21 +02:00
Brian Harrington bb69b67866 Revisions to auto-generated authorities patch
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl.  I
also realized I can't count. :-)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:17 +02:00
Andrew Moore e0a191751d refactor: removing a few unnecessary loops and moving HTML out of script into template
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:17 +02:00
Brian Harrington d44306b807 Patch to improve auto-generated MARC21 authorities
This patch makes sure that MARC21 authorities have a minimal
Leader, 008, and 040.  If an authority record is created through
BiblioAddsAuthority it generates a 670 based on information in
the bib record.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:15 +02:00
Jane Wagner 1bad305181 Bug 3013 Fix for 007 value builder to include all material types
Delivered version only had Text material type; this patch includes
all 14 material types with appropriate values for each.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:12 +02:00
Joe Atzberger 00ba07b595 Bug 2919 -- fix value_builder plugins for dateaccessioned, barcode
This patch depends on my previous one "Begin cleanup on additem" and
fixes one bug introduced in that patch.

Overhaul of additem sections to factor out common pieces especially attributes.
Plugin js vastly simplified and reimplemented in jquery.  Performance improved.

Note that a particularly busy cataloging department should still leave
barcode blank for server-side autopopulation to avoid collision.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:09 +02:00
Joe Atzberger 29c586dc83 Begin cleanup on additem.
REFACTOR logic out of conditional branches when the assignment ($nextop) is the same.
Be sure to EXIT after printing a redirect, instead of wasting clock filling in the
template for a process the user will never see.  Remove  the now inapplicable logic for
differentiation between "/cgi-bin" and "non /cgi-bin" installations.  There is no
longer any /cgi-bin in the actual directory file path.

This does not fix the value_builder js errors like "Blurbarcode52251 is not defined",
but it does not cause them either (see Bug 2919).

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:09 +02:00
Frédéric Demians 43ca3c980d Bug #3071 - Z39.50 search result highlights are mixed
This patch modifies z3950 search result page in order to
use jquery to highlight rows rather than an explicit
css class.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:05 +02:00
Joe Atzberger 7f432389c0 cleanup some of value_builder MARC21 plugins
Tons of unnecessary dependencies removed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:04 +02:00
Joe Atzberger 038730d627 perltidy some ugly value_builder plugins
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:04 +02:00
Nahuel ANGELINETTI 52ccd30b45 (bug #3063) fix unimarc 4xx plugin with cloned field
this patch fix the unimarc plugin 4xx to work with cloned fields, the id of the div wasn't replaced when the field was cloned.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:04 +02:00
Owen Leonard d46788c1b4 Changes to tabindex values to improve keyboard access.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-05-26 21:15:02 +02:00
Nahuel Angelinetti a85644a885 Delete all calls to thesaurus_popup.pl, and no more used plugins.
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 11:09:42 +01:00
Nahuel Angelinetti 3d1a6e20d7 Move checks of additem.pl to the API
This patch create a new function DelItemCheck, that add some checks before deleting an item and return 1 if it worked fine, else an error
code (the same as in additem.pl).

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-03-06 11:09:41 +01:00
Nahuel ANGELINETTI 40115eb110 (bug #2978) fix differents bugs in marc editor
This patch fix two bugs:

 * tag duplication
If you try to duplicate an autority tag, the javascript call is kept, and the id is not modified, and fields are not emptied.

 * openAuth() call
The id called on duplicated fields is not the great id.
And the different values sent to auth_finder.pl to pre-fetch datas from firstname, etc... send values from all same tags, and not from the selected tag.
2009-03-04 12:47:40 +01:00
Nahuel ANGELINETTI 93ea9b6eb7 (bug #2956) fix 4xx plugin pagination
this patch rework the calculation of the pagination and of results
2009-03-04 12:45:36 +01:00
Nahuel ANGELINETTI aeffe53f90 (bug #2956) fix another results calculation
this patch fix more about 4XX plugin, for results display and calculation.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-17 15:51:54 +01:00
Chris Nighswonger 5f7af3996d kohabug 2955 (2/2) GetMarcFromKohaField now requires $framework
Failure to pass the $framework parameter by dateaccessioned.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.

This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-11 18:56:08 +01:00
Henri-Damien LAURENT 3355adce2f Followup previous patch bug 2955 :
Some calls to GetMarcFromKohaField would not tell which framework to
use.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-11 18:31:44 +01:00
Chris Nighswonger bf40b53363 kohabug 2955 GetMarcFromKohaField now requires $framework
Failure to pass the $framework parameter by barcode.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.

This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.

fbcbug 4

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
2009-02-11 17:51:07 +01:00
Nahuel ANGELINETTI 021ceccee9 (bug #2914) delete all items of a notice
This patch allow the librarian to delete all items attached to a notice in one click.

Signed-off-by: Henri-Damien LAURENT <henridamien@koha-fr.org>
2009-01-27 12:19:47 +01:00
Nahuel Angelinetti dbddca1f5a bug 2829: add a plugin for 010$a field and 210$c
This plugin use the 'ISBN' field(010$a) to search the "publishercode"(editor) and set it in as 210$c.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-01-27 12:19:40 +01:00