TPAC: Include Chilifresh conditionally user/dbs/tpac-non-fixed-width
authorDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2011 00:51:10 +0000 (19:51 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 12 Dec 2011 00:51:10 +0000 (19:51 -0500)
Rather than including Chilifresh JavaScript and table cells
unconditionally, only include the Chilifresh calls if an account has
been defined in the Apache environment.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/base.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2

index 0a6c10c..4af9a87 100644 (file)
@@ -15,6 +15,8 @@
         [% content %] 
         [% INCLUDE 'opac/parts/footer.tt2' %]
         [% INCLUDE 'opac/parts/js.tt2' %]
-        [% INCLUDE 'opac/parts/chilifresh.tt2' %]
+        [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
+            [%- INCLUDE 'opac/parts/chilifresh.tt2' %]
+        [%- END %]
     </body>
 </html>
index d9ef345..46790fc 100644 (file)
                                                 </div>
                                             </td>
                                         </tr>
+                                        [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
                                         <tr>
                                             <td/>
                                             <td align='center'> <!-- Chilifresh reviews link --> 
                                                 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
                                             </td>
                                         </tr>
+                                        [%- END %]
                                         <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>