From: dbs Date: Wed, 27 Apr 2011 16:18:54 +0000 (+0000) Subject: Turn ebooks AC from OpenLibrary into usable HTML X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b1d7ea123ca35c6df8c049c732756eb2273cffcf;p=evergreen%2Ftadl.git Turn ebooks AC from OpenLibrary into usable HTML Add elements to turn URLs into links, and use the upper case ebook format as the content of the link. "Read online" is the one i18n-unfriendly exception, but this is a good start. Signed-off-by: Dan Scott git-svn-id: svn://svn.open-ils.org/ILS/trunk@20346 dcc99617-32d9-48b4-a31d-7c20da2025e4 Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm index 0d29acf79f..b3534dd3f3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/OpenLibrary.pm @@ -145,7 +145,7 @@ sub ebooks_html { # Internet Archive online reader my $stream_url = $ebooks_json->[0]->{'read_url'} || ''; if ($stream_url) { - $ebook_html .= "
$stream_url
\n"; + $ebook_html .= "
  • Read online
  • \n"; $logger->debug("$key: stream URL = $stream_url"); } @@ -155,12 +155,12 @@ sub ebooks_html { if ($ebook_formats->{$ebook} eq 'read_url') { next; } - $ebook_html .= "
    " . - $ebook_formats->{$ebook}->{'url'} . "
    \n"; + $ebook_html .= "
  • " . uc($ebook) . "
  • \n"; } $logger->debug("$key: $ebook_html"); - $self->send_html("
    $ebook_html
    "); + $self->send_html(""); } =head1