Chilifresh reviews for results and record pages
authorBill Erickson <berick@esilibrary.com>
Fri, 10 Jun 2011 18:21:50 +0000 (14:21 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 20 Jul 2011 18:38:02 +0000 (14:38 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/templates/default/opac/parts/base.tt2
Open-ILS/web/templates/default/opac/parts/chilifresh.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/opac/parts/record/awards.tt2 [new file with mode: 0644]
Open-ILS/web/templates/default/opac/parts/record/extras.tt2
Open-ILS/web/templates/default/opac/parts/result/table.tt2

index d54a7e0..1fd0536 100644 (file)
@@ -14,5 +14,6 @@
         [% content %] 
         [% INCLUDE 'default/opac/parts/footer.tt2' %]
         [% INCLUDE 'default/opac/parts/js.tt2' %]
+        [% INCLUDE 'default/opac/parts/chilifresh.tt2' %]
     </body>
 </html>
diff --git a/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2 b/Open-ILS/web/templates/default/opac/parts/chilifresh.tt2
new file mode 100644 (file)
index 0000000..9c64e55
--- /dev/null
@@ -0,0 +1,20 @@
+
+<!-- Set up the chilifresh account information and load the JS -->
+
+[%  IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT 
+            AND (ctx.page == 'rresult' OR 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; 
+%]
+    <input type="hidden" id="chilifresh_account" name="chilifresh_account" value="[% ENV.OILS_CHILIFRESH_ACCOUNT %]"/>
+    <!--
+    <input type="hidden" id="chilifresh_profile" name="chilifresh_profile" value="[% ENV.OILS_CHILIFRESH_PROFILE %]"/>
+    -->
+    <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 { chili_init(); } catch(E) {}</script>
+[% END %]
+
diff --git a/Open-ILS/web/templates/default/opac/parts/record/awards.tt2 b/Open-ILS/web/templates/default/opac/parts/record/awards.tt2
new file mode 100644 (file)
index 0000000..dda3949
--- /dev/null
@@ -0,0 +1,31 @@
+<div class='rdetail_extras_div'> 
+    <div style="margin-bottom:20px;"></div>
+
+        <!-- Chilifresh patron reviews -->
+        <strong>[% l('Patron Reviews:') %]</strong>
+        <div style="margin-bottom:20px;">
+            <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+            <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+        </div>
+    
+        <!-- Reviews from added content provider -->
+        [% IF 0 %] 
+        <strong>[% l('Reviews:') %]</strong>
+        <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
+        [% END %]
+
+        <!-- Novelist suggestions-->
+        [% IF 0 %] 
+        <strong>[% l('Similar Books:') %]</strong>
+        <div id='rdetail_novelist_div' class='rdetail_extras_div'>
+        <div id="NoveListSelect" class="NoveListSelect">
+            <div id="NoveListAnchor" class="NoveListSelect"></div>
+            <div id="novsuggestions"></div>
+            <div id="nextreads"></div>
+            <div id="novrelatedauthors"></div>
+            <div id="novrelateditems"></div>
+        </div>
+        [% END %]
+    </div>
+</div>
+
index b101603..66b4917 100644 (file)
@@ -1,44 +1,19 @@
 <div id="rdetail_main_div">
     <div id='rdetail_extras_div' style='width: 100%;'> 
-        <!-- SAMPLE AWARDS LAYOUT / MOVE TO INCLUDE'D TEMPLATE
-        <div id='rdetail_awards_div' class='rdetail_extras_div hide_me'> 
-            <strong>[% l('Awards:') %]</strong>
-            <div id='rdetail_awards_cont' style="margin-bottom:20px;"></div>
-                <strong>[% l('Patron Reviews:') %]</strong>
-                <div id='rdetail_chilifresh_reviews' class='hide_me' style="margin-bottom:20px;">
-                    <div id='chilifreshReviewLink' name='chilifreshReviewLink' class='chili_review'></div>
-                    <div id='chilifreshReviewResult' name='chilifreshReviewResult' class='hidden'></div>
-                </div>
-                <strong>[% l('Reviews:') %]</strong>
-                <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
-                <strong>[% l('Suggested Reads:') %]</strong>
-                <div id='rdetail_novelist_div' class='rdetail_extras_div'>
-                <div id="NoveListSelect" class="NoveListSelect">
-                    <div id="NoveListAnchor" class="NoveListSelect"></div>
-                    <div id="novsuggestions"></div>
-                    <div id="nextreads"></div>
-                    <div id="novrelatedauthors"></div>
-                    <div id="novrelateditems"></div>
-                </div>
-            </div>
-        </div>
-        -->
 
         [%  # Hidden extras are not yet implemented.  Some may require JS
-
         extras = [
-            {name => 'summary',  label => l('Summary &amp; More'), hide => 1}, # Content Cafe
+            {name => 'summary',  label => l('Summaries &amp; More'), hide => 1}, # Content Cafe
             {name => 'content',  label => l('Contents'), hide => 1}, # ToC
             {name => 'authors',  label => l('Authors')}, 
             {name => 'series',   label => l('Series'), hide => 1}, 
             {name => 'awards',   label => l('Series'), hide => 1}, 
             {name => 'subjects', label => l('Subject')}, 
             {name => 'annotation', label => l('Annotation'), hide => 1}, 
-            {name => 'reviews',  label => l('Reviews'), hide => 1}, 
+            {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
             {name => 'excerpt',  label => l('Excerpt'), hide => 1},
             {name => 'issues',   label => l('Issues Held'), hide => !ctx.have_holdings_to_show},
             {name => 'preview',  label => l('Preview'), hide => 1}, 
-            {name => 'novelist', label => l('Suggestions by NoveList'), hide => 1},
             {name => 'cnbrowse', label => l('Shelf Browser'), hide => 1},
             {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
             {name => 'marchtml', label => l('MARC Record')}
index 91e774e..88cad00 100644 (file)
@@ -75,7 +75,7 @@
                                                 name="results_row_count">[%
                                                     result_count; result_count = result_count + 1
                                                 %].</td>
-                                            <td class='result_table_pic_header'
+                                            <td class='result_table_pic_header' align='center'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
                                                 <a href="[% ctx.opac_root %]/record/[% rec.id _ propagator %]"><img alt="[% l('Image of item') %]"
                                                 </div>
                                             </td>
                                         </tr>
-
-                                        <!-- Placeholder for ChiliFresh Review -->
-                                        <tr class="hide_me" name="chilifreshReview">
-                                            <td></td>
-                                            <td valign="top" colspan="5">
-                                                <div style="position:relative;left:-19px;">
-                                                    <span name="chilifreshReviewLink" class="chili_review"></span>
-                                                    <div name="chilifreshReviewResult" style="display:none"></div>
-                                                </div>
-                                            </td>
-                                        </tr>
                                         <tr>
-                                            <td colspan="5">
-                                                <div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div>
-                                                <!-- <hr class='opac-auto-013' color="#FFCC33" /> -->
+                                            <td/>
+                                            <td align='center'>
+                                                <!-- Chilifresh link and reviews panel --> 
+                                                <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
+                                                <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>
+                                        <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
                                     </tbody>
                                 </table>
                             </td>