beanstalk : record details; more css
authorBill Erickson <berick@esilibrary.com>
Tue, 3 Apr 2012 21:09:29 +0000 (17:09 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 3 Apr 2012 21:09:29 +0000 (17:09 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/Beanstalk.pm
Open-ILS/src/templates/beanstalk/base.tt2
Open-ILS/src/templates/beanstalk/record.tt2 [new file with mode: 0644]
Open-ILS/src/templates/beanstalk/results.tt2

index ca34c22..f09a96a 100644 (file)
@@ -1,8 +1,7 @@
 package OpenILS::WWW::Beanstalk;
 use base q/OpenILS::WWW::EGCatLoader/;
 use strict; use warnings;
-use Apache2::Const -compile => qw(OK DECLINED FORBIDDEN HTTP_INTERNAL_SERVER_ERROR REDIRECT HTTP_BAD_REQUEST);
-
+use Apache2::Const -compile => qw(OK);
 
 sub load {
     my $self = shift;
@@ -17,6 +16,7 @@ sub load {
 
     return $self->load_simple("home") if $path =~ m|beanstalk/home|;
     return $self->load_rresults if $path =~ m|beanstalk/results|;
+    return $self->load_record if $path =~ m|beanstalk/record|;
 
     return Apache2::Const::OK;
 }
index 7f95b06..56cbf75 100644 (file)
         <title>[% l('Catalog - [_1]', ctx.page_title) %]</title>
         <meta name="viewport" content="format-detection=no,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,width=device-width" />
         <style type='text/css'>
+            h1 { font-size: 140%; }
+            h2 { font-size: 110%; }
             .hidden { visibility: hidden }
             .results_paginate { margin: 8px }
-            .results_table { width: 100%; border-collapse: collapse;}
-            .results_table td { padding-bottom: 10px; vertical-align: bottom}
-            .results_table tr:nth-child(odd) td { background: #E0E0E0;  border:1px solid #333;}
-            .results_table tr:nth-child(even) td { border:1px solid #CCC; border-bottom: none; }
             .results_paginate_summary { margin-bottom: 10px; }
             .results_paginate_links { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px dashed #333;}
-            .results_pictd { width:55px; border: none;}
+            .results_table { width: 100%; border-collapse: collapse;}
+            .results_table td { padding-bottom: 10px; vertical-align: bottom}
+            .results_table tr:nth-child(odd) { background: #F8F5D8;  color: #4D4D4D; border-bottom:1px solid #4D4D4D;}
+            .results_table a, a:visited { color: #4D4D4D;}
+            .results_pictd { width:55px }
         </style>
     </head>
     <body>
diff --git a/Open-ILS/src/templates/beanstalk/record.tt2 b/Open-ILS/src/templates/beanstalk/record.tt2
new file mode 100644 (file)
index 0000000..d7bbf96
--- /dev/null
@@ -0,0 +1,80 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "beanstalk/base.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    attrs = {marc_xml => ctx.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+    ctx.page_title = attrs.title | html
+%]
+
+<div>
+    [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
+    <a href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
+        alt="[% l('Image of item') %]" 
+        src='[% ctx.media_prefix %]/opac/extras/ac/jacket/[% record.summary.jacket_size %]/[% ident | uri %]' /></a>
+    [% END %]
+    <br />
+</div>
+
+<div>
+    <h1>[% attrs.title_extended | html %]</h1>
+    [%- INCLUDE "opac/parts/record/authors.tt2" %]
+</div>
+
+<div>
+    [%- INCLUDE "opac/parts/record/copy_counts.tt2" %]
+    <h2>[% l('Current holds') %]</h2>
+    <ul>
+        <li>
+            <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
+                {hold_target => ctx.bre_id, hold_type => 'T', hold_source_page => mkurl()}, stop_parms) %]" 
+                ><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                >[% l('Place Hold') %]</span></a>
+        </li>
+        <li>
+            [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", 
+                ctx.record_hold_count, ctx.copy_summary.0.count) %]
+        </li>
+    </ul>
+</div>
+
+<h2>[% l("Record details") %]</h2>
+<ul>
+    [%- IF attrs.isbns.0; FOR isbn IN attrs.isbns %]
+    <li>
+        <strong>[% l('ISBN:'); %]</strong>
+        <span itemprop='isbn'>[% isbn | html  %]</span>
+    </li>
+        [%- END %]
+    [%- END %]
+    [%- IF attrs.issns.0; FOR issn IN attrs.issns %]
+    <li>
+        <strong>[% l('ISSN:'); %]</strong>
+        <span>[% issn | html  %]</span>
+    </li>
+        [%- END %]
+    [%- END %]
+    [%- IF attrs.phys_desc %]
+    <li>
+        <strong>[% l("Physical Description:") %]</strong>
+        <span>[% attrs.phys_desc | html %]</span>
+    </li>
+    [%- END %]
+    [%- IF attrs.edition %]
+    <li>
+        <strong>[% l("Edition:") %]</strong>
+        <span>[% attrs.edition | html %]</span>
+    </li>
+    [%- END %]
+    [%- IF attrs.publisher %]
+    <li>
+        <strong>[% l("Publisher:") %]</strong>
+        <span itemprop="publisher">[% attrs.publisher | html; %]</span>
+        [% IF attrs.pubdate; %]
+        <span itemprop="datePublished">[% attrs.pubdate | html; %]</span>
+        [% END; %]
+    </li>
+    [%- END %]
+</ul>
+
+
+[% END %]
index c98e31b..54d9d1e 100644 (file)
@@ -15,7 +15,7 @@
         <td class='results_pictd'>
             [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
             <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image') %]"
-                    width="55" src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]' /></a><br />
+                    style="width:55px;height:73px;" src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]' /></a><br />
             [% END %]
         </td>
         <td>