]> git.koha-community.org Git - koha.git/commit
Bug 8523: Display auth hierarchies w/all marcflavours
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 1 Aug 2012 19:12:30 +0000 (15:12 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 21 Sep 2012 12:52:08 +0000 (14:52 +0200)
commit83370c519c4291e81a76c02d5142a818f940fa50
treed2fe6e3b36b74572533a2c8cd70f1315a2c0291d
parentd0c6c2d068d31d30376813d62d791df2851da000
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
26 files changed:
C4/AuthoritiesMarc.pm
authorities/detail.pl
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.jstree.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/jquery/plugins/themes/classic/d.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/jquery/plugins/themes/classic/d.png [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/jquery/plugins/themes/classic/dot_for_ie.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/jquery/plugins/themes/classic/style.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/jquery/plugins/themes/classic/throbber.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/authorities.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.jstree.js [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/jquery/plugins/themes/classic/d.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/jquery/plugins/themes/classic/d.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/jquery/plugins/themes/classic/dot_for_ie.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/jquery/plugins/themes/classic/style.css [new file with mode: 0644]
koha-tmpl/opac-tmpl/lib/jquery/plugins/themes/classic/throbber.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/includes/opac-authorities.inc [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-MARCdetail.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-auth-detail.tt
opac/opac-authoritiesdetail.pl
t/AuthoritiesMarc.t