Commit graph

24 commits

Author SHA1 Message Date
Paul Poulain
96960a4c68 Bug 8981 follow-up: case
While QAing your patch, I saw you were writting "MarcFlavour", it should have been "marcflavour"

Will work with the UC, but let's be consistent.

This patch fixes another MarcFlavour just a few lines before I spotted by chance

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-29 22:07:29 -05:00
855e6fd5a9 Bug 8981 - Remove Nonpublic General Note from OPAC authorities display
Currently, the MARC21 667 Nonpublic General Note field is appearing on the opac-authoritiesdetail.pl page.

Since it is a nonpublic note, it makes sense to remove it from this view.

This patch adds in an extra condition that checks authority records for MARC21 667 fields before displaying them in this opac screen.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Does what it says, with no side effects

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-29 22:07:29 -05:00
Jared Camins-Esakov
3739e6bd67 Bug 3652: close XSS vulnerabilities on biblionumber and authid
Previously we did not sanitize biblionumber and authids passed in by
the user.

To test:
1) Go to /cgi-bin/koha/opac-detail.pl?biblionumber=2hi (substituting a
   valid biblionumber for the 2).
2) Notice the presence of "2hi" on this page, and also on the ISBD and
   MARC views.
3) Go to /cgi-bin/koha/opac-authoritiesdetail.pl?authid=2bye
   (substituting a valid authid for the 2).
4) Notice the presence of "2bye" on this page.
3) Apply patch.
4) Notice that "2hi" and "2bye" strings are gone.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-24 15:23:50 +02:00
Jared Camins-Esakov
83370c519c Bug 8523: Display auth hierarchies w/all marcflavours
This commit adds support for displaying authority hierarchies for all
flavours of MARC, not just UNIMARC. Display now uses the jQuery
jstree plugin, selected with the help of Owen Leonard, resulting in a
much faster experience for users.

Be aware that the jstree file uses tabs rather than 4-space indentation,
which I left as-is so as to make it easier to integrate upstream
releases in the future.

To test:
1) Enable the AuthDisplayHierarchy syspref
2) Create authority records with a hierarchy of see also fields
   (in MARC21/NORMARC, you'll be using 5xx fields for this, with a
   subfield $w=g for broader terms and subfield $w=h for narrower
   terms)
3) View the authorities in the OPAC, noting the hierarchical view at
   the top of the page.

This initial patch does not create bidirection linkages from
unidirectional links in MARC21 authorities. This means that when moving
up the authority hierarchy, lower levels will disappear. This is
intentional, as the first patch is intended merely to ensure that
AuthDisplayHierarchy functions the same for all marcflavours. A future
patch will add a cron job to generate the bidirectional linkages, once
we are sure that the hierarchy functionality for UNIMARC and
MARC21/NORMARC coexists peaceably.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Resolved conflicts in updatedatabase.pl, sysprefs.sql and in one of
the CSS files.

Test plan:

1) Run t/AuthoritiesMarc.t
New tests complete without any errors.

2) Make sure updatedatabase works correctly.
Update works nicely, new system preference is also added to syspref.sql

3) Make sure new terms are translatable.
Created new po files for de-DE and checked for new terms.
All translations appear correctly.

4) Make sure everything works with AuthDisplayHieararchy OFF
- Add authority
- Edit authority
- Delete authority

5) Test feature with AuthDisplayHieararchy ON
- Add authority
- Edit authority
- Delete authority

6) Add a couple of hierarchically linked authorities
Note: links have to be created in both directions

Example:
151 $aGermany
  551 $a Baden-Württemberg $w h

151 $aBaden-Württemberg
  551 $a Konstanz $w h
  551 $a Germany $w g

151 $aKonstanz
  551 $a Baden-Württemberg $w g
  551 $a Fürstenberg $w h
  551 $a Paradies $w h

151 $a Fürstenberg
  551 $a Konstanz $w g

151 $a Paradies
  551 $a Konstanz $w g

Tree shows up nicely above the authority record
- in staff
- in OPAC
  - on the normal view tab
  - on the MARC view tab

7) Checking the logs for warnings
- no Javascript errors or warnings
- no warnings or errors in log files
2012-09-21 14:52:08 +02:00
Fridolyn SOMERS
1291734a0a Bug 8709: Subfield 0 does not show in MARC detail in intranet
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-18 11:36:07 +02:00
Jared Camins-Esakov
2b28b9caae Bug 8572: invalid auth shouldn't cause error
Prior to this patch, attempting to view an invalid authority in the
OPAC gave a system error instead of a 404. With this patch, the user
will just get a 404, as is the case with invalid bibs.

To test:
1) Try to view an invalid authority by going to:
   /cgi-bin/koha/opac-authoritiesdetail.pl?authid=999999999999
   (presuming that you don't have an authority with authid 999999999999
   in your database) before and after applying this patch

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-08-29 15:06:50 +02:00
Jared Camins-Esakov
569e3823fd Bug 8204: Add user friendly authority view to OPAC
Up until now, the only authority view in the OPAC was a
rather-unfriendly expanded MARC view. This patch adds a user-friendly
view similar to the biblio details view.

Specific features to be aware of:
* Right-to-left text in the MARC21 880 field will show up in the
  appropriate location with the appropriate alignment and wrapping
* There is very little CSS styling. Any suggestions for how to make
  the display more attractive would be gratefully received.

To test:
1) Do a search for an authority in the OPAC.
2) Choose an authority record to view.
3) Observe that the view is more user-friendly and polished.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works very nicely now. The old view is still available, but the
user is presented with a nicer non-MARC view first.
2012-07-26 18:11:44 +02:00
Jared Camins-Esakov
f5974e278b Bug 7943 follow-up: Fix template filename
In preparation for some later work on authorities, the filename for the
OPAC authority viewer changed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 10:07:32 +02:00
Jared Camins-Esakov
3aaaf2f2e4 Bug 7943: Authority search results are untranslatable
The HTML for authority search results was previously generated in
C4::AuthoritiesMarc::BuildSummary, which meant that it couldn't be
translated. This patch moves the HTML generation into the templates
by introducing a new authorities-search-results.inc include file for
both the OPAC and the Intranet which contains a Template::Toolkit BLOCK
for rendering the authority results. Fixes the authority autocomplete
by removing the untranslatable strings, and returning only data from
the database.

To test:
1. Apply patch.
2. Test authority searching in the authority module in the staff client
3. Test authority searching in the authority control plugin in the
   cataloguing module (and the plugin for UNIMARC field 210$c, if you
   can figure out how)
4. Test authority searching in the OPAC

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with MARC21 data.

1) Applies cleanly on current HEAD.

2) Authority search in staff

Patch works wonderfully, only some small notes found while testing that have
not been changed by this patch:

ENH note: Search terms show up nowhere. So if I want to change the sorting, I have to
repeat typing in my search term. Even if the form does not keep the term, it
should be visible somewhere on the screen what I searched for.

ENH note: The pagination on top and at the bottom of the result list are formatted
differently. Maybe some missing CSS?

ENH note: Also the authority type is not shown at all in the result list.

3) Cataloguing and authority plugins

The autocomplete function works nicely.

ENH note: There is only one small enhancement
I could imagine. If I start my search from 100 it will limit the search to
'persons' but the autocomplete will also suggest other authorities. It would
be a bit cleaner, if the autocomplete could limit by the appropriate authority
type too. Very nice feature.

Plugins overall work nicely. Created links include the authority numbers and work
correctly.

4) Authority search in OPAC

Works nicely. Display is consistent, but translatability greatly improved.

ENH note: In staff we use 'Details' in OPAC we use 'View full heading' - I wonder
if maybe 'details' would be better understandable for users?

Note: Code reveals a system preference 'AuthDisplayHierarchy' that is
not available in the system preference editor. I talked to Jared and he
will work on this feature later on. For now it's no regression, as the
preference has never been visible.
2012-06-20 10:07:30 +02:00
Colin Campbell
af3c7d4ce7 Bug 5453 Move declarations out of conditionals in opac
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:22 +12:00
Chris Cormack
30ae708978 Bug 6187 : Fixing template issue with opac-authoritesdetail.tt
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-14 15:30:30 +12:00
Paul Poulain
a898b69dcc Bug 5930 : improving/modifying authority display on OPAC
- changing some terms that are unclear for a patron
- removing tag & subfields values & indicators
- removing UNIMARC coded fields
- changing the search page (removing options useless for a patron)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-27 20:54:10 +13:00
Mason James
f46b03cf2d Bug 4289: 'OpacPublic' feature
applied to git tag 'v3.02.00-rc'

Frédéric Demians:

  - Rebased this patch to HEAD
  - Solved a merge conflict
  - The patch works as described here:
    http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4289

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-19 14:30:34 +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
Lars Wirzenius
873a3cb9bc Fix FSF address in directory opac/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:54 -04:00
Garry Collum
886368370d Bug 2505: Enables warnings in opac-MARCdetail.pl and opac-authoritiesdetail.pl
No resulting warnings after warnings were turned on.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-16 06:12:40 -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
Galen Charlton
0fa1de926f kohabug 2112 - add indicators to MARC display
In any MARC record display in the OPAC or staff client
that displays the MARC tag numbers, the indicators are
now displayed as well, following the tag number.  If an
indicator is a blank, it is displayed as '#'.

Add a function to C4::Koha, display_marc_indicators(), to
generate this display form of the indicators.

Refactoring note: the four scripts changed in this commit
have a lot of duplicate code that could be merged into
a MARC displayer class.

Documentation notes: screenshots of tagged MARC record
displays should be updated.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-12 11:17:44 -05:00
hdl
109644cdb4 Bug Fixing:
Authority display hierarchy had a problem.

Feature porting :
Adding SearchMyLibraryFirst feature to OPAC
It select the user's library for research by default
2007-07-06 15:16:40 +00:00
tipaul
67d1dcf1f7 various bugfixes (minor) and french translation updated 2007-05-23 16:19:40 +00:00
hdl
100e6a9808 functions that were in C4::Interface::CGI::Output are now in C4::Output.
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
2007-04-24 13:54:28 +00:00
hdl
b767f50c8f Code Cleaning : AuthoritiesMARC. 2007-04-06 14:48:45 +00:00
hdl
1ab5cdfd44 removing $dbh as a parameter in AuthoritiesMarc functions
And reporting all differences into the scripts taht relies on those functions.
2007-03-28 10:39:16 +00:00
tipaul
f8e9fb6445 rel_3_0 moved to HEAD (introducing new files) 2007-03-09 15:34:17 +00:00