[OPEN-ILS-DEV] Sorting by distance in the OPAC - Patch

Paul Waak ptwaak at gmail.com
Thu Aug 20 02:06:57 EDT 2009


Hello EG Gurus,

Here is my first foray into open-ils patching.

This patch changes/adds the following files:
patching file Open-ILS/examples/fm_IDL.xml
patching file Open-ILS/src/cgi-bin/lib-setup.cgi
patching file Open-ILS/src/extras/autogen.sh
patching file Open-ILS/src/extras/org_tree_distance.pl
patching file Open-ILS/src/Makefile.am
patching file Open-ILS/src/Makefile.in
patching file Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
patching file Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/ 
actor.pm
patching file Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/ 
Pg/dbi.pm
patching file Open-ILS/src/perlmods/OpenILS/Application/Storage/ 
Publisher/actor.pm
patching file Open-ILS/src/perlmods/OpenILS/Application/Storage/ 
Publisher/biblio.pm
patching file Open-ILS/src/sql/Pg/005.schema.actors.sql
patching file Open-ILS/src/sql/Pg/020.schema.functions.sql
patching file Open-ILS/src/sql/Pg/950.data.seed-values.sql
patching file Open-ILS/src/sql/Pg/orig.950.data.seed-values.sql
patching file Open-ILS/web/conify/global/actor/org_unit.html
patching file Open-ILS/web/conify/global/actor/org_unit.js
patching file Open-ILS/web/opac/locale/en-US/conify.dtd
patching file Open-ILS/web/opac/skin/default/js/rdetail.js
patching file Open-ILS/web/reports/fm_IDL.xml

In a nutshell, this
1) adds latitude and longitude columns to actor.org_address
2) populates actor.org_unit_distance with the distance, in radians,  
between libraries (conversion factors are included in the table's  
comment) in a style shamelessly copied from actor.org_unit_proximity
3) modifies Search/Storage to return distance information when open- 
ils.search.biblio.copy_counts.summary.retrieve is called
4) modifies the Org Units Setup CGI and staff client interfaces and  
the default OPAC skin to use the added infrastructure

The OPAC skin has a local global, rdetailSortDistance so the added  
code can be disabled if needed.

To activate the sorting, the OPAC URL must include both l= and ol=  
elements. The ol= element identifies the center from which all  
distances are counted. The l= element specifies what part of the  
hierarchy is being displayed, as is usual.

If all goes well, I will start working on some of the other changes  
the North Texas Library Consortium has requested.
-Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DistSort090819.diff
Type: application/octet-stream
Size: 179633 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20090820/34be3e84/attachment-0001.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DCO-1.1.txt
Url: http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20090820/34be3e84/attachment-0001.txt 
-------------- next part --------------


Paul Waak
pwaak at yahoo.com
North Texas Library Consortium, Advisor




More information about the Open-ils-dev mailing list