TPAC added content integration
authorBill Erickson <berick@esilibrary.com>
Mon, 14 May 2012 19:22:08 +0000 (15:22 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 25 May 2012 19:06:34 +0000 (15:06 -0400)
commitd6d986c94aa92477d33335931aafaa1a06e4a658
tree023857557171fcca16422df1dce3f81bf95aabd1
parent6ea45e80f34eadec2a2477c7f45df41c1669e32e
TPAC added content integration

https://bugs.launchpad.net/evergreen/+bug/984963

This adds a new tab on the detail page called Additional Content
(suggestions welcome).  When the tab is expanded, available content is
presented to the user via a series of sub-tabs.

At the start of loading the record detail page, kick off a series of
asynchronous HTTP HEAD requests, one per type of added content.  At the
end of context loading, read the results of the HTTP requests for any
that have completed.  If the status for a type is 200, the type is
marked as available.  If it's not 200 (usually 404) it's marked as not
available.  Otherwise, it's marked as unknown.

In the template, available content produces a link the user can click
to view the content.  Non-available content produces no links.  Unknown
content produces a link that may lead to content or no content when
JS/dojo is disabled.  When dojo is enabled, unknown content sends a
series of JS queries to determine the state of the content
asynchronously and results in displayed links for any type that is later
determined to have content.

TODO: when the user expands the Additional Content tab, no type is
chosen by default.  A default (available) type needs to be selected on
initial display.

TODO: better styling, particularly in the sub-tabs.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/src/templates/opac/parts/js.tt2
Open-ILS/src/templates/opac/parts/record/addedcontent.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/record/body.tt2
Open-ILS/src/templates/opac/parts/record/extras.tt2
Open-ILS/web/css/skin/default/opac/style.css