start using a centrally hard-coded ctx.opac_root
authorsenator <lebbeous@esilibrary.com>
Thu, 10 Feb 2011 21:51:19 +0000 (16:51 -0500)
committersenator <lebbeous@esilibrary.com>
Thu, 10 Feb 2011 21:51:19 +0000 (16:51 -0500)
Open-ILS/web/templates/default/opac/myopac/main.tt2
Open-ILS/web/templates/default/opac/parts/base.tt2
Open-ILS/web/templates/default/opac/parts/result/table.tt2
Open-ILS/web/templates/default/opac/parts/searchbar.tt2
Open-ILS/web/templates/default/opac/parts/topnav.tt2
Open-ILS/web/templates/default/opac/parts/utils.tt2
Open-ILS/web/templates/default/opac/results.tt2

index 1dfaf71..1c1d077 100644 (file)
@@ -48,7 +48,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="circs">View All</a>
+                                <a href="[% ctx.opac_root %]/circs">View All</a>
                             </td>
                         </tr>
                     </table>
@@ -63,7 +63,7 @@
                                 </span>
                             </td>
                             <td align="right" class="view_link">
-                                <a href="holds">View All</a>
+                                <a href="[% ctx.opac_root %]/holds">View All</a>
                             </td>
                         </tr>
                     </table>
index ae1dac0..c03df65 100644 (file)
@@ -6,11 +6,11 @@
             href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
         <link rel="stylesheet" type="text/css"
             href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
-        [%# <link rel="unapi-server" type="application/xml" title="unAPI"
-            href="/opac/extras/unapi" />%]
         <title>Catalog - King County Library - [% ctx.page_title %]</title>
-        [% BLOCK html_head; END; # provide a default that can be overridden %]
-        [% PROCESS html_head %]
+        [%# <!-- is this needed? --><link rel="unapi-server"
+            type="application/xml" title="unAPI" href="/opac/extras/unapi" />%]
+        [% BLOCK html_head; END; # provide a default that can be overridden -%]
+        [%- PROCESS html_head -%]
     </head>
     <body>
         [% content %] 
index 1474fb6..9db6f32 100644 (file)
@@ -30,7 +30,7 @@
                                             <td class='result_table_pic_header'
                                                 width="78" nowrap="nowrap" valign="top">
                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
-                                                <a href="record/[% rec.bre.id %]"><img alt="Image of item"
+                                                <a href="[% ctx.opac_root %]/record/[% rec.bre.id %]"><img alt="Image of item"
                                                         name='item_jacket' class='result_table_pic'
                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
                                                 [% END %]
@@ -40,7 +40,7 @@
                                                 valign="top">
                                                 <div class="bold">
                                                     <a title="[% attrs.title %]" name='item_title'
-                                                        href="record/[% rec.bre.id %]"
+                                                        href="[% ctx.opac_root %]/record/[% rec.bre.id %]"
                                                         class='search_link'>[% attrs.title %]</a>
                                                 </div>
                                                 <span style="font-size:11px;">
@@ -48,7 +48,7 @@
                                                         <em>
                                                             <a title="[% l("Perform an Author Search") %]"
                                                                 name='item_author'
-                                                                href="results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
+                                                                href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
                                                                 class='search_link'>[% attrs.author %]</a>
                                                         </em> &nbsp;&nbsp;
                                                         [% attrs.pubdate %]
                                                     <div style="float:right;">
                                                         <div style="border-bottom:1px dotted #ccc;padding-top:10px;"
                                                             class="results_aux_utils"><a
-                                                                href="place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
+                                                                href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt="place hold" /><span
                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
index 0a469eb..5f3ad5d 100644 (file)
@@ -1,11 +1,11 @@
 [% PROCESS "default/opac/parts/org_selector.tt2" %]
 <div id="search-box">    
-    <form action="[% skin_root %]results" method="GET">
+    <form action="[% ctx.opac_root %]/results" method="GET">
     <table cellpadding="0" cellspacing="10" border="0">
         <tr>
             <td colspan="3">
                 <span class="search_catalog_lbl">Search the Catalog</span>
-                <a href="[% skin_root %]advanced"
+                <a href="[% ctx.opac_root %]/advanced"
                     id="home_adv_search_link"><span
                     class="adv_search_font">Advanced Search</span></a>
             </td>
@@ -54,7 +54,7 @@
     </table>
     </form>
     <div id="breadcrumb">
-        <a href="[% skin_root %]home">Catalog Home</a> &gt;
+        <a href="[% ctx.opac_root %]/home">Catalog Home</a> &gt;
     </div>
     <div class="clear-both"></div>
 </div>
index 0da00a4..2db1254 100644 (file)
@@ -1,14 +1,14 @@
-[% USE money = format('$%.2f'); %]
+[%- USE money = format('$%.2f');
+    ctx.opac_root = '/eg/opac' -%]
 <div id="header">
     <div class="float-left">
-        <a href="http://www.kcls.org"><img
-            alt="KCLS Logo"
+        <a href="http://www.kcls.org"><img alt="KCLS Logo"
             src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
     </div>
     <div class="float-right">
         [% IF !ctx.user %]
         <div id="your-acct-login">
-            <a href="[% skin_root %]login" id="home_myopac_link"><img
+            <a href="[% ctx.opac_root %]/login" id="home_myopac_link"><img
                 alt="Your Account Log in"
                 src="[% ctx.media_prefix %]/images/login-btn.png"
                 onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
                             <img src="[% ctx.media_prefix %]/images/dash-divider.jpg" />
                         </td>
                         <td id="dash_corner_mid1c">
-                            <a href="[% skin_root %]myopac/main" class="pos-rel-top4"><img
+                            <a href="[% ctx.opac_root %]/myopac/main" class="pos-rel-top4"><img
                                 alt="[% l('My Account') %]"
                                 src="[% ctx.media_prefix %]/images/acct-btn.png"
                                 onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
                                 onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
-                            <a href="[% skin_root %]logout" class="pos-rel-top4"
+                            <a href="[% ctx.opac_root %]/logout" class="pos-rel-top4"
                                 id="logout_link"><img
                                 alt="[% l('Logout') %]"
                                 src="[% ctx.media_prefix %]/images/logout-btn.png"
index e140225..aa70a6c 100644 (file)
@@ -9,7 +9,7 @@
                         <a href="javascript:history.go(-1)"
                             id="util_back_btn"><img alt="Back"
                             src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
-                        <a href="[% skin_root %]home"
+                        <a href="[% ctx.opac_root %]/home"
                             id="util_home_btn"><img alt="Homepage"
                             src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
                         <a href="javascript:window.print();"
index 25eafc8..d4351f2 100644 (file)
         <div id="results_header_bar">
             <div id="results_header_inner">
                 <div class="results_header_btns">
-                    <a href="home"><img alt="Another Search"
+                    <a href="[% ctx.opac_root %]/home"><img alt="Another Search"
                         src="[% ctx.media_prefix %]/images/another_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
                 </div>
                 <div class="results_header_btns">
-                    <a href="advanced"><img alt="Advanced Search"
+                    <a href="[% ctx.opac_root %]/advanced"><img alt="Advanced Search"
                         src="[% ctx.media_prefix %]/images/adv_search.png"
                         onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
                         onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>