base_uri as a misnomer. changed to base_path. added support for overrideing the...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 8 May 2009 20:44:38 +0000 (20:44 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 8 May 2009 20:44:38 +0000 (20:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13110 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/templates/base.tt2
Open-ILS/web/templates/default/acq/common/jubgrid.tt2
Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2
Open-ILS/web/templates/default/acq/financial/list_funds.tt2
Open-ILS/web/templates/default/acq/financial/list_providers.tt2
Open-ILS/web/templates/default/acq/financial/view_fund.tt2
Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2
Open-ILS/web/templates/default/acq/picklist/list.tt2
Open-ILS/web/templates/default/acq/po/search.tt2
Open-ILS/web/templates/default/conify/global/action/survey.tt2
Open-ILS/web/templates/default/menu.tt2

index 2909880..77c4811 100644 (file)
@@ -1,4 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+[%- ctx.final_dtd = 
+    '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' -%]
+[%- IF !ctx.dtd; ctx.dtd = ctx.final_dtd; END -%]
+[% ctx.dtd %]
 <html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
     <head>
         <title>[% ctx.page_title %]</title>
@@ -10,7 +13,7 @@
             djConfig="parseOnLoad: true, isDebug:true"></script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/dojo/opensrf/md5.js"></script>
         <script>
-            var oilsBasePath = '[% ctx.base_uri %]';
+            var oilsBasePath = '[% ctx.base_path %]';
         </script>
         <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/base.js"></script>
     </head>
index 94bc374..e2f657c 100644 (file)
@@ -49,7 +49,7 @@ pointing to the JUB model (and store) that you have created.
     JUBGrid.getPO = function(rowIndex) {
         var data = JUBGrid.jubGrid.model.getRow(rowIndex);
         if (!(data && data.purchase_order)) return '';
-        return "<a href='[% ctx.base_uri %]/acq/po/view/" + data.purchase_order+"'>"+data.purchase_order+"</a>";
+        return "<a href='[% ctx.base_path %]/acq/po/view/" + data.purchase_order+"'>"+data.purchase_order+"</a>";
     }
     JUBGrid.jubGridLayout = [{
         //noscroll: true,
index 0e1b713..d96ecc3 100644 (file)
@@ -9,7 +9,7 @@
         if(!item) return '';
         var name = this.grid.store.getValue(item, 'name');
         var id = this.grid.store.getValue(item, 'id');
-        return '<a href="[% ctx.base_uri %]/acq/funding_source/view/'+id+'">'+name+'</a>';
+        return '<a href="[% ctx.base_path %]/acq/funding_source/view/'+id+'">'+name+'</a>';
     }
 </script>
 
index af84f9d..2b3c9c2 100644 (file)
@@ -15,7 +15,7 @@
                     return;
                 } else {
                     location.href =  /* go to the details page for this fund */
-                    '[% ctx.base_uri %]/acq/fund/view/'+fundId;
+                    '[% ctx.base_path %]/acq/fund/view/'+fundId;
                 }
             }
         );
@@ -28,7 +28,7 @@
         if(!item) return;
         var name = this.grid.store.getValue(item, 'name');
         var id = this.grid.store.getValue(item, 'id');
-        return '<a href="[% ctx.base_uri %]/acq/fund/view/'+id+'">'+name+'</a>';
+        return '<a href="[% ctx.base_path %]/acq/fund/view/'+id+'">'+name+'</a>';
     }
 </script>
 
index 5fea2b9..e4bc712 100644 (file)
@@ -58,7 +58,7 @@
         if(!item) return;
         var name = this.grid.store.getValue(item, 'name');
         var id = this.grid.store.getValue(item, 'id');
-        return '<a href="[% ctx.base_uri %]/acq/provider/view/'+id+'">'+name+'</a>';
+        return '<a href="[% ctx.base_path %]/acq/provider/view/'+id+'">'+name+'</a>';
     }
 </script> 
 <div dojoType="dijit.layout.ContentPane" layoutAlign="top"> 
index 8435604..fc97851 100644 (file)
@@ -5,7 +5,7 @@
     if(!item) return ''; 
     var fs_id = this.grid.store.getValue(item, 'funding_source');
     var fs = openils.acq.FundingSource.retrieve(fs_id);
-    return '<a href="[% ctx.base_uri %]/acq/funding_source/view/'+fs.id()+'">'+fs.name()+'</a>';
+    return '<a href="[% ctx.base_path %]/acq/funding_source/view/'+fs.id()+'">'+fs.name()+'</a>';
     }
 </script>
 
index b7be6ba..2751814 100644 (file)
@@ -5,7 +5,7 @@
         data = fsAllocationGrid.model.getRow(rowIndex);
         if(data) {
             var fund = openils.acq.Fund.retrieve(data.fund);
-            return '<a href="[% ctx.base_uri %]/acq/fund/view/'+fund.id()+'">'+fund.code()+'</a>';
+            return '<a href="[% ctx.base_path %]/acq/fund/view/'+fund.id()+'">'+fund.code()+'</a>';
         }
     }
 </script>
index a79f72f..1d78691 100644 (file)
@@ -26,7 +26,7 @@
             var pl = plCache[i];
             var id = pl.id();
             if (inDatum  == pl.name()){
-                return '<a href="[% ctx.base_uri %]/acq/picklist/view/'+id+'">'+inDatum+'</a>';
+                return '<a href="[% ctx.base_path %]/acq/picklist/view/'+id+'">'+inDatum+'</a>';
             }
         }
     }
index 4945db1..0db56b3 100644 (file)
@@ -10,7 +10,7 @@
     function getId(rowIndex, item) {
         if(!item) return;
         var data = this.grid.store.getValue(item, 'id');
-        return '<a href="[% ctx.base_uri %]/acq/po/view/' + data + '">'+data;
+        return '<a href="[% ctx.base_path %]/acq/po/view/' + data + '">'+data;
     }
 </script>
 
index fb96083..9b0b796 100644 (file)
@@ -8,7 +8,7 @@
             var sv = svCache[i];
             var id = sv.id();
             if (inDatum  == sv.name()){
-                return '<a href="[% ctx.base_uri %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
+                return '<a href="[% ctx.base_path %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
             }
         }
     }
index 588e152..1812770 100644 (file)
                     <span>Selection Lists</span>
                      <div dojoType="dijit.Menu">
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/picklist/list';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/picklist/list';">
                             My Selection Lists
                         </div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/picklist/bib_search';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/picklist/bib_search';">
                             Title Search
                         </div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/picklist/upload';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/picklist/upload';">
                             Load Records
                         </div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/picklist/brief_record';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/picklist/brief_record';">
                             New Brief Record
                         </div>
                     </div>
                     <span>Purchase Orders</span>
                      <div dojoType="dijit.Menu">
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/po/search';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/po/search';">
                             PO Search
                         </div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/po/li_search';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/po/li_search';">
                             Lineitem Search
                         </div>
                         <!-- XXX 
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/po/marc_upload';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/po/marc_upload';">
                             Load Vendor Order Records
                         </div>
                         -->
@@ -65,7 +65,7 @@
                     <span>Receiving</span>
                     <div dojoType="dijit.Menu">
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/receiving/process';">
+                            onClick="location.href = '[% ctx.base_path %]/acq/receiving/process';">
                                 Receiving
                         </div>
                     </div>
                     <span>Acquisitions</span>
                      <div dojoType="dijit.Menu">
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                            onClick="location.href = '[% ctx.base_uri %]/acq/fund/list';">Funds</div>
+                            onClick="location.href = '[% ctx.base_path %]/acq/fund/list';">Funds</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/acq/funding_source/list';">Funding Sources</div>
+                                onClick="location.href = '[% ctx.base_path %]/acq/funding_source/list';">Funding Sources</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/acq/provider';">Providers</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/acq/provider';">Providers</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/acq/currency_type/list';">Currency Types</div>
+                                onClick="location.href = '[% ctx.base_path %]/acq/currency_type/list';">Currency Types</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/acq/exchange_rate';">Exchange Rates</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/acq/exchange_rate';">Exchange Rates</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/acq/distribution_formula';">Distribution Formulas</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/acq/distribution_formula';">Distribution Formulas</div>
                     </div>
                 </div>
                 <div dojoType="dijit.PopupMenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy">
                     <span>Config</span>
                      <div dojoType="dijit.Menu">
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/config/billing_type';">Billing Types</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/config/billing_type';">Billing Types</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/config/standing_penalty';">Standing Penalties</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/config/standing_penalty';">Standing Penalties</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/permission/grp_penalty_threshold';">
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/permission/grp_penalty_threshold';">
                                     Group Penalty Thresholds</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/config/idl_field_doc';">Field Documentation</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/config/idl_field_doc';">Field Documentation</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/config/z3950_source';">Z39.50 Sources</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/config/z3950_source';">Z39.50 Sources</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/config/circ_modifier';">Circulation Modifiers</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/config/circ_modifier';">Circulation Modifiers</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy" 
-                                onClick="location.href = '[% ctx.base_uri %]/conify/global/action_trigger/event_definition';">Action Trigger</div>
+                                onClick="location.href = '[% ctx.base_path %]/conify/global/action_trigger/event_definition';">Action Trigger</div>
                         <div dojoType="dijit.MenuItem" iconClass="dijitEditorIcon dijitEditorIconCopy"
-                             onClick="location.href = '[% ctx.base_uri %]/conify/global/action/survey';">Surveys</div>
+                             onClick="location.href = '[% ctx.base_path %]/conify/global/action/survey';">Surveys</div>
                     </div>
                 </div>
             </div>