kpac : initial chilifresh integration
authorBill Erickson <berick@esilibrary.com>
Wed, 4 Apr 2012 20:33:33 +0000 (16:33 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 30 Jul 2012 19:03:21 +0000 (15:03 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/kpac/parts/base.tt2
Open-ILS/src/templates/kpac/parts/chilifresh.tt2 [new file with mode: 0644]
Open-ILS/src/templates/kpac/record.tt2

index ae3f6b2..ebfe0e5 100644 (file)
@@ -15,5 +15,6 @@
             [% INCLUDE 'kpac/parts/footer.tt2' %]
         </div>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/kpac/functions.js"></script>
+        [%- INCLUDE 'kpac/parts/chilifresh.tt2' %]
     </body>
 </html>
diff --git a/Open-ILS/src/templates/kpac/parts/chilifresh.tt2 b/Open-ILS/src/templates/kpac/parts/chilifresh.tt2
new file mode 100644 (file)
index 0000000..9366f60
--- /dev/null
@@ -0,0 +1,13 @@
+[%-  IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT AND ctx.page == 'record';
+        chili_url = ENV.OILS_CHILIFRESH_URL;
+        IF CGI.https AND ENV.OILS_CHILIFRESH_HTTPS_URL;
+            chili_url = ENV.OILS_CHILIFRESH_HTTPS_URL;
+        END; 
+%]
+    <!-- Set up the chilifresh account information and load the JS -->
+    <input type="hidden" id="chilifresh_account" name="chilifresh_account" value="[% ENV.OILS_CHILIFRESH_ACCOUNT %]"/>
+    <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+    <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+    <script type="text/javascript" src="[% chili_url %]"></script>
+    <script>try { setTimeout(chili_init, 0); } catch(E) {}</script>
+[%- END %]
index 8161ebb..e34ea29 100644 (file)
             </div>
 
             <div class="item_detail_rate_wrapper">
-                <!-- TODO chilifresh, etc. -->
+                <div class="item_detail_rate_starts">
+                    <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
+                </div>
+                <!--
+                <div style="margin-bottom:20px;">
+                    <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
+                </div>
+                -->
+
+                <!--
                 <div class="item_detail_rate_starts"><img alt="rating" src="[% ctx.media_prefix %]/images/kpac/stars.png" /></div>
                 <div class="item_detail_rate_link"><a href="javascript:;">Rate this</a></div>
                 <div class="clear">&nbsp;</div>
+                -->
 
                 <div class="item_detail_cn_wrapper">
                     <div class="item_detail_callnumber">[% attrs.holdings.0.label | html %]</div>
     [% END %]
 
     <!-- TODO -->
-
     <div class="item_detail_extras_tabs">
         <a href="javascript:;">Reviews</a>
         <div class="selected">Rate this Item</div>
         <a href="javascript:;">About the Author</a>
         <div class="clear">&nbsp;</div>
     </div>
+    <div class="item_detail_rating">
+        <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
+    </div>
+</div>
 
+<!--
     <div class="item_detail_rating_top">
         <table cellpadding="0" cellspacing="0" border="0" class="item_avg_rate_table">
             <tr>
         </tr>
     </table>
 </div>
+-->
   
 [% END %]