TPac: Review & More content cafe option on results page
authorBill Erickson <berick@esilibrary.com>
Fri, 9 Sep 2011 20:41:45 +0000 (16:41 -0400)
committerBill Erickson <berick@esilibrary.com>
Sun, 11 Sep 2011 22:33:21 +0000 (18:33 -0400)
Links to a new top-level page.  Also cleaned up some bare &'s in the
content cafe url.  added a ctx->proto = http / https var.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
Open-ILS/src/templates/opac/parts/record/summaryplus.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2

index 92dc3c5..0db9912 100644 (file)
@@ -152,6 +152,7 @@ sub load_context {
     $ctx->{base_url} = $cgi->url(-base => 1);
     $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default';
     $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default';
+    $ctx->{proto} = $cgi->https ? 'https' : 'http';
 
     # Any paths configured in Apache will be placed in front of
     # any paths configured in the global oils_web.xml config.
index d397b48..7796213 100644 (file)
@@ -12,8 +12,8 @@
     <!-- Embedded content cafe iframe -->
     [% ident = attrs.isbn_clean || attrs.upc %]
     <iframe width="100%" height="400" frameborder="0" 
-        src="http[% CGI.https ? 's' : '' %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
-            ENV.OILS_CONTENT_CAFE_USER %]&Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&ItemKey=[% ident | uri %]&Options=Y" >
+        src="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+            ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&amp;Options=Y" >
     </iframe>
 </div>
 
index 3948515..0706ef6 100644 (file)
                                                                 [% label %]
                                                             </a>
                                                         </div>
+                                                        [% IF ENV.OILS_CONTENT_CAFE_USER %]
+                                                        <div class="results_aux_utils opac-auto-011">
+                                                            <a title="[% l('Reviews and More') %]" target='_blank' 
+                                                                href="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+                                                                    ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[%-
+                                                                    ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&Options=Y">
+                                                                <img src='[% ctx.media_prefix %]/images/starz.png'/> 
+                                                                <span style='position:relative;top:-5px;'>[% l('Reviews &amp; More') %]</span>
+                                                            </a>
+                                                        </div>
+                                                        [% END %]
                                                     </div>
                                                 </div>
                                             </td>