Commit graph

219 commits

Author SHA1 Message Date
Garry Collum
653d9b7284 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>
2009-06-29 08:06:53 -05:00
Colin Campbell
d633bd1ba1 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-06-24 09:02:59 -05:00
Nahuel ANGELINETTI
0fc4a490d3 (bug #2829) allow isbn13 in sql requests
this patch add the support of the plugin to search for isbn13.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-17 11:40:25 -05:00
Nahuel ANGELINETTI
7bad9ddb79 (bug #2829) mistake un isbn field
I compare the bad part of the isbn in my first version, now fixed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-17 11:40:21 -05:00
Paul Poulain
6924e7d6b4 fix for 2997 : superlibrarian's ability to edit item/patron home branch affected if all other privileges are selected
Before this patch, we used to test for flags == 1, which was wrong when patron had all privileges.
This patch just adds a %2 to check that patron has superlibrarian privilege, and maybe something else we don't care.

I think I fixed it everywhere except in acquisition, that will be addressed by BibLibre new acquisition module.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-28 17:06:46 -05:00
Galen Charlton
17ab0a7532 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-05-28 06:42:20 -05:00
Brian Harrington
a00f7b9568 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>
2009-05-15 15:39:05 -05:00
Darrell Ulm
f2c930257e BUG 1277 Enhance: Z39.50 More search criteria
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-15 09:48:20 -05:00
Galen Charlton
2f5a28ee6a 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>
2009-05-11 07:47:41 -05:00
Joe Atzberger
7a8e256263 Remove unused $toggle code
Some trivial other cleanups also.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-01 16:02:30 -05:00
Henri-Damien LAURENT
87cef586af Minor Feature : username when cataloguing
biblios can now be added librarian name automatically when cataloguing.
add "user" in the Default value of the biblio

[RM doc note: in other words, if in the MARC framework you set
 the default value of a subfield to 'user', the username of the
 cataloger will be entered into that subfield whenever you create
 or modify that bib in the Koha bib editor.]

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 21:38:02 -05:00
Galen Charlton
b6d67fc984 fix default authority search in bib editor
When clicking on the '...' of an headings field
in the bib editor, the authority search that
popped up did not take the default search
string from the bib field.  Fixed by making
sure that openAuth is always used to do the
popup link.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 20:36:28 -05:00
Brian Harrington
4c4cae22da 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>
2009-04-24 14:01:15 -05:00
Michael Hafen
34d3399149 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>
2009-04-24 10:26:57 -05:00
Andrew Moore
b15be22620 refactor: removing a few unnecessary loops and moving HTML out of script into template
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-04-24 08:48:38 -05:00
Brian Harrington
fe95a8ee9b 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>
2009-04-21 14:29:15 -05:00
Jane Wagner
d4241eeeda 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>
2009-04-18 15:25:58 -05:00
Joe Atzberger
ce760ba9e8 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>
2009-04-08 14:00:13 -05:00
Joe Atzberger
6ab1d8508d 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>
2009-04-08 13:54:43 -05:00
46c0706ee1 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>
2009-04-01 10:49:53 -05:00
Joe Atzberger
aef62d880c cleanup some of value_builder MARC21 plugins
Tons of unnecessary dependencies removed.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:50 -05:00
Joe Atzberger
1c5637032a perltidy some ugly value_builder plugins
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-27 19:06:46 -05:00
Nahuel ANGELINETTI
f62ee9385f (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>
2009-03-27 19:06:41 -05:00
0a2be5e29b Changes to tabindex values to improve keyboard access.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-11 08:37:21 -05:00
Nahuel ANGELINETTI
04f8382d5b (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.
(cherry picked from commit 40115eb110)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 08:39:51 -06:00
Henri-Damien LAURENT
1c14654c8e Using openAuth function for authorities Searching
Adding two js functions :
getSubfieldcode(tagsubfieldid)  returns the subfieldcode from tagsubfieldid
(tag_XXX_subfield_Y_WWWW_TTTT returns Y)
getTagInputnameFilter(tagsubfieldid)
(tag_XXX_subfield_Y_WWWW_TTTT returns tag_XXX_subfield_._WWWW)

I think those two functions are much useful when cataloguing.

openAuth now takes all the information for Heading search of authorities.

TODO A javascript DOM Navigation would be better.
This js works, but is surely slower than DOM would be.
Still, it seems that our DOM tree is quite hard to decode.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-03-06 08:34:27 -06:00
Galen Charlton
8f07521a2d bug 2955: fix remaining calls to GetMarcFromKohaField
This includes part of a patch from Henri-Damien Laurent
that could not be applied because Chris and Joe patches
happened to win the race.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 16:29:19 -06:00
Nahuel ANGELINETTI
6b4fed3b47 (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-12 14:47:41 -06:00
Chris Nighswonger
f185d69ad2 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: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:46:28 -06:00
Chris Nighswonger
db568fdee5 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: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:46:06 -06:00
Nahuel ANGELINETTI
f7628cac30 (bug #2956) fix 4xx plugin pagination
this patch rework the calculation of the pagination and of results

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-12 14:45:55 -06:00
Nahuel Angelinetti
7588809b0d 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>
2008-12-11 09:52:46 -06:00
Nahuel Angelinetti
f6cfcd933d No more used since a while.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 10:34:44 -06:00
Nahuel Angelinetti
e0bbb9d7e7 Delete all calls to thesaurus_popup.pl, and no more used plugins.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-12-01 10:31:46 -06:00
John Beppu
9f782076db bug 2563: could not input into marc 008, fields 7-10 and 11-14
You actually *could* input data into those fields, but it wasn't
immediately obvious, because the field size was "4" and the
value was "    ".  You couldn't type anything in until you
backspaced over the spaces that were there by default.

UPDATE 2008-11-05:  Make absolutely sure that those values
are 4 chars long (via JavaScript)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-11-06 15:53:24 -06:00
Nahuel Angelinetti
16fef8ba3e Report to user the connections errors to z39.50 server, like timeout(10007), and refused(10000).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-21 10:23:18 -05:00
Galen Charlton
4bf76c2d77 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>
2008-09-26 09:05:08 -05:00
Jesse Weaver
852f75bba6 fix for bug 2556: Overlaying records sometimes creates new record
This makes "Try another search" in the Z39.50 search tool pass the biblionumber along, so that records are overlaid correctly.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-09-16 22:35:44 -05:00
Vincent Danjean
d9ac3b3d33 Shebang line must be the first of the file
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-08-20 20:23:53 -05:00
Galen Charlton
3d2f7253ea bug 2317: avoid crash when auto-creating authority
If BiblioAddsAuthorities is ON, saving a MARC bib record
in the cataloging editor can create new authority records.
When using MARC21, if one of those authority records
has diacritics in its heading, the save crashes with the
following error:

Wide character in null operation at
/usr/local/share/perl/5.8.8/MARC/Charset/Table.pm line 96

To prevent this, new MARC21 authorities created by
BiblioAddsAuthorities have the Leader/09 set to 'a'.  Note
that this is not currently required for UNIMARC authorities,
as MARC::File::XML->as_xml_record() does not attempt
to transcode UNIMARC records from MARC-8 to UTF-8.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-08-06 07:08:36 -05:00
Jesse Weaver
ac0d340bd5 kohabug 2345: bad comparisons pervade reports
This patch changes all $foo eq undef's to !defined($foo). It also makes misc/spellcheck_suggest/build_spellcheck_suggest.pl have proper syntax.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-27 06:11:08 -05:00
Joshua Ferraro
6cc8b7ce10 If the authorized value description doesn't exist, display the value 2008-07-25 10:08:31 -05:00
Joshua Ferraro
0bb46e1d57 Fix for bug 2398: Source of Classification - Add item or Edit item in
staff client is defaulting to the ASNCR code instead of the blank above

For some reason the loop used to build the list of values was
setting the first value to the $value variable if $value wasn't
set already, and the default_value was inside rather than outside
the loop. I've removed the setting inside the loop and placed
the default value outide the loop. It's possible I just don't
understand what the original intention was.
2008-07-24 16:23:33 -05:00
Chris Nighswonger
8f55696a4d kohabug 2374 Corrects autoBarcode behavior in additem.pl
There should be a documenation change at least for 3.0 to the effect that on systems
not running JavaScript, 'incremental' is the only option available for autoBarcode
although other options appear. A fix for this will hopefully appear in 3.2.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-22 15:50:30 -05:00
Joshua Ferraro
82076c3d39 Fix a bug where the 008 field got replaced if you
inadvertantly clicked in the field and it wasn't empty.
This patch prevents the field from being replaced unless
it's empty.
2008-07-21 19:38:52 -05:00
Joshua Ferraro
bc408475f8 This patch resolves a few MARC21 Framework issues for
a default installation:

1. Re-names several of the item fields to make more sense to catalogers and patrons
2. Remove links Non-public note from items.paidfor
3. Changes Non-public note to be hidden in the OPAC view

Fixes issues with the 'hidden' field in the framework, specifically:

1. the editor obeys the rules of possible values for hidden (>4, or <-4)
2. the OPAC MARC display obeys the rules of positive values meaning 'hidden in OPAC'
3. the staff MARC display now obeys the rules specified in the hidden values description
2008-07-18 17:39:08 -05:00
Andrew Moore
b14eb8f093 bug 1980 [3/3]: remove bug workaround from pagination links
yesterday, the C4::Output::pagination_bar had a bug in it that I was crudely working around.
atz fixed that bug this morning. This patch removes the workaround. Thanks, atz!

I'm sending along atz's patch again with my signoff. It needs to be applied before this, as does the
other 1980 patch. I have sent that along (again), too, with a modified subject line. That makes a total of 3 patches for 1980.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:18:30 -05:00
Andrew Moore
66c420c3d0 bug 1980: updateing calls to SimpleSearch to limit number of things returned
C4::Search::SimpleSearch was alredy patched to let you pass in the number of results you want back.
These instances were not using the new API. This patch makes all calls to SimpleSearch specify a limit.

I improved the documentation of SimpleSearch a bit to include the third returned value.

I believe there's a bug in C4::Output::pagination_bar, in that it doesn't deal well with URLs
with only one pair of parameter=value passed to it. I'm getting around this by passing in a second
pair that does nothing.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:11:24 -05:00
MJ Ray
500b7ee4d6 Improve Z39.50 result checking and display a little:
1. Replaces display hostname with servername as shown on the selection screen.
2. If the record download errors, try to display the error.
3. A more useful warning if $DEBUG is set.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-08 18:21:43 -05:00
Joshua Ferraro
1e45b14714 Prior to this patch, XSL and scan indexes conflicted.
This patch resolves the issue by passing $scan to the
searchResults function to toggle XSL for scan results
2008-07-08 15:59:09 -05:00