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>