added tpac-style config.tt2, mostly for global vars
authorBill Erickson <berick@esilibrary.com>
Mon, 12 May 2014 15:37:23 +0000 (11:37 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 12 May 2014 15:37:23 +0000 (11:37 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/base.tt2
Open-ILS/src/templates/staff/config.tt2 [new file with mode: 0644]

index 5a361b2..ce9cc5e 100644 (file)
@@ -1,10 +1,5 @@
 <!doctype html>
-[%- 
-  EVERGREEN_VERSION='0.0.1' 
-
-  # create script / css refs to individual files instead of using
-  EXPAND_WEB_IMPORTS=1; 
-%]
+[%- PROCESS 'staff/config.tt2' %]
 <html lang="[% ctx.locale %]"
     [%- IF ctx.page_app %] ng-app="[% ctx.page_app %]"[% END -%]
     [%- IF ctx.page_ctrl %] ng-controller="[% ctx.page_ctrl %]"[% END %]>
     <base href="/eg/staff/">
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <!-- TODO: remote hosted CSS should be hosted locally instead -->
     [% IF EXPAND_WEB_IMPORTS %]
-    <link rel="stylesheet" href="[% ctx.media_prefix %]/js/ui/default/staff/build/css/bootstrap.min.css" />
-    <link rel="stylesheet" href="[% ctx.media_prefix %]/js/ui/default/staff/build/css/hotkeys.min.css" />
+    <link rel="stylesheet" href="[% WEB_BUILD_PATH %]/css/bootstrap.min.css" />
+    <link rel="stylesheet" href="[% WEB_BUILD_PATH %]/css/hotkeys.min.css" />
     [% ELSE %]
-    <link rel="stylesheet" href="[% ctx.media_prefix %]/js/ui/default/staff/build/css/evergreen-staff-client-deps.[% EVERGREEN_VERSION %].min.css" />
+    <link rel="stylesheet" href="[% WEB_BUILD_PATH %]/css/evergreen-staff-client-deps.[% EVERGREEN_VERSION %].min.css" />
     [% END %]
     <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/style.css" />
     <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/print.css" type="text/css" media="print" />
   </head>
   <body>
+
     <!-- load the navbar template inline since it's used on every page -->
     <script type="text/ng-template" id="eg-navbar-template">
       [% INCLUDE "staff/navbar.tt2" %]
     </script>
+
     <!-- instantiate the navbar by invoking it's name -->
     <eg-navbar></eg-navbar>
 
+    <!-- main page content goes here -->
     <div id="top-content-container" class="container">[% content %]</div>
+
     [% 
       # status bar along bottom of page
       INCLUDE "staff/statusbar.tt2";
@@ -42,6 +40,9 @@
       # App-specific JS load commands go into an APP_JS block.
       PROCESS APP_JS;
     %]
+
+    <!-- content printed via the browser is inserted here for 
+         DOM-ification prior to delivery to the printer -->
     <div id="print-div" eg-print-container></div>
   </body>
 </html>
diff --git a/Open-ILS/src/templates/staff/config.tt2 b/Open-ILS/src/templates/staff/config.tt2
new file mode 100644 (file)
index 0000000..c563d7a
--- /dev/null
@@ -0,0 +1,13 @@
+[%- 
+
+# FIXME: update via build process
+EVERGREEN_VERSION='0.0.1' 
+
+# create script / css refs to individual files instead of using
+# compressed build files.  Use this for development and debugging.
+EXPAND_WEB_IMPORTS = 1; 
+
+# path to build files (js, css, fonts)
+WEB_BUILD_PATH = ctx.media_prefix _ '/js/ui/default/staff/build/';
+
+%]