[open-ils-commits] SPAM: r8252 - in branches/acq-experiment/Open-ILS/web: . oilsweb oilsweb/data oilsweb/data/templates oilsweb/data/templates/oils oilsweb/data/templates/oils/default oilsweb/data/templates/oils/default/acq oilsweb/docs oilsweb/oilsweb oilsweb/oilsweb/config oilsweb/oilsweb/controllers oilsweb/oilsweb/lib oilsweb/oilsweb/lib/acq oilsweb/oilsweb/model oilsweb/oilsweb/public oilsweb/oilsweb/public/oils oilsweb/oilsweb/public/oils/media oilsweb/oilsweb/public/oils/media/css oilsweb/oilsweb/public/oils/media/css/skin oilsweb/oilsweb/public/oils/media/css/theme oilsweb/oilsweb/public/oils/media/images oilsweb/oilsweb/public/oils/media/xsl oilsweb/oilsweb/templates oilsweb/oilsweb/templates/oils oilsweb/oilsweb/templates/oils/default oilsweb/oilsweb/templates/oils/default/acq oilsweb/oilsweb/tests oilsweb/oilsweb/tests/functional oilsweb/oilsweb.egg-info

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Dec 20 14:45:55 EST 2007


Author: erickson
Date: 2007-12-20 14:24:08 -0500 (Thu, 20 Dec 2007)
New Revision: 8252

Added:
   branches/acq-experiment/Open-ILS/web/oilsweb/
   branches/acq-experiment/Open-ILS/web/oilsweb/MANIFEST.in
   branches/acq-experiment/Open-ILS/web/oilsweb/data/
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/base.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/index.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/pl_builder.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/search.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/base.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/footer.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/navigate.html.py
   branches/acq-experiment/Open-ILS/web/oilsweb/development.ini
   branches/acq-experiment/Open-ILS/web/oilsweb/docs/
   branches/acq-experiment/Open-ILS/web/oilsweb/docs/index.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/middleware.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/error.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/template.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/base.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/model/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/model/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/index.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_logo.jpg
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_tiny_logo.jpg
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/test_models.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/websetup.py
   branches/acq-experiment/Open-ILS/web/oilsweb/setup.cfg
   branches/acq-experiment/Open-ILS/web/oilsweb/setup.py
Log:
committing initial generic pylons framwork, with acq basics

Added: branches/acq-experiment/Open-ILS/web/oilsweb/MANIFEST.in
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/MANIFEST.in	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/MANIFEST.in	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,2 @@
+recursive-include oilsweb/public *
+recursive-include oilsweb/templates *

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/base.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/base.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/base.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,118 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198103797.7045071
+_template_filename=u'/home/erickson/code/sandbox/python/pylons/oilsweb/oilsweb/templates/oils/base.html'
+_template_uri=u'oils/default/acq/../../base.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['block_body', 'block_css', 'block_body_content', 'block_head']
+
+
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        self = context.get('self', UNDEFINED)
+        # SOURCE LINE 1
+        context.write(u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n\n<!-- This file defines the most basic requirements of an XHTML block -->\n\n')
+        # SOURCE LINE 5
+        locale = 'en-US' 
+        
+        __M_locals.update(dict([(__M_key, locals()[__M_key]) for __M_key in ['locale'] if __M_key in locals()]))
+        context.write(u" <!-- XXX GET LOCALE FROM PYTHON -->\n<html xmlns='http://www.w3.org/1999/xhtml' lang='")
+        # SOURCE LINE 6
+        context.write(unicode(locale))
+        context.write(u"' xml:lang='")
+        context.write(unicode(locale))
+        context.write(u"'>\n    ")
+        # SOURCE LINE 7
+        context.write(unicode(self.block_head()))
+        context.write(u'\n    ')
+        # SOURCE LINE 8
+        context.write(unicode(self.block_body()))
+        context.write(u'\n</html>\n\n')
+        # SOURCE LINE 18
+        context.write(u'\n\n')
+        # SOURCE LINE 22
+        context.write(u'\n')
+        # SOURCE LINE 23
+        context.write(u'\n\n')
+        # SOURCE LINE 28
+        context.write(u'\n\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_body(context):
+    context.caller_stack.push_frame()
+    try:
+        self = context.get('self', UNDEFINED)
+        # SOURCE LINE 20
+        context.write(u'\n<body>')
+        # SOURCE LINE 21
+        context.write(unicode(self.block_body_content()))
+        context.write(u'</body>\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_css(context):
+    context.caller_stack.push_frame()
+    try:
+        c = context.get('c', UNDEFINED)
+        # SOURCE LINE 25
+        context.write(u"\n    <link rel='stylesheet' type='text/css' href='")
+        # SOURCE LINE 26
+        context.write(unicode(c.oils.core.media_prefix))
+        context.write(u'/css/skin/')
+        context.write(unicode(c.oils.core.skin))
+        context.write(u".css'/>\n    <link rel='stylesheet' type='text/css' href='")
+        # SOURCE LINE 27
+        context.write(unicode(c.oils.core.media_prefix))
+        context.write(u'/css/theme/')
+        context.write(unicode(c.oils.core.theme))
+        context.write(u".css'/>\n")
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_body_content(context):
+    context.caller_stack.push_frame()
+    try:
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_head(context):
+    context.caller_stack.push_frame()
+    try:
+        self = context.get('self', UNDEFINED)
+        def block_title():
+            context.caller_stack.push_frame()
+            try:
+                _ = context.get('_', UNDEFINED)
+                # SOURCE LINE 14
+                context.write(unicode(_('Evergreen Acquisitions')))
+                return ''
+            finally:
+                context.caller_stack.pop_frame()
+        # SOURCE LINE 11
+        context.write(u' <!-- haha.. blockhead -->\n    <!-- Construct a sane default HTML head -->\n    <head>\n        ')
+        # SOURCE LINE 14
+        context.write(u'\n        <title>')
+        # SOURCE LINE 15
+        context.write(unicode(self.block_title()))
+        context.write(u'</title>\n        ')
+        # SOURCE LINE 16
+        context.write(unicode(self.block_css()))
+        context.write(u'\n    </head>\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/index.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/index.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/index.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,58 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198108481.9620631
+_template_filename='/home/erickson/code/sandbox/python/pylons/oilsweb/oilsweb/templates/oils/default/acq/index.html'
+_template_uri='oils/default/acq/index.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['block_content', 'block_title']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'../base.html', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        # SOURCE LINE 1
+        context.write(u'\n\n')
+        # SOURCE LINE 3
+        context.write(u'\n')
+        # SOURCE LINE 8
+        context.write(u'\n\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_content(context):
+    context.caller_stack.push_frame()
+    try:
+        # SOURCE LINE 4
+        context.write(u"\n    <div id='oils-acq-index-block'>\n        ACQ HOME\n    </div>\n")
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_title(context):
+    context.caller_stack.push_frame()
+    try:
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 3
+        context.write(unicode(_('Evergreen Acquisitions Home')))
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/pl_builder.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/pl_builder.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/pl_builder.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,87 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198177152.534961
+_template_filename='/home/erickson/code/ILS/branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html'
+_template_uri='oils/default/acq/pl_builder.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['block_content', 'block_title']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'../base.html', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        # SOURCE LINE 1
+        context.write(u'\n')
+        # SOURCE LINE 2
+        context.write(u'\n')
+        # SOURCE LINE 21
+        context.write(u'\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_content(context):
+    context.caller_stack.push_frame()
+    try:
+        c = context.get('c', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 3
+        context.write(u"\n    <table id='oils-acq-pl_builder-table'>\n        <thead>\n            <tr><td>")
+        # SOURCE LINE 6
+        context.write(unicode(_('Title')))
+        context.write(u'</td><td>')
+        context.write(unicode(_('Author')))
+        context.write(u'</td><td>')
+        context.write(unicode(_('Source')))
+        context.write(u'</td></tr>\n        </thead>\n        <tbody>\n')
+        # SOURCE LINE 9
+        for res in c.oils_acq_records:
+            # SOURCE LINE 10
+            for rec in res['records']:
+                # SOURCE LINE 11
+                context.write(u"                <tr>\n                    <td><input type='checkbox' name='")
+                # SOURCE LINE 12
+                context.write(unicode(c.oils.acq.picked_records_.cgi_name))
+                context.write(u"' value='blah'/></td>\n                    <td>")
+                # SOURCE LINE 13
+                context.write(unicode(rec['extracts']["bibdata.title"]))
+                context.write(u'</td>\n                    <td>')
+                # SOURCE LINE 14
+                context.write(unicode(rec['extracts']["bibdata.author"]))
+                context.write(u'</td>\n                    <td>')
+                # SOURCE LINE 15
+                context.write(unicode(res['service']))
+                context.write(u'</td>\n                </tr>\n')
+        # SOURCE LINE 19
+        context.write(u'        </tbody>\n    </table>\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_title(context):
+    context.caller_stack.push_frame()
+    try:
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 2
+        context.write(unicode(_('Evergreen Acquisitions Results')))
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/search.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/search.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/acq/search.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,109 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198184806.6389661
+_template_filename='/home/erickson/code/ILS/branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html'
+_template_uri='oils/default/acq/search.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['block_content', 'block_title']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'../base.html', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        # SOURCE LINE 1
+        context.write(u'\n')
+        # SOURCE LINE 2
+        context.write(u'\n\n')
+        # SOURCE LINE 35
+        context.write(u'\n\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_content(context):
+    context.caller_stack.push_frame()
+    try:
+        c = context.get('c', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 4
+        context.write(u"\n    <form method='GET' action='pl_builder'>\n        <input type='hidden' name='ses' value='")
+        # SOURCE LINE 6
+        context.write(unicode(c.oils.core.authtoken))
+        context.write(u"'/>\n        <div id='oils-acq-search-block' class='container'>\n            <div id='oils-acq-search-sources-block'>\n                <div id='oils-acq-search-sources-label'>")
+        # SOURCE LINE 9
+        context.write(unicode(_('Search Sources')))
+        context.write(u"</div>\n                <select name='")
+        # SOURCE LINE 10
+        context.write(unicode(c.oils.acq.search_source_.cgi_name))
+        context.write(u"' multiple='multiple' id='oils-acq-search-sources-selector'>\n                    <option value='native-evergreen-catalog'>")
+        # SOURCE LINE 11
+        context.write(unicode(_('Evergreen Catalog')))
+        context.write(u"</option>\n                    <optgroup label='")
+        # SOURCE LINE 12
+        context.write(unicode(_("Z39.50 Sources")))
+        context.write(u"'>\n")
+        # SOURCE LINE 13
+        for src,cfg in c.oils_z39_sources.iteritems():
+            # SOURCE LINE 14
+            context.write(u"                        <option value='")
+            context.write(unicode(src))
+            context.write(u"'>")
+            context.write(unicode(src))
+            context.write(u' ')
+            context.write(unicode(cfg["host"]))
+            context.write(u':')
+            context.write(unicode(cfg["db"]))
+            context.write(u'</option>\n')
+        # SOURCE LINE 16
+        context.write(u"                    </optgroup>\n                </select>\n            </div>\n            <div id='oils-acq-search-form-block'>\n                <table>\n")
+        # SOURCE LINE 21
+        for cls, lbl in c.oils_search_classes.iteritems():
+            # SOURCE LINE 22
+            context.write(u"                <tr class='oils-acq-search-form-row'>\n                    <td class='oils-acq-search-form-label'>")
+            # SOURCE LINE 23
+            context.write(unicode(lbl))
+            context.write(u"</td>\n                    <td class='oils-acq-search-form-input'>\n                        <input name='")
+            # SOURCE LINE 25
+            context.write(unicode(cls))
+            context.write(u"' size='24'/>\n                        <input type='hidden' name='")
+            # SOURCE LINE 26
+            context.write(unicode(c.oils.acq.search_class_.cgi_name))
+            context.write(u"' value='")
+            context.write(unicode(cls))
+            context.write(u"'/>\n                    </td>\n                </tr>\n")
+        # SOURCE LINE 30
+        context.write(u"                </table>\n                <input type='submit' value='")
+        # SOURCE LINE 31
+        context.write(unicode(_("Submit")))
+        context.write(u"'/>\n            </div>\n        </div>\n    </form>\n")
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_title(context):
+    context.caller_stack.push_frame()
+    try:
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 2
+        context.write(unicode(_('Evergreen Acquisitions Search')))
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/base.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/base.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/base.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,121 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198183376.8275831
+_template_filename=u'/home/erickson/code/ILS/branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html'
+_template_uri=u'oils/default/acq/../base.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = ['block_footer', 'block_navigate', 'block_content', 'block_header', 'block_body_content', 'block_sidebar']
+
+
+def _mako_get_namespace(context, name):
+    try:
+        return context.namespaces[(__name__, name)]
+    except KeyError:
+        _mako_generate_namespaces(context)
+        return context.namespaces[(__name__, name)]
+def _mako_generate_namespaces(context):
+    pass
+def _mako_inherit(template, context):
+    _mako_generate_namespaces(context)
+    return runtime._inherit_from(context, u'../base.html', _template_uri)
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        # SOURCE LINE 1
+        context.write(u'\n\n')
+        # SOURCE LINE 23
+        context.write(u'\n\n')
+        # SOURCE LINE 25
+        context.write(u'\n')
+        # SOURCE LINE 26
+        context.write(u'\n')
+        # SOURCE LINE 27
+        context.write(u'\n')
+        # SOURCE LINE 30
+        context.write(u'\n')
+        # SOURCE LINE 33
+        context.write(u'\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_footer(context):
+    context.caller_stack.push_frame()
+    try:
+        # SOURCE LINE 31
+        context.write(u'\n    ')
+        # SOURCE LINE 32
+        runtime._include_file(context, u'footer.html', _template_uri)
+        context.write(u'\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_navigate(context):
+    context.caller_stack.push_frame()
+    try:
+        # SOURCE LINE 28
+        context.write(u'\n    ')
+        # SOURCE LINE 29
+        runtime._include_file(context, u'navigate.html', _template_uri)
+        context.write(u'\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_content(context):
+    context.caller_stack.push_frame()
+    try:
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_header(context):
+    context.caller_stack.push_frame()
+    try:
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_body_content(context):
+    context.caller_stack.push_frame()
+    try:
+        self = context.get('self', UNDEFINED)
+        # SOURCE LINE 3
+        context.write(u"\n    <div id='oils-base-body-block'> \n        <div id='oils-base-header-block'>\n            ")
+        # SOURCE LINE 6
+        context.write(unicode(self.block_header()))
+        context.write(u"\n        </div>\n        <div id='oils-base-main-block' class='container'>\n            <div id='oils-base-navigate-block'>\n                ")
+        # SOURCE LINE 10
+        context.write(unicode(self.block_navigate()))
+        context.write(u"\n            </div>\n            <div id='oils-base-content-block'>\n                ")
+        # SOURCE LINE 13
+        context.write(unicode(self.block_content()))
+        context.write(u"\n            </div>\n            <div id='oils-base-sidebar-block'>\n                ")
+        # SOURCE LINE 16
+        context.write(unicode(self.block_sidebar()))
+        context.write(u"\n            </div>\n        </div>\n        <div id='oils-base-footer-block'>\n            ")
+        # SOURCE LINE 20
+        context.write(unicode(self.block_footer()))
+        context.write(u'\n        </div>\n    </div>\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+
+def render_block_sidebar(context):
+    context.caller_stack.push_frame()
+    try:
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/footer.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/footer.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/footer.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,27 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198182658.882432
+_template_filename=u'/home/erickson/code/ILS/branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html'
+_template_uri=u'oils/default/acq/../footer.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        c = context.get('c', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 1
+        context.write(unicode(_('Powered By')))
+        context.write(u" <img src='")
+        context.write(unicode(c.oils.core.media_prefix))
+        context.write(u"/images/eg_tiny_logo.jpg'/>\n\n")
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/navigate.html.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/navigate.html.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/data/templates/oils/default/navigate.html.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,34 @@
+from mako import runtime, filters, cache
+UNDEFINED = runtime.UNDEFINED
+_magic_number = 2
+_modified_time = 1198108479.9635
+_template_filename=u'/home/erickson/code/sandbox/python/pylons/oilsweb/oilsweb/templates/oils/default/navigate.html'
+_template_uri=u'oils/default/acq/../navigate.html'
+_template_cache=cache.Cache(__name__, _modified_time)
+_source_encoding=None
+_exports = []
+
+
+def render_body(context,**pageargs):
+    context.caller_stack.push_frame()
+    try:
+        __M_locals = dict(pageargs=pageargs)
+        c = context.get('c', UNDEFINED)
+        _ = context.get('_', UNDEFINED)
+        # SOURCE LINE 1
+        context.write(u"<table id='oils-base-navigate-table'>\n    <tbody>\n        <tr><td><a href='index?")
+        # SOURCE LINE 3
+        context.write(unicode(c.oils.make_query_string()))
+        context.write(u"'>")
+        context.write(unicode(_('Home')))
+        context.write(u"</a></td></tr>\n        <tr><td><a href='search?")
+        # SOURCE LINE 4
+        context.write(unicode(c.oils.make_query_string()))
+        context.write(u"'>")
+        context.write(unicode(_('Search')))
+        context.write(u'</a></td></tr>\n    </tbody>\n</table>\n\n')
+        return ''
+    finally:
+        context.caller_stack.pop_frame()
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/development.ini
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/development.ini	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/development.ini	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,76 @@
+#
+# oilsweb - Pylons development environment configuration
+#
+# The %(here)s variable will be replaced with the parent directory of this file
+#
+[DEFAULT]
+debug = true
+# Uncomment and replace with the address which should receive any error reports
+#email_to = you at yourdomain.com
+smtp_server = localhost
+error_email_from = paste at localhost
+
+[server:main]
+use = egg:Paste#http
+#host = 0.0.0.0
+host = 216.154.195.227
+port = 5000
+
+[app:main]
+use = egg:oilsweb
+full_stack = true
+cache_dir = %(here)s/data
+beaker.session.key = oilsweb
+beaker.session.secret = somesecret
+
+osrf_config = /openils/conf/opensrf_core.xml
+osrf_config_ctxt = config.opensrf
+oils_prefix = /oils
+oils_media_prefix = /oils/media
+oils_added_content_prefix = http://dev.gapines.org/opac/extras/ac
+oils_username = admin
+oils_password = open-ils
+oils_xsl_prefix = oilsweb/public/oils/media/xsl
+oils_xsl_acq_bib = acq-bibdata-marc.xslt
+
+
+# If you'd like to fine-tune the individual locations of the cache data dirs
+# for the Cache data, or the Session saves, un-comment the desired settings
+# here:
+#beaker.cache.data_dir = %(here)s/data/cache
+#beaker.session.data_dir = %(here)s/data/sessions
+
+# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
+# Debug mode will enable the interactive debugging tool, allowing ANYONE to
+# execute malicious code after an exception is raised.
+#set debug = false
+
+
+# Logging configuration
+[loggers]
+keys = root, oilsweb
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_oilsweb]
+level = DEBUG
+handlers =
+qualname = oilsweb
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
+datefmt = %H:%M:%S

Added: branches/acq-experiment/Open-ILS/web/oilsweb/docs/index.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/docs/index.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/docs/index.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,12 @@
+oilsweb
++++++++
+
+This is the main index page of your documentation. It should be written in
+`reStructuredText format <http://docutils.sourceforge.net/rst.html>`_.
+
+You can generate your documentation in HTML format by running this command::
+
+    setup.py pudge
+
+For this to work you will need to download and install ``buildutils`` and
+``pudge``.

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,33 @@
+"""Pylons environment configuration"""
+import os
+
+from pylons import config
+
+import oilsweb.lib.app_globals as app_globals
+import oilsweb.lib.helpers
+from oilsweb.config.routing import make_map
+
+def load_environment(global_conf, app_conf):
+    """Configure the Pylons environment via the ``pylons.config``
+    object
+    """
+    # Pylons paths
+    root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+    paths = dict(root=root,
+                 controllers=os.path.join(root, 'controllers'),
+                 static_files=os.path.join(root, 'public'),
+                 templates=[os.path.join(root, 'templates')])
+
+    # Initialize config with the basic options
+    config.init_app(global_conf, app_conf, package='oilsweb',
+                    template_engine='mako', paths=paths)
+
+    config['routes.map'] = make_map()
+    config['pylons.g'] = app_globals.Globals()
+    config['pylons.h'] = oilsweb.lib.helpers
+
+    # Customize templating options via this variable
+    tmpl_options = config['buffet.template_options']
+
+    # CONFIGURATION OPTIONS HERE (note: all config options will override
+    # any Pylons config options)

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/middleware.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/middleware.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/middleware.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,57 @@
+"""Pylons middleware initialization"""
+from paste.cascade import Cascade
+from paste.registry import RegistryManager
+from paste.urlparser import StaticURLParser
+from paste.deploy.converters import asbool
+
+from pylons import config
+from pylons.error import error_template
+from pylons.middleware import error_mapper, ErrorDocuments, ErrorHandler, \
+    StaticJavascripts
+from pylons.wsgiapp import PylonsApp
+
+from oilsweb.config.environment import load_environment
+
+def make_app(global_conf, full_stack=True, **app_conf):
+    """Create a Pylons WSGI application and return it
+
+    ``global_conf``
+        The inherited configuration for this application. Normally from
+        the [DEFAULT] section of the Paste ini file.
+
+    ``full_stack``
+        Whether or not this application provides a full WSGI stack (by
+        default, meaning it handles its own exceptions and errors).
+        Disable full_stack when this application is "managed" by
+        another WSGI middleware.
+
+    ``app_conf``
+        The application's local configuration. Normally specified in the
+        [app:<name>] section of the Paste ini file (where <name>
+        defaults to main).
+    """
+    # Configure the Pylons environment
+    load_environment(global_conf, app_conf)
+
+    # The Pylons WSGI app
+    app = PylonsApp()
+
+    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
+
+    if asbool(full_stack):
+        # Handle Python exceptions
+        app = ErrorHandler(app, global_conf, error_template=error_template,
+                           **config['pylons.errorware'])
+
+        # Display error documents for 401, 403, 404 status codes (and
+        # 500 when debug is disabled)
+        app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf)
+
+    # Establish the Registry for this application
+    app = RegistryManager(app)
+
+    # Static files
+    javascripts_app = StaticJavascripts()
+    static_app = StaticURLParser(config['pylons.paths']['static_files'])
+    app = Cascade([static_app, javascripts_app, app])
+    return app

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,25 @@
+"""Routes configuration
+
+The more specific and detailed routes should be defined first so they
+may take precedent over the more generic routes. For more information
+refer to the routes manual at http://routes.groovie.org/docs/
+"""
+from pylons import config
+from routes import Mapper
+
+def make_map():
+    """Create, configure and return the routes Mapper"""
+    map = Mapper(directory=config['pylons.paths']['controllers'],
+                 always_scan=config['debug'])
+
+    # The ErrorController route (handles 404/500 error pages); it should
+    # likely stay at the top, ensuring it can always be resolved
+    map.connect('error/:action/:id', controller='error')
+
+    # CUSTOM ROUTES HERE
+
+    map.connect('oils/:controller/:action')
+    #map.connect(':controller/:action/:id')
+    map.connect('*url', controller='template', action='view')
+
+    return map

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,76 @@
+import logging
+
+from oilsweb.lib.base import *
+import pylons, os
+import oilsweb.lib.context
+import oilsweb.lib.util
+import oilsweb.lib.acq.search
+from oilsweb.lib.context import Context, SubContext, ContextItem
+
+log = logging.getLogger(__name__)
+
+class AcqContext(SubContext):
+    ''' Define the CGI params for this application '''
+    def __init__(self):
+        self.query = ContextItem(cgi_name='acq.q')
+        self.search_class = ContextItem(cgi_name='acq.sc', multi=True)
+        self.search_source = ContextItem(cgi_name='acq.ss', multi=True)
+        self.picked_records = ContextItem(cgi_name='acq.sr', multi=True)
+
+Context.applySubContext('acq', AcqContext)
+
+
+class AcqController(BaseController):
+
+    def index(self):
+        c.oils = oilsweb.lib.context.Context.init(request)
+        return render('oils/%s/acq/index.html' % c.oils.core.skin)
+
+    def search(self):
+        c.oils = Context.init(request)
+        c.oils_z39_sources = oilsweb.lib.acq.search.fetch_z39_sources(c.oils)
+
+        sc = {}
+        for data in c.oils_z39_sources.values():
+            for key, val in data['attrs'].iteritems():
+                sc[key] = val.get('label') or key
+        c.oils_search_classes = sc
+            
+        return render('oils/%s/acq/search.html' % c.oils.core.skin)
+        
+
+    def pl_builder(self):
+        c.oils = oilsweb.lib.context.Context.init(request)
+        # add logic to see where we are fetching bib data from
+
+        if c.oils.acq.search_source:
+            c.oils_acq_records = self._build_z39_search(c.oils)
+
+        return render('oils/%s/acq/pl_builder.html' % c.oils.core.skin)
+
+
+
+    def _build_z39_search(self, ctx):
+
+        search = {
+            'service' : [],
+            'username' : [],
+            'password' : [],
+            'search' : {}
+        }
+
+        # collect the sources and credentials
+        for src in c.oils.acq.search_source:
+            search['service'].append(src)
+            search['username'].append("") # XXX
+            search['password'].append("") # XXX
+
+        # collect the search classes
+        for cls in c.oils.acq.search_class:
+            if request.params[cls]:
+                search['search'][cls] = request.params[cls]
+
+        return oilsweb.lib.acq.search.multi_search(ctx, search)
+
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/error.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/error.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/error.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,39 @@
+import os.path
+
+import paste.fileapp
+from pylons.middleware import error_document_template, media_path
+
+from oilsweb.lib.base import *
+
+class ErrorController(BaseController):
+    """Generates error documents as and when they are required.
+
+    The ErrorDocuments middleware forwards to ErrorController when error
+    related status codes are returned from the application.
+
+    This behaviour can be altered by changing the parameters to the
+    ErrorDocuments middleware in your config/middleware.py file.
+    """
+
+    def document(self):
+        """Render the error document"""
+        page = error_document_template % \
+            dict(prefix=request.environ.get('SCRIPT_NAME', ''),
+                 code=request.params.get('code', ''),
+                 message=request.params.get('message', ''))
+        return page
+
+    def img(self, id):
+        """Serve Pylons' stock images"""
+        return self._serve_file(os.path.join(media_path, 'img', id))
+
+    def style(self, id):
+        """Serve Pylons' stock stylesheets"""
+        return self._serve_file(os.path.join(media_path, 'style', id))
+
+    def _serve_file(self, path):
+        """Call Paste's FileApp (a WSGI application) to serve the file
+        at the specified path
+        """
+        fapp = paste.fileapp.FileApp(path)
+        return fapp(request.environ, self.start_response)

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/template.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/template.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/template.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,27 @@
+from oilsweb.lib.base import *
+
+class TemplateController(BaseController):
+
+    def view(self, url):
+        """By default, the final controller tried to fulfill the request
+        when no other routes match. It may be used to display a template
+        when all else fails, e.g.::
+
+            def view(self, url):
+                return render('/%s' % url)
+
+        Or if you're using Mako and want to explicitly send a 404 (Not
+        Found) response code when the requested template doesn't exist::
+
+            import mako.exceptions
+
+            def view(self, url):
+                try:
+                    return render('/%s' % url)
+                except mako.exceptions.TopLevelLookupException:
+                    abort(404)
+
+        By default this controller aborts the request with a 404 (Not
+        Found)
+        """
+        abort(404)

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,44 @@
+import os
+import oilsweb.lib.context
+import osrf.ses
+import osrf.xml_obj
+import oils.const
+import osrf.log
+
+EG_Z39_SEARCH = 'open-ils.search.z3950.search_class'
+_z_sources = None
+
+def fetch_z39_sources(ctx):
+    global _z_sources
+    if _z_sources:
+        return _z_sources
+    _z_sources = osrf.ses.AtomicRequest(
+        'open-ils.search',
+        'open-ils.search.z3950.retrieve_services', ctx.core.authtoken)
+    return _z_sources
+
+def flatten_record(marcxml):
+    import pylons
+    xslFile = os.path.join(os.getcwd(), pylons.config['oils_xsl_prefix'], pylons.config['oils_xsl_acq_bib'])
+    xformed = oilsweb.lib.util.apply_xsl(marcxml, xslFile)
+    return osrf.xml_obj.XMLFlattener(xformed).parse()
+
+def multi_search(ctx, search):
+    ses = osrf.ses.ClientSession(oils.const.OILS_APP_SEARCH)
+    req = ses.request(EG_Z39_SEARCH, ctx.core.authtoken, search)
+    osrf.log.log_debug("sending " + unicode(search))
+
+    results = []
+    while not req.complete:
+        resp = req.recv(60)
+        if not resp: 
+            break
+        res = resp.content()
+        for rec in res['records']:
+            rec['extracts'] = flatten_record(rec['marcxml'])
+        results.append(res)
+
+    osrf.log.log_debug("got " + unicode(results))
+    return results
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,14 @@
+"""The application's Globals object"""
+from pylons import config
+import oilsweb.lib.util
+
+class Globals(object):
+    """Globals acts as a container for objects available throughout the
+    life of the application
+    """
+
+    def __init__(self):
+        #oilsweb.lib.util.childInit()
+        self.oils_authtoken = None
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/base.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/base.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/base.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,27 @@
+"""The base Controller API
+
+Provides the BaseController class for subclassing, and other objects
+utilized by Controllers.
+"""
+from pylons import c, cache, config, g, request, response, session
+from pylons.controllers import WSGIController
+from pylons.controllers.util import abort, etag_cache, redirect_to
+from pylons.decorators import jsonify, validate
+from pylons.i18n import _, ungettext, N_
+from pylons.templating import render
+
+import oilsweb.lib.helpers as h
+import oilsweb.model as model
+
+class BaseController(WSGIController):
+
+    def __call__(self, environ, start_response):
+        """Invoke the Controller"""
+        # WSGIController.__call__ dispatches to the Controller method
+        # the request is routed to. This routing information is
+        # available in environ['pylons.routes_dict']
+        return WSGIController.__call__(self, environ, start_response)
+
+# Include the '_' function in the public names
+__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \
+           or __name == '_']

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,99 @@
+from oilsweb.lib.util import childInit
+import pylons.config
+import cgi
+
+_context = None
+_subContexts = {}
+
+class ContextItem(object):
+    def __init__(self, **kwargs):
+        self.app = None
+        self.name = kwargs.get('name')
+        self.cgi_name = kwargs.get('cgi_name')
+        self.default_value = kwargs.get('default_value')
+        self.qname = None
+        self.multi = kwargs.get('multi')
+
+class Context(object):
+    def __init__(self):
+        self._fields = []
+
+    def wrap(self):
+        return {'oils': self}
+
+    def applySubContext(self, app, subContext):
+        setattr(self, app, subContext)
+
+    def make_query_string(self):
+        q = ''
+        for f in self._fields:
+            if f.cgi_name:
+                val = getattr(getattr(self, f.app), f.name)
+                if val != f.default_value:
+                    if isinstance(val, list):
+                        for v in val:
+                            q += f.cgi_name+'='+cgi.escape(v)+'&'
+                    else:
+                        q += f.cgi_name+'='+cgi.escape(val)+'&'
+        if len(q) > 0: q = q[:-1] # strip the trailing &
+        return q
+
+    @staticmethod
+    def applySubContext(app, ctx):
+        global _subContexts
+        _subContexts[app] = ctx
+    
+    @staticmethod
+    def getContext():
+        global _context
+        return _context
+
+    @staticmethod
+    def init(req):
+        global _context, _subContexts
+        c = _context = Context()
+        childInit()
+
+        for app, ctx in _subContexts.iteritems():
+            ctx = ctx()
+            setattr(c, app, ctx)
+            for name in ctx._fields():
+                item = getattr(ctx, name)
+                item.app = app
+                item.name = name
+                c._fields.append(item)
+                if item.cgi_name and item.cgi_name in req.params:
+                    if item.multi:
+                        setattr(getattr(c, app), name, req.params.getall(item.cgi_name))
+                    else:
+                        setattr(getattr(c, app), name, req.params[item.cgi_name])
+                else:
+                    setattr(getattr(c, app), name, item.default_value)
+
+                # store the metatdata at _<name>
+                setattr(getattr(c, app), "%s_" % name, item)
+
+        c.core.prefix = pylons.config['oils_prefix']
+        c.core.media_prefix = pylons.config['oils_media_prefix']
+        c.core.ac_prefix = pylons.config['oils_added_content_prefix']
+
+        c.core.skin = 'default' # XXX
+        c.core.theme = 'default' # XXX
+
+        return c
+
+
+class SubContext(object):
+    def _fields(self):
+        return [ f for f in dir(self) if f[0:1] != '_' ]
+
+class CoreContext(SubContext):
+    def __init__(self):
+        self.prefix = ContextItem()
+        self.media_prefix = ContextItem()
+        self.ac_prefix = ContextItem()
+        self.skin = ContextItem()
+        self.theme = ContextItem()
+        self.authtoken = ContextItem(cgi_name='ses')
+Context.applySubContext('core', CoreContext)
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,6 @@
+"""Helper functions
+
+Consists of functions to typically be used within templates, but also
+available to Controllers. This module is available to both as 'h'.
+"""
+from webhelpers import *

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/util.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,43 @@
+import pylons.config
+import libxml2, libxslt
+import oils.utils.utils
+
+WEB_ROOT='oils'
+
+
+def makeTemplatePath(ctx, tail):
+    return '%s/%s/%s' % (WEB_ROOT, ctx.core.skin, tail)
+
+def childInit():
+    ''' Global child-init handler.  
+
+        1. Connects to the OpenSRF network.  Note that the OpenSRF 
+        layer ensures that there is only one connection per thread.
+        2. Parses the IDL file '''
+    import osrf.system, osrf.set, oils.utils.idl, oils.utils.csedit, osrf.cache
+    osrf.system.connect(pylons.config['osrf_config'], pylons.config['osrf_config_ctxt'])
+    oils.utils.idl.oilsParseIDL()
+    oils.utils.csedit.oilsLoadCSEditor()
+
+    # live in opensrf somewhere
+    servers = osrf.set.get('cache.global.servers.server')
+    if not isinstance(servers, list):
+        servers = [servers]
+    osrf.cache.CacheClient.connect(servers)
+
+
+
+_parsedSheets = {}
+def apply_xsl(xmlStr, xslFile, xslParams={}):
+    doc = libxml2.parseDoc(xmlStr)
+    stylesheet = _parsedSheets.get(xslFile)
+
+    if not stylesheet:
+        styledoc = _parsedSheets.get(xslFile) or libxml2.parseFile(xslFile)
+        stylesheet = libxslt.parseStylesheetDoc(styledoc)
+        _parsedSheets[xslFile] = stylesheet
+
+    result = stylesheet.applyStylesheet(doc, xslParams)
+    return stylesheet.saveResultToString(result)
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/model/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/index.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/index.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/index.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+   "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>Pylons Default Page</title>
+  <style>
+    body { background-color: #fff; color: #333; }
+
+    body, p {
+      font-family: verdana, arial, helvetica, sans-serif;
+      font-size:   12px;
+      line-height: 18px;
+    }
+    pre {
+      background-color: #eee;
+      padding: 10px;
+      font-size: 11px;
+      line-height: 13px;
+    }
+
+    a { color: #000; }
+    a:visited { color: #666; }
+    a:hover { color: #fff; background-color:#000; }
+  </style>
+</head>
+<body>
+
+<h1>Welcome to your Pylons Web Application</h1>
+
+<h2>Weren't expecting to see this page?</h2>
+
+<p>The <tt>oilsweb/public/</tt> directory is searched for static files
+ <i>before</i> your controllers are run. Remove this file (<tt>oilsweb/public/index.html</tt>)
+  and edit the routes in <tt>oilsweb/config/routing.py</tt> to point the
+  <a href="/">root path</a> to a 'hello' controller we'll create below:
+  <pre> map.connect('', controller='hello', action='index')</pre>
+</p>
+
+<h2>Getting Started</h2>
+<p>You're now ready to start creating your own web application. To create a 'hello' controller,
+  run the following command in your project's root directory: 
+<pre>
+oilsweb$ paster controller hello
+</pre>
+
+  This generates the following the following code in <tt>oilsweb/controllers/hello.py</tt>:
+<pre>
+import logging
+
+from oilsweb.lib.base import *
+
+log = logging.getLogger(__name__)
+
+class HelloController(BaseController):
+
+    def index(self):
+        # Return a rendered template
+        #   return render('/some/template.mako)
+        # or, Return a response
+        return 'Hello World'
+</pre>
+</p>
+<p>This controller simply prints out 'Hello World' to the browser. Pylons' default routes
+  automatically set up this controller to respond at the <a href="/hello">/hello</a> URL.
+  With the additional route described above, this controller will also respond at the
+  <a href="/">root path</a>.
+</p>
+
+<h3>Using a template</h3>
+<p>To call a template and do something a little more complex, this following example
+   shows how to print out some request information from a
+  <a href="http://www.makotemplates.org">Mako</a> template.
+</p>
+<p>Create a <tt>serverinfo.mako</tt> file in your project's <tt>oilsweb/templates/</tt>
+  directory with the following contents:
+</p>  
+<pre>
+&lt;h2&gt;
+Server info for ${request.host}
+&lt;/h2&gt;
+
+&lt;p&gt;
+The URL you called: ${h.url_for()}
+&lt;/p&gt;
+
+&lt;p&gt;
+The name you set: ${c.name}
+&lt;/p&gt;
+
+&lt;p&gt;The WSGI environ:&lt;br /&gt;
+&lt;pre&gt;${c.pretty_environ}&lt;/pre&gt;
+&lt;/p&gt;
+</pre>
+
+Then add the following to your 'hello' controller class:
+<pre>
+    def serverinfo(self):
+        import cgi
+        import pprint
+        c.pretty_environ = cgi.escape(pprint.pformat(request.environ))
+        c.name = 'The Black Knight'
+        return render('/serverinfo.mako')
+</pre>
+
+You can now view the page at: <tt><a href="/hello/serverinfo">/hello/serverinfo</a></tt>
+</p>
+</body>
+</html>

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,13 @@
+
+#oils-acq-index-block { font-weight:bold; }
+#oils-acq-search-container { width:100%; }
+#oils-acq-search-sources-block { width:29%; vertical-align: top; float: left; }
+#oils-acq-search-form-block { width:70%; vertical-align: top; float:right; }
+#oils-acq-search-sources-selector { padding: 2px; }
+#oils-acq-search-sources-selector option { margin-bottom: 2px; }
+.oils-acq-search-form-row { width: 100%; }
+.oils-acq-search-form-label {}
+.oils-acq-search-form-input {}
+
+#oils-acq-pl_builder-table td { padding: 3px; }
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,23 @@
+/* import the default css for the install applications */
+ at import "acq_default.css";
+
+/* base default style */
+
+/** Generic style ------------------------------ **/
+/* use this for divs whose contents should be entirely contained within the div */
+.container:after {content: ""; display: block; height: 0; clear: both; }
+table { border-collapse: collapse; }
+
+#oils-base-body-block { width: 100%; }
+#oils-base-main-block { width: 100%; }
+#oils-base-navigate-block { width: 15%; vertical-align: top; float:left;}
+#oils-base-content-block { width: 84%; vertical-align: top; float:right;}
+#oils-base-sidebar-block { width: 15%; vertical-align: top; float:left;}
+
+#oils-base-header-block { width: 100%; text-align: center; vertical-align: bottom;}
+#oils-base-footer-block { width: 100%; text-align: center; vertical-align: bottom;}
+
+
+
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,10 @@
+
+#oils-acq-index-div { font-weight:bold; }
+#oils-acq-search-container { width:100%; }
+#oils-acq-search-sources-div { width:20%; float:left; }
+#oils-acq-search-form-div { width:80%; float:right; }
+#oils-acq-search-z39-sources-table thead td { font-weight: bold; }
+#oils-acq-search-z39-sources-table tbody td { width: 33%; }
+#oils-acq-search-sources-label { font-weight: bold; }
+#oils-acq-pl_builder-table thead td { font-weight: bold; }
+#oils-acq-pl_builder-table td { border-bottom: 1px solid green;}

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,15 @@
+/* import the default css for the install applications */
+ at import "acq_default.css";
+
+body { font-size: 85%; }
+
+/* base default style */
+#oils-base-body-block {}
+#oils-base-navigate-block {border: 1px solid green;}
+#oils-base-content-block {}
+#oils-base-sidebar-block {border: 1px solid red;}
+#oils-base-footer-block {padding: 3px; margin-top: 20px; border: 1px solid green;}
+
+
+
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_logo.jpg
===================================================================
(Binary files differ)


Property changes on: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_logo.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_tiny_logo.jpg
===================================================================
(Binary files differ)


Property changes on: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_tiny_logo.jpg
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,154 @@
+<xsl:stylesheet version="1.0" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc" xmlns="http://open-ils.org/spec/opensrf/ACQ/bibdata/v1">
+        <xsl:output method="xml" indent="yes"/>
+
+	<xsl:template match="/">
+		<xsl:apply-templates/>
+	</xsl:template>
+
+	<xsl:template match="marc:record">
+		<bibdata>
+
+		<!-- language -->
+		<xsl:choose>
+			<xsl:when test="marc:datafield[@tag='240']/marc:subfield[@code='l']">
+				<xsl:for-each select="marc:datafield[@tag='240']/marc:subfield[@code='l']">
+					<language><xsl:value-of select="."/></language>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:when test="marc:datafield[@tag='041']/marc:subfield[@code='a']">
+				<xsl:for-each select="marc:datafield[@tag='041']/marc:subfield[@code='a'][1]">
+					<language><xsl:value-of select="."/></language>
+				</xsl:for-each>
+			</xsl:when>
+			<xsl:when test="//marc:controlfield[@tag='008']">
+				<language><xsl:value-of select="substring(//marc:controlfield[@tag='008']/text(),36,3)"/></language>
+			</xsl:when>
+		</xsl:choose>
+
+		<!-- title -->
+		<xsl:for-each select="marc:datafield[@tag='245'][1]">
+			<title>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">abcmnopr</xsl:with-param>
+				</xsl:call-template>
+			</title>
+
+			<xsl:if test="marc:subfield[@code='k']">
+				<forms>
+					<xsl:for-each select="marc:subfield[@code='k']">
+						<form><xsl:value-of select="."/></form>
+					</xsl:for-each>
+				</forms>
+			</xsl:if>
+
+			<xsl:for-each select="marc:subfield[@code='h']">
+				<medium><xsl:value-of select="."/></medium>
+			</xsl:for-each>
+		</xsl:for-each>
+
+		<!-- author -->
+		<xsl:for-each select="marc:datafield[@tag='100' or @tag='110' or @tag='113']">
+			<author>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">ad</xsl:with-param>
+				</xsl:call-template>
+			</author>
+		</xsl:for-each>
+
+		<!-- publisher -->
+		<xsl:for-each select="marc:datafield[@tag='260']">
+			<publisher>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">b</xsl:with-param>
+				</xsl:call-template>
+			</publisher>
+		</xsl:for-each>
+
+		<!-- pubdate -->
+		<xsl:for-each select="marc:datafield[@tag='260']">
+			<pubdate>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">c</xsl:with-param>
+				</xsl:call-template>
+			</pubdate>
+		</xsl:for-each>
+
+		<!-- edition -->
+		<xsl:for-each select="marc:datafield[@tag='250']">
+			<edition>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">a</xsl:with-param>
+				</xsl:call-template>
+			</edition>
+		</xsl:for-each>
+
+		<!-- pagination -->
+		<xsl:for-each select="marc:datafield[@tag='300']">
+			<pagination>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">a</xsl:with-param>
+				</xsl:call-template>
+			</pagination>
+		</xsl:for-each>
+
+		<!-- physicalSize -->
+		<xsl:for-each select="marc:datafield[@tag='300']">
+			<physicalSize>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">c</xsl:with-param>
+				</xsl:call-template>
+			</physicalSize>
+		</xsl:for-each>
+
+		<!-- isbn -->
+		<xsl:for-each select="marc:datafield[@tag='020']">
+			<isbns>
+				<xsl:for-each select=".">
+					<isbn>
+						<xsl:call-template name="subfieldSelect">
+							<xsl:with-param name="codes">a</xsl:with-param>
+						</xsl:call-template>
+					</isbn>
+				</xsl:for-each>
+			</isbns>
+		</xsl:for-each>
+
+		<!-- issn -->
+		<xsl:for-each select="marc:datafield[@tag='022']">
+			<issns>
+				<xsl:for-each select=".">
+					<issn>
+						<xsl:call-template name="subfieldSelect">
+							<xsl:with-param name="codes">a</xsl:with-param>
+						</xsl:call-template>
+					</issn>
+				</xsl:for-each>
+			</issns>
+		</xsl:for-each>
+
+		<!-- price -->
+		<xsl:for-each select="marc:datafield[(@tag='020' or @tag='022') and marc:subfield[@code='c']][1]">
+			<price>
+				<xsl:call-template name="subfieldSelect">
+					<xsl:with-param name="codes">c</xsl:with-param>
+				</xsl:call-template>
+			</price>
+		</xsl:for-each>
+
+		</bibdata>
+	</xsl:template>
+
+        <xsl:template name="subfieldSelect">
+                <xsl:param name="codes"/>
+                <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
+                <xsl:variable name="str">
+                        <xsl:for-each select="marc:subfield">
+                                <xsl:if test="contains($codes, @code)">
+                                        <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
+                                </xsl:if>
+                        </xsl:for-each>
+                </xsl:variable>
+                <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
+        </xsl:template>
+
+</xsl:stylesheet>

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<!-- This file defines the most basic requirements of an XHTML block -->
+
+<% locale = 'en-US' %> <!-- XXX GET LOCALE FROM PYTHON -->
+<html xmlns='http://www.w3.org/1999/xhtml' lang='${locale}' xml:lang='${locale}'>
+    ${self.block_head()}
+    ${self.block_body()}
+</html>
+
+<%def name='block_head()'> <!-- haha.. blockhead -->
+    <!-- Construct a sane default HTML head -->
+    <head>
+        <%def name="block_title()">${_('Evergreen Acquisitions')}</%def>
+        <title>${self.block_title()}</title>
+        ${self.block_css()}
+    </head>
+</%def>
+
+<%def name='block_body()'>
+<body>${self.block_body_content()}</body>
+</%def>
+<%def name='block_body_content()'/>
+
+<%def name='block_css()'>
+    <link rel='stylesheet' type='text/css' href='${c.oils.core.media_prefix}/css/skin/${c.oils.core.skin}.css'/>
+    <link rel='stylesheet' type='text/css' href='${c.oils.core.media_prefix}/css/theme/${c.oils.core.theme}.css'/>
+</%def>
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,9 @@
+<%inherit file='../base.html'/>
+
+<%def name="block_title()">${_('Evergreen Acquisitions Home')}</%def>
+<%def name="block_content()">
+    <div id='oils-acq-index-block'>
+        ACQ HOME
+    </div>
+</%def>
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,21 @@
+<%inherit file='../base.html'/>
+<%def name="block_title()">${_('Evergreen Acquisitions Results')}</%def>
+<%def name="block_content()">
+    <table id='oils-acq-pl_builder-table'>
+        <thead>
+            <tr><td>${_('Title')}</td><td>${_('Author')}</td><td>${_('Source')}</td></tr>
+        </thead>
+        <tbody>
+        % for res in c.oils_acq_records:
+            % for rec in res['records']:
+                <tr>
+                    <td><input type='checkbox' name='${c.oils.acq.picked_records_.cgi_name}' value='blah'/></td>
+                    <td>${rec['extracts'].get("bibdata.title")}</td>
+                    <td>${rec['extracts'].get("bibdata.author")}</td>
+                    <td>${res['service']}</td>
+                </tr>
+            % endfor
+        % endfor
+        </tbody>
+    </table>
+</%def>

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,36 @@
+<%inherit file='../base.html'/>
+<%def name="block_title()">${_('Evergreen Acquisitions Search')}</%def>
+
+<%def name="block_content()">
+    <form method='GET' action='pl_builder'>
+        <input type='hidden' name='ses' value='${c.oils.core.authtoken}'/>
+        <div id='oils-acq-search-block' class='container'>
+            <div id='oils-acq-search-sources-block'>
+                <div id='oils-acq-search-sources-label'>${_('Search Sources')}</div>
+                <select name='${c.oils.acq.search_source_.cgi_name}' multiple='multiple' id='oils-acq-search-sources-selector'>
+                    <option value='native-evergreen-catalog'>${_('Evergreen Catalog')}</option>
+                    <optgroup label='${_("Z39.50 Sources")}'>
+                        % for src,cfg in c.oils_z39_sources.iteritems():
+                        <option value='${src}'>${src} ${cfg["host"]}:${cfg["db"]}</option>
+                        % endfor
+                    </optgroup>
+                </select>
+            </div>
+            <div id='oils-acq-search-form-block'>
+                <table>
+                % for cls, lbl in c.oils_search_classes.iteritems():
+                <tr class='oils-acq-search-form-row'>
+                    <td class='oils-acq-search-form-label'>${lbl}</td>
+                    <td class='oils-acq-search-form-input'>
+                        <input name='${cls}' size='24'/>
+                        <input type='hidden' name='${c.oils.acq.search_class_.cgi_name}' value='${cls}'/>
+                    </td>
+                </tr>
+                % endfor
+                </table>
+                <input type='submit' value='${_("Submit")}'/>
+            </div>
+        </div>
+    </form>
+</%def>
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,33 @@
+<%inherit file='../base.html'/>
+
+<%def name='block_body_content()'>
+    <div id='oils-base-body-block'> 
+        <div id='oils-base-header-block'>
+            ${self.block_header()}
+        </div>
+        <div id='oils-base-main-block' class='container'>
+            <div id='oils-base-navigate-block'>
+                ${self.block_navigate()}
+            </div>
+            <div id='oils-base-content-block'>
+                ${self.block_content()}
+            </div>
+            <div id='oils-base-sidebar-block'>
+                ${self.block_sidebar()}
+            </div>
+        </div>
+        <div id='oils-base-footer-block'>
+            ${self.block_footer()}
+        </div>
+    </div>
+</%def>
+
+<%def name='block_header()'/>
+<%def name='block_sidebar()'/>
+<%def name='block_content()'/>
+<%def name='block_navigate()'>
+    <%include file='navigate.html'/>
+</%def>
+<%def name='block_footer()'>
+    <%include file='footer.html'/>
+</%def>

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,2 @@
+${_('Powered By')} <img src='${c.oils.core.media_prefix}/images/eg_tiny_logo.jpg'/>
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,7 @@
+<table id='oils-base-navigate-table'>
+    <tbody>
+        <tr><td><a href='index?${c.oils.make_query_string()}'>${_('Home')}</a></td></tr>
+        <tr><td><a href='search?${c.oils.make_query_string()}'>${_('Search')}</a></td></tr>
+    </tbody>
+</table>
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,40 @@
+"""Pylons application test package
+
+When the test runner finds and executes tests within this directory,
+this file will be loaded to setup the test environment.
+
+It registers the root directory of the project in sys.path and
+pkg_resources, in case the project hasn't been installed with
+setuptools. It also initializes the application via websetup (paster
+setup-app) with the project's test.ini configuration file.
+"""
+import os
+import sys
+from unittest import TestCase
+
+import pkg_resources
+import paste.fixture
+import paste.script.appinstall
+from paste.deploy import loadapp
+from routes import url_for
+
+__all__ = ['url_for', 'TestController']
+
+here_dir = os.path.dirname(os.path.abspath(__file__))
+conf_dir = os.path.dirname(os.path.dirname(here_dir))
+
+sys.path.insert(0, conf_dir)
+pkg_resources.working_set.add_entry(conf_dir)
+pkg_resources.require('Paste')
+pkg_resources.require('PasteScript')
+
+test_file = os.path.join(conf_dir, 'test.ini')
+cmd = paste.script.appinstall.SetupCommand('setup-app')
+cmd.run([test_file])
+
+class TestController(TestCase):
+
+    def __init__(self, *args, **kwargs):
+        wsgiapp = loadapp('config:test.ini', relative_to=conf_dir)
+        self.app = paste.fixture.TestApp(wsgiapp)
+        TestCase.__init__(self, *args, **kwargs)

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/__init__.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,7 @@
+from oilsweb.tests import *
+
+class TestAcqController(TestController):
+
+    def test_index(self):
+        response = self.app.get(url_for(controller='acq'))
+        # Test response...

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/test_models.py
===================================================================

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/websetup.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/websetup.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/websetup.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,14 @@
+"""Setup the oilsweb application"""
+import logging
+
+from paste.deploy import appconfig
+from pylons import config
+
+from oilsweb.config.environment import load_environment
+
+log = logging.getLogger(__name__)
+
+def setup_config(command, filename, section, vars):
+    """Place any commands to setup oilsweb here"""
+    conf = appconfig('config:' + filename)
+    load_environment(conf.global_conf, conf.local_conf)

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,10 @@
+Metadata-Version: 1.0
+Name: oilsweb
+Version: 0.0.0dev
+Summary: UNKNOWN
+Home-page: UNKNOWN
+Author: UNKNOWN
+Author-email: UNKNOWN
+License: UNKNOWN
+Description: UNKNOWN
+Platform: UNKNOWN

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,29 @@
+MANIFEST.in
+README.txt
+setup.cfg
+setup.py
+oilsweb/__init__.py
+oilsweb/websetup.py
+oilsweb.egg-info/PKG-INFO
+oilsweb.egg-info/SOURCES.txt
+oilsweb.egg-info/dependency_links.txt
+oilsweb.egg-info/entry_points.txt
+oilsweb.egg-info/paste_deploy_config.ini_tmpl
+oilsweb.egg-info/requires.txt
+oilsweb.egg-info/top_level.txt
+oilsweb/config/__init__.py
+oilsweb/config/environment.py
+oilsweb/config/middleware.py
+oilsweb/config/routing.py
+oilsweb/controllers/__init__.py
+oilsweb/controllers/error.py
+oilsweb/controllers/template.py
+oilsweb/lib/__init__.py
+oilsweb/lib/app_globals.py
+oilsweb/lib/base.py
+oilsweb/lib/helpers.py
+oilsweb/model/__init__.py
+oilsweb/public/index.html
+oilsweb/tests/__init__.py
+oilsweb/tests/test_models.py
+oilsweb/tests/functional/__init__.py

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1 @@
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,7 @@
+
+    [paste.app_factory]
+    main = oilsweb.config.middleware:make_app
+
+    [paste.app_install]
+    main = pylons.util:PylonsInstaller
+    
\ No newline at end of file

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,58 @@
+#
+# oilsweb - Pylons configuration
+#
+# The %(here)s variable will be replaced with the parent directory of this file
+#
+[DEFAULT]
+debug = true
+email_to = you at yourdomain.com
+smtp_server = localhost
+error_email_from = paste at localhost
+
+[server:main]
+use = egg:Paste#http
+host = 0.0.0.0
+port = 5000
+
+[app:main]
+use = egg:oilsweb
+full_stack = true
+cache_dir = %(here)s/data
+beaker.session.key = oilsweb
+beaker.session.secret = ${app_instance_secret}
+app_instance_uuid = ${app_instance_uuid}
+
+# If you'd like to fine-tune the individual locations of the cache data dirs
+# for the Cache data, or the Session saves, un-comment the desired settings
+# here:
+#beaker.cache.data_dir = %(here)s/data/cache
+#beaker.session.data_dir = %(here)s/data/sessions
+
+# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
+# Debug mode will enable the interactive debugging tool, allowing ANYONE to
+# execute malicious code after an exception is raised.
+set debug = false
+
+
+# Logging configuration
+[loggers]
+keys = root
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = INFO
+handlers = console
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,3 @@
+Pylons
+WebHelpers
+PasteScript

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1 @@
+Pylons>=0.9.6.1
\ No newline at end of file

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1 @@
+oilsweb

Added: branches/acq-experiment/Open-ILS/web/oilsweb/setup.cfg
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/setup.cfg	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/setup.cfg	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,59 @@
+[egg_info]
+tag_build = dev
+tag_svn_revision = true
+
+[easy_install]
+find_links = http://www.pylonshq.com/download/
+
+[pudge]
+theme = pythonpaste.org
+
+# Add extra doc files here with spaces between them
+docs = docs/index.txt
+
+# Doc Settings
+doc_base = docs/
+dest = docs/html
+
+# Add extra modules here separated with commas
+modules = oilsweb
+title = Oilsweb
+organization = Pylons
+
+# Highlight code-block sections with Pygments
+highlighter = pygments
+
+# Optionally add extra links
+#organization_url = http://pylonshq.com/
+#trac_url = http://pylonshq.com/project
+settings = no_about=true
+
+# Optionally add extra settings
+#           link1=/community/ Community
+#           link2=/download/ Download
+
+[publish]
+doc-dir=docs/html
+make-dirs=1
+
+# Babel configuration
+[compile_catalog]
+domain = oilsweb
+directory = oilsweb/i18n
+statistics = true
+
+[extract_messages]
+add_comments = TRANSLATORS:
+output_file = oilsweb/i18n/oilsweb.pot
+width = 80
+
+[init_catalog]
+domain = oilsweb
+input_file = oilsweb/i18n/oilsweb.pot
+output_dir = oilsweb/i18n
+
+[update_catalog]
+domain = oilsweb
+input_file = oilsweb/i18n/oilsweb.pot
+output_dir = oilsweb/i18n
+previous = true

Added: branches/acq-experiment/Open-ILS/web/oilsweb/setup.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/setup.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/setup.py	2007-12-20 19:24:08 UTC (rev 8252)
@@ -0,0 +1,31 @@
+try:
+    from setuptools import setup, find_packages
+except ImportError:
+    from ez_setup import use_setuptools
+    use_setuptools()
+    from setuptools import setup, find_packages
+
+setup(
+    name='oilsweb',
+    version="",
+    #description='',
+    #author='',
+    #author_email='',
+    #url='',
+    install_requires=["Pylons>=0.9.6.1"],
+    packages=find_packages(exclude=['ez_setup']),
+    include_package_data=True,
+    test_suite='nose.collector',
+    package_data={'oilsweb': ['i18n/*/LC_MESSAGES/*.mo']},
+    #message_extractors = {'oilsweb': [
+    #        ('**.py', 'python', None),
+    #        ('templates/**.mako', 'mako', None),
+    #        ('public/**', 'ignore', None)]},
+    entry_points="""
+    [paste.app_factory]
+    main = oilsweb.config.middleware:make_app
+
+    [paste.app_install]
+    main = pylons.util:PylonsInstaller
+    """,
+)



More information about the open-ils-commits mailing list