Created examples web dir
authorBill Erickson <berick@esilibrary.com>
Mon, 16 Apr 2012 15:51:36 +0000 (11:51 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 30 Jul 2012 19:05:00 +0000 (15:05 -0400)
Created Open-ILS/examples/web for storing example templates and sample
template overrides and their associated resources (js, css, images).

Moved the sample flattener_test.tt2 into the new web/templates dir.

Added a simple README exaplaining the purpose of the directory.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/examples/tt2/flattener_test.tt2 [deleted file]
Open-ILS/examples/web/README [new file with mode: 0644]
Open-ILS/examples/web/templates/flattener_test.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/examples/tt2/flattener_test.tt2 b/Open-ILS/examples/tt2/flattener_test.tt2
deleted file mode 100644 (file)
index 8f610f6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-[% WRAPPER base.tt2 %]
-[% ctx.page_title = 'Flattener Test' %]
-<!--
-        -->
-<script type="text/javascript">
-    dojo.require("dijit.form.Button");
-    dojo.require("openils.widget.FlattenerGrid");
-</script>
-<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
-    <div dojoType="dijit.layout.ContentPane"
-         layoutAlign="top" class="oils-header-panel">
-        <div>Flattener Test</div>
-        <div>
-            <button dojoType="dijit.form.Button"
-                onClick="grid.showCreateDialog()">New Thing</button>
-            <button dojoType="dijit.form.Button"
-                onClick="grid.deleteSelected()">Delete Selected Thing</button>
-        </div>
-    </div>
-    <!-- <div class="oils-acq-basic-roomy">
-        blah, a dropdown or something here (optional; typical interfaces might
-        have a filtering org select here. Then again, why not use
-        showLoadFilter on the Grid instead?)
-    </div> -->
-    <table
-        id="gridNode"
-        jsid="grid"
-        dojoType="openils.widget.FlattenerGrid"
-        columnPersistKey='"conify.flattener_test"'
-        autoHeight="10"
-        editOnEnter="true"
-        editStyle="pane"
-        showLoadFilter="true"
-        fmClass="'acp'"
-        defaultSort="['call_number']"
-        mapExtras="{copy_status: {path: 'status.name', filter: true}}"
-        query="{'copy_status': ['Available','Reshelving','In process'],'circ_lib': 'BR1'}">
-        <thead>
-            <tr>
-                 <th field="barcode" fpath="barcode" ffilter="true">Barcode</th>
-                <th field="circ_lib_name" fpath="circ_lib.name" ffilter="true">Circulation Library Name</th>
-                <th field="circ_lib" fpath="circ_lib.shortname" ffilter="true">Circulation Library</th>
-                <th field="call_number" fpath="call_number.label" ffilter="true"></th>
-                <th field="shelving_loc" fpath="location.name" ffilter="true">Shelving Location</th>
-            </tr>
-        </thead>
-    </table>
-</div>
-[% END %]
diff --git a/Open-ILS/examples/web/README b/Open-ILS/examples/web/README
new file mode 100644 (file)
index 0000000..ff1096f
--- /dev/null
@@ -0,0 +1,27 @@
+README for Evergreen example web
+================================
+
+What's Here
+-----------
+
+Here lie example templates for testing and examples of template 
+overrides and their associated resources (js, css, images).
+
+Installation
+------------
+
+    * To install all example files.
+    * Templates assume a local override directory of "templates_local"
+
+[source, bash]
+------------------------------------------------------------------------------
+cp -r js/* /openils/var/web/js/
+cp -r css/* /openils/var/web/css/
+cp -r images/* /openils/var/web/images/
+cp -r templates/* /openils/var/templates_local
+------------------------------------------------------------------------------
+
+////////////////////////
+vim:set syntax=asciidoc:
+////////////////////////
+
diff --git a/Open-ILS/examples/web/templates/flattener_test.tt2 b/Open-ILS/examples/web/templates/flattener_test.tt2
new file mode 100644 (file)
index 0000000..8f610f6
--- /dev/null
@@ -0,0 +1,49 @@
+[% WRAPPER base.tt2 %]
+[% ctx.page_title = 'Flattener Test' %]
+<!--
+        -->
+<script type="text/javascript">
+    dojo.require("dijit.form.Button");
+    dojo.require("openils.widget.FlattenerGrid");
+</script>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane"
+         layoutAlign="top" class="oils-header-panel">
+        <div>Flattener Test</div>
+        <div>
+            <button dojoType="dijit.form.Button"
+                onClick="grid.showCreateDialog()">New Thing</button>
+            <button dojoType="dijit.form.Button"
+                onClick="grid.deleteSelected()">Delete Selected Thing</button>
+        </div>
+    </div>
+    <!-- <div class="oils-acq-basic-roomy">
+        blah, a dropdown or something here (optional; typical interfaces might
+        have a filtering org select here. Then again, why not use
+        showLoadFilter on the Grid instead?)
+    </div> -->
+    <table
+        id="gridNode"
+        jsid="grid"
+        dojoType="openils.widget.FlattenerGrid"
+        columnPersistKey='"conify.flattener_test"'
+        autoHeight="10"
+        editOnEnter="true"
+        editStyle="pane"
+        showLoadFilter="true"
+        fmClass="'acp'"
+        defaultSort="['call_number']"
+        mapExtras="{copy_status: {path: 'status.name', filter: true}}"
+        query="{'copy_status': ['Available','Reshelving','In process'],'circ_lib': 'BR1'}">
+        <thead>
+            <tr>
+                 <th field="barcode" fpath="barcode" ffilter="true">Barcode</th>
+                <th field="circ_lib_name" fpath="circ_lib.name" ffilter="true">Circulation Library Name</th>
+                <th field="circ_lib" fpath="circ_lib.shortname" ffilter="true">Circulation Library</th>
+                <th field="call_number" fpath="call_number.label" ffilter="true"></th>
+                <th field="shelving_loc" fpath="location.name" ffilter="true">Shelving Location</th>
+            </tr>
+        </thead>
+    </table>
+</div>
+[% END %]