Commit graph

112 commits

Author SHA1 Message Date
Fridolyn SOMERS
c78a926046 BUG6067 When Add Duplicate changing framework would loose data
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-07 16:39:48 +12:00
726a00fd7e Bug 5546 Javascript driven ability to hide MARC documentation links
Signed-off-by: fdurand <frederic.durand@univ-lyon2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-10 19:27:49 +12:00
Colin Campbell
d8b362e0f9 Bug 5415 Let calls of SimpleSearch utilize considtent interface
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings

Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 13:52:57 +12:00
Paul Poulain
f0de62e4cc Bug 5275: enable switching back to default biblio framework
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-08 12:05:23 +12:00
cecdc19369 Bug 4374 Improve biblio data entry form regarding hidden/mandatory fields
Biblio framework has 3 entry points controlling if input box are
displayed by default in data entry form:

  - 'mandatory' flag at field level
  - 'mandatory' flag at subfield level
  - 'hidden' flag at subfield level

It doesn't work as it should (?):

  - All subfields are expanded (shown) if their field is mandatory
  - A subfield containing anything is always expanded whatever it contains
  - A mandatory subfield is always expanded
  - An hidden subfield isn't expanded.

Default framework having 0 in all marc_subfield_structure.hidden, by default
all subfields will be expanded.

TO BE INTEGRATED IN RELEASE NOTES:

  Koha sysadmin should have to edit its frameworks to add hidden=1 in
  appropriate subfields.

Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-07 13:20:09 +12:00
Sophie Meynieux
96f054e90d Bug 6047: Remove check on subfield 3 that prevents biblios from BNF to create corresponding authorities
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-06 16:15:49 +12:00
Frédérick Capovilla
f7d9ebbff3 Bug 3727: Corrects the behaviour of the itemtype selectbox in addbiblio.pl
If the subfield is set as mandatory with an empty default value, an
empty value is added in the selectbox and this value is selected by
default. Before, the first element was automatically selected, so it was
easy to forget to set this mandatory value.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-02 06:21:58 +13:00
Jared Camins-Esakov
52ade1d437 Bug 5939: "Save and edit items" button broken
When modifying an existing biblio, the "Save and edit items" option in the
"Save" menu did not redirect to the edit items screen. Instead, it redirected to
the regular details screen.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-24 13:33:13 +13:00
Chris Cormack
3f35705ddc Merge remote branch 'kc/new/enh/bug_2170' into kcmaster 2011-02-15 15:55:54 +13:00
173d3cbb2d Follow-up fix for Bug 2170 - Adding 'edititems' user-permission
Save button and duplicate confirmation redirects must respect
the edititems permission: Users without permission to edit items
should not be redirected to the edit items screen.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-15 10:31:22 +13:00
Paul Poulain
d22001b1c4 adding some copyright BibLibre statements
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-09 14:08:44 +13:00
Paul Poulain
60e0a76fc0 Bug 5699: don't discard $3 when building a record (UNIMARC specific)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-07 21:30:02 +13:00
240ce5a31c Fix for Bug 2122, Grayed out Fields not always visible
- Adding "readonly" class to readonly fields to guarantee
  that readonly state is indicated visually
- Adding "locked" icon to the background of readonly
  fields for additional visual feedback

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-17 21:21:29 +13:00
Andrew Elwell
efa66f1f55 Bug 5385: POD Cleanups (part 2)
More podchecker cleanups to eliminate warnings / errors

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:56 +13:00
07cfc5d69c Bug 5372 (v2) Existing value can be replace by default value
The way an existing value was tested was wrong. 0 is a valid value but a
false value for Perl.

=> replace privious proposal.

[3.2] Should also apply.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-08 09:24:22 +13:00
29432ee42c bug 5190: link to MARC21/UNIMARC online doc in the bib editor
Patch from  Tomás Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-02 14:55:18 +13:00
4d50b4f4f0 Fix for Bug 4271, Offer choice of destination for save biblio operation
A follow-up to the fix for Bug 4121, the user should be able to control whether
the action of saving a bibliographic record takes them to the add item screen
or the detail screen, independently of whether they are adding or modifying the
record.

The addition of a "split button" would leave the default action in place if the
user clicked the "main" part of the button. Clicking on the menu would give the
user specific choices.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-29 22:39:10 -04:00
Donovan Jones
f394170ebc Bug 2505 - Add commented use warnings where missing in the cataloguing/ directory 2010-04-21 20:27:05 +12:00
2dd58a4369 Fix for Bug 4121, Cataloging record modification should obey IntranetBiblioDefaultView pref
- Re-used redirect logic found in search.pl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-16 00:00:58 -04:00
Lars Wirzenius
5c42b6512e Fix FSF address in directory cataloguing/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:55 -04:00
Matthias Meusburger
9f41fe64be MT 2050, Follow-up, Fast Cataloging
Adds granular permissions for cataloging
Also adds a link from the circulation home to fast cataloging when fast cataloging is active
2009-11-24 10:05:10 +01:00
Henri-Damien LAURENT
709e3be936 AddBiblio Workflow edition
When in Edit Mode, when save is clicked, get back to the MARCdetail.pl and not to additem.pl
2009-10-21 09:07:05 +02:00
Colin Campbell
3199d032e5 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>
2009-08-20 21:01:52 -04: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
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
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
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
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
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
Galen Charlton
c48da8131d bug 1909: add delete field/subfield button to MARC editor
A button to delete (non-mandatory) subfields and fields
is added to the bib and authority MARC editors.  This button,
which displays as a hypen or minus sign after the plus sign
to clone a field, acts as follows:

[1] When deleting a whole MARC field, if at least
    one other repeat of that field exists, deletes
    the field from the editor page.  If the field
    to be deleted is the last instance of that tag,
    the contents of the field are cleared, not removed.
    This allows one to delete all 650 tags, then
    add a new one without having to reload the
    record in the editor.

[2] When deleting a subfield, if at least one other
    repeat of that subfield and its tag occurs
    *anywhere else in the record, not necessarily in the same tag*,
    deletes the subfield.
    Otherwise, if the subfield is the last occurrence
    of that tag/subfield combination, clears the input
    form instead.

Documentation note: new screenshots for MARC editor, plus
description of the '-' button.

Credit to MJ Ray for introducing the '-' button
and the UnCloneField JavaScript function.

Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-08 12:31:30 -05:00
Galen Charlton
9035991112 bug 2203 [1/2]: increase input maxlength in MARC editor
The maximum length allowed for input into a subfield in
the MARC editor has been increased to 9999 charaacters
(from 255), permitting data entry of a field that meets
the maximum MARC field limit of 9999 octets.

Also set the maximum length for the leader form input
to 24 characters and the length for the MARC21 008
to 40 characters.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-08 09:36:13 -05:00
Galen Charlton
98f638bb14 bug 2254 [1/3]: fixed GetAuthType(); avoid crash
Improved C4::AuthoritiesMarc::GetAuthType() so that
it returns either a hashref (if the authority type exists)
or undef (if it does not exist).  The same
accessor should not be used to either return a single
value or all values of a settings list.  Note that
all existing clients of GetAuthType are expecting
either a single hashref or undef; none of them
expected the arrayref that could be returned by
the previous version of the accessor.

When BiblioAddsAuthorities is ON, addbiblio.pl
now checks the return value of GetAuthType and
no longer crashes as follows if the MARC framework
specifies an invalid authority type for a given subfield:

Can't coerce array into hash at .../cataloging/addbiblio.pl line 738.

No documentation changes.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:24 -05:00
Galen Charlton
8894d28779 bug 2206: always have $9 for headings fields
If a field can be linked to an authority record (i.e.,
an authtypecode is defined for subfield $a), always
include the subfield $9 in a (readonly) input element even
if it is marked hidden per the MARC framework.

Prior to this patch, a $9 marked hidden per the framework
would not be included in the form, causing the authority record
number link to not be added when choosing a heading from the authority
finder.  In other words, with BiblioAddsAuthorities OFF,
any authorized headings in bibs added via the MARC editor
would not have the subfield $9, and thus would appear
to not be used by any bibs.

Note that subfield $9 is set to be readonly, as changing the
authority number link does not currently change the
heading stored in the bib record.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-25 11:39:23 -05:00
Galen Charlton
ee49d6d372 kohabug 2207 - improve indicator input in MARC editor
Instead of having one input field for both indicators
of a variable field, the bib and authority MARC editor
now has an input field for each indicator.  This has
two main advantages:

* it is easier to tell what the indicator values are,
  even when the first indicator is a space
* it is easier to set the first indicator to blank
  and the second indicator to non-blank.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-12 11:17:35 -05:00
Galen Charlton
49bccd5308 XHTML correction - readonly attribute can contain only "readonly"
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:17:32 -05:00
Henri-Damien LAURENT
79d6243333 Bug Fix : Blocker 2017
disabled values are not passed to CGI.
So that if you disable entry, values and subfield codes are mixed up.
I changed disabled=tru to readonly and it fixes the bug.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:55 -05:00
Chris Nighswonger
9b47b82a77 Porting SimpleSearch return changes to all code calling it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:45 -05:00
Paul POULAIN
91fca4a9ab BiblioAddsAuthorities improvement/fix
this commit restore a better behaviour :
- if ON : the librarian can enter manually an authority-linked marc field. and if it does not exist in the authorities file, it will be created automatically
- if OFF : the authority must exist in the authority file, and the librarian can't enter if manually in the MARC editor

This patch just deals with the OFF case (the ON was already here). With OFF the behaviour is now the same as in 2.2

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:55:08 -05:00
Andrew Moore
5c51edc653 bug 1890: fixing calls to C4::Search::SimpleSearch
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:23 -05:00
Ryan Higgins
d878a92b3d Add MARC preview to Z39.50 search.
Also, add title string to MARC editor.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-17 19:25:51 -05:00
Galen Charlton
6412604238 fix XHTML validation errors in addbiblio.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-11 16:35:23 -06:00
Chris Cormack
513990edd1 Fix for bug 1560
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-23 21:30:59 -06:00
Ryan Higgins
74a76e539d Fix fatal error on authority search when biblioaddauthority syspref is set.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-28 12:42:01 -06:00
Paul POULAIN
713940d920 BiblioAddAuthorities : adding "" in search term, in case there is a ()
+ improving some tests
+ removing some comments

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 18:25:50 -06:00