[open-ils-commits] SPAM: r8280 - in
branches/acq-experiment/Open-ILS/web/oilsweb: .
oilsweb/config oilsweb/controllers oilsweb/lib
oilsweb/lib/acq oilsweb/public/oils/media/css/skin
oilsweb/public/oils/media/css/skin/default
oilsweb/public/oils/media/css/theme
oilsweb/public/oils/media/css/theme/default
oilsweb/templates/oils/default oilsweb/templates/oils/default/acq
oilsweb/templates/oils/default/admin oilsweb/tests/functional
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 27 16:41:14 EST 2007
Author: erickson
Date: 2007-12-27 16:18:27 -0500 (Thu, 27 Dec 2007)
New Revision: 8280
Added:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/base.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/admin.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/admin.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/navigate.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/base.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/navigate.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/object.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py
Removed:
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/theme/acq_default.css
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/development.ini
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py
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/default.css
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/picklist.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/rdetails.html
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.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/navigate.html
Log:
moving skin/theme css into sub-dir, while still using top-level css file for organization
started an admin app alongside the acq app
added a new top-level cross-app navigation block along with navigation bars for the apps
added a placeholder for the common dashboard
running context postinit after all contexts are initialized
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/development.ini
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/development.ini 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/development.ini 2007-12-27 21:18:27 UTC (rev 8280)
@@ -12,8 +12,8 @@
[server:main]
use = egg:Paste#http
-#host = 0.0.0.0
-host = 216.154.195.227
+host = 0.0.0.0
+#host = 216.154.195.227
port = 5000
[app:main]
@@ -35,6 +35,8 @@
oils_xsl_prefix = oilsweb/public/oils/media/xsl
oils_xsl_acq_bib = acq-bibdata-marc.xslt
oils_xsl_marc2html = oilsMARC21slim2HTML.xsl
+# how long do we cache search results for
+oils_bib_cache_time = 3200
# path to extra templates or overridden templates
local_templates = /openils/var/web/oilsweb/oilsweb/local_templates
# ----------------------------------------------------------
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/routing.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -18,10 +18,20 @@
# CUSTOM ROUTES HERE
- map.connect('oils/:controller/:action')
+ if config.get('use_mod_python'):
+ map.connect(':controller/:action')
+ map.connect('admin/:action/:type/:id', controller='admin')
+ map.connect('admin/:action/:type', controller='admin')
+ else:
+ map.connect('oils/:controller/:action')
+ map.connect('oils/admin/:action/:type/:id', controller='admin')
+ map.connect('oils/admin/:action/:type', controller='admin')
+
+ ''' trying a different set of admin routes above...
map.connect('acq_admin', 'oils/admin', controller='acq_admin')
map.connect('acq_admin_object', 'oils/admin/:object', controller='acq_admin')
map.connect('acq_admin_direct', 'oils/admin/direct/:object/:id', controller='acq_admin')
+ '''
map.connect('*url', controller='template', action='view')
return map
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,6 +1,6 @@
from oilsweb.lib.base import *
-import logging
+import logging, pylons
import oilsweb.lib.context
import oilsweb.lib.util
import oilsweb.lib.acq.search
@@ -22,6 +22,11 @@
self.record = ContextItem(cgi_name='acq.r')
self.picklist_item = ContextItem(cgi_name='acq.pi', multi=True)
self.extract_bib_field = ContextItem(default_value=oilsweb.lib.acq.search.extract_bib_field)
+ self.prefix = ContextItem()
+
+ def postinit(self):
+ self.prefix = "%s/acq" % Context.getContext().core.prefix
+
Context.applySubContext('acq', AcqContext)
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/admin.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,55 @@
+from oilsweb.lib.base import *
+import oilsweb.lib.util
+from oilsweb.lib.context import Context, SubContext, ContextItem
+import oils.utils.idl
+import oils.utils.csedit
+import osrf.ses
+
+class AdminContext(SubContext):
+ ''' Define the CGI/Context params for this application '''
+ def __init__(self):
+ self.object = ContextItem()
+ self.object_class = ContextItem()
+ self.object_meta = ContextItem()
+ self.mode = ContextItem(default_value='view')
+ self.prefix = ContextItem()
+ def postinit(self):
+ self.prefix = "%s/admin" % Context.getContext().core.prefix
+
+Context.applySubContext('adm', AdminContext)
+
+class AdminController(BaseController):
+
+ def init(self, type, id=None):
+ c.oils = oilsweb.lib.context.Context.init(request, response)
+ c.oils.adm.object_class = type
+ meta = c.oils.adm.object_meta = oils.utils.idl.oilsGetIDLParser().IDLObject[type]
+
+ if id is not None:
+ c.oils.adm.object = osrf.ses.AtomicRequest(
+ 'open-ils.cstore',
+ 'open-ils.cstore.direct.%s.retrieve' %
+ meta['fieldmapper'].replace('::', '.'), id)
+
+ c.oils.apply_cookies()
+
+ def view(self, type, id):
+ self.init(type, id)
+ return render('oils/%s/admin/object.html' % c.oils.core.skin)
+
+ def update(self, type, id):
+ self.init(type, id)
+ c.oils.adm.mode = 'update'
+ return render('oils/%s/admin/object.html' % c.oils.core.skin)
+
+ def create(self, type):
+ self.init(type)
+ c.oils.adm.mode = 'create'
+ return render('oils/%s/admin/object.html' % c.oils.core.skin)
+
+ def delete(self, type, id):
+ self.init(type, id)
+ c.oils.adm.mode = 'delete'
+ return render('oils/%s/admin/object.html' % c.oils.core.skin) # show a confirmation page
+
+
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/base.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/base.py (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/base.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,21 @@
+import logging
+
+from oilsweb.lib.base import *
+from oilsweb.lib.context import Context, SubContext, ContextItem
+
+log = logging.getLogger(__name__)
+
+
+class BaseContext(SubContext):
+ def postinit(self):
+ self.prefix = "%s/base" % Context.getContext().core.prefix
+Context.applySubContext('base', BaseContext)
+
+
+class BaseController(BaseController):
+ ''' Controller for globally shared interfaces '''
+
+ def dashboard(self):
+ c.oils = Context.init(request, response)
+ return render('oils/%s/dashboard.html' % c.oils.core.skin)
+
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/search.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -4,6 +4,7 @@
import osrf.xml_obj
import oils.const
import osrf.log, osrf.cache, osrf.json
+import pylons.config
EG_Z39_SOURCES = 'open-ils.search.z3950.retrieve_services'
EG_Z39_SEARCH = 'open-ils.search.z3950.search_class'
@@ -47,7 +48,7 @@
key = md5.new()
key.update(unicode(search))
key = key.hexdigest()
- osrf.cache.CacheClient().put(key, results)
+ osrf.cache.CacheClient().put(key, results, pylons.config.get('oils_bib_cache_time', 900))
return key
def extract_bib_field(rec, field, all=False):
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -111,6 +111,9 @@
# store the metatdata at <name>_
setattr(getattr(c, app), "%s_" % name, item)
+ # run postinit after all contexts have been loaded
+ for app in _subContexts.keys():
+ ctx = getattr(c, app)
ctx.postinit()
return c
Deleted: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,34 +0,0 @@
-
-#oils-acq-index-block { font-weight:bold; }
-
-/* bib search */
-#oils-acq-search-container { width:100%; }
-#oils-acq-search-sources-block { width:32%; vertical-align: top; float: left; margin-right: 10px;}
-#oils-acq-search-form-block { width:63%; 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-search-sources-list { padding: 1px; }
-#oils-acq-search-sources-list li { list-style-type: none; padding-left: 0px; }
-.oils-acq-search-sources-sublist { padding: 1px; list-style-type: none;}
-.oils-acq-search-sources-sublist li { margin-left: 10px; }
-.oils-acq-search-subsources-label { margin-top: 5px; }
-#oils-acq-search-sources-label { margin-bottom: 10px; }
-#oils-acq-search-fields-label { margin-bottom: 10px; }
-#oils-acq-search-fields-submit-block { margin: 5px; text-align: center;}
-
-/* bib search results / picklist builder interface */
-#oils-acq-pl_builder-table { width: 100%; }
-.oils-acq-record_list-records-jacket { width: 42px; height: 54px; padding-left: 10px; }
-.oils-acq-record_list-records-title-row {}
-.oils-acq-record_list-records-author-row td { padding-left: 30px; }
-.oils-acq-record_list-records-phys_desc-row td { padding-left: 30px; }
-.oils-acq-record_list-records-phys_desc-row {}
-#oils-acq-rdetail-marc-block { margin-top: 10px; padding: 10px; }
-
-
-#oils-acq-picklist-table { width: 100%; }
-
-
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,39 @@
+
+#oils-acq-index-block { font-weight:bold; }
+/*
+.oils-sub-navigate-block { width: 100%; text-align: left; padding: 3px;}
+.oils-sub-navigate-block span { padding: 3px; }
+*/
+
+/* bib search */
+#oils-acq-search-container { width:100%; }
+#oils-acq-search-sources-block { width:32%; vertical-align: top; float: left; margin-right: 10px;}
+#oils-acq-search-form-block { width:63%; 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-search-sources-list { padding: 1px; }
+#oils-acq-search-sources-list li { list-style-type: none; padding-left: 0px; }
+.oils-acq-search-sources-sublist { padding: 1px; list-style-type: none;}
+.oils-acq-search-sources-sublist li { margin-left: 10px; }
+.oils-acq-search-subsources-label { margin-top: 5px; }
+#oils-acq-search-sources-label { margin-bottom: 10px; }
+#oils-acq-search-fields-label { margin-bottom: 10px; }
+#oils-acq-search-fields-submit-block { margin: 5px; text-align: center;}
+
+/* bib search results / picklist builder interface */
+#oils-acq-pl_builder-table { width: 100%; }
+.oils-acq-record_list-records-jacket-td { width: 46px; }
+.oils-acq-record_list-records-jacket { width: 42px; height: 54px; padding-left: 0px; }
+.oils-acq-record_list-records-title-row {}
+.oils-acq-record_list-records-author-row td { padding-left: 30px; }
+.oils-acq-record_list-records-phys_desc-row td { padding-left: 30px; }
+.oils-acq-record_list-records-phys_desc-row {}
+#oils-acq-rdetail-marc-block { margin-top: 10px; padding: 10px; }
+
+
+#oils-acq-picklist-table { width: 100%; }
+
+
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/admin.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/admin.css (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/admin.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,3 @@
+#oils-admin-object-actions { width: 100%; padding: 2px; margin: 2px; text-align: right;}
+#oils-admin-object-table { width: 100%; }
+#oils-admin-object-table td { padding: 3px; }
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,5 +1,6 @@
/* import the default css for the install applications */
- at import "acq_default.css";
+ at import "default/acq.css";
+ at import "default/admin.css";
/* base default style */
@@ -11,16 +12,17 @@
#oils-base-body-block { width: 100%; margin-top: 0px; padding-top: 0px;}
#oils-base-main-block { width: 100%; margin-top: 0px; padding-top: 0px;}
+#oils-base-content-block { width: 84%; vertical-align: top; float:right; padding-top: 0px;}
#oils-base-navigate-block { width: 15%; vertical-align: top; float:left;}
-#oils-base-content-block { width: 84%; vertical-align: top; float:right; padding-top: 8px;}
-#oils-base-sidebar-block { width: 15%; vertical-align: top; float:left;}
#oils-base-navigate-table { width: 100%; }
#oils-base-navigate-table td { width: 100%; }
+#oils-base-sidebar-block { width: 15%; vertical-align: top; float:left;}
#oils-base-header-block { width: 100%; text-align: right; margin-top: 0px; padding-bottom: 4px;}
#oils-base-footer-block { width: 100%; text-align: center; vertical-align: bottom;}
+.oils-base-sub-navigate-block { text-align: center; padding: 3px; margin-bottom: 10px;}
+.oils-base-sub-navigate-block span { padding: 3px; }
-
Deleted: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,22 +0,0 @@
-
-#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; border-bottom: 1px solid #6BA160;}
-#oils-acq-search-fields-label { font-weight: bold; border-bottom: 1px solid #6BA160;}
-#oils-acq-search-subsources-label { font-weight: bold; }
-#oils-acq-search-fields-submit-block { border: 2px solid #A1A1A1; }
-
-#oils-acq-pl_builder-table thead td { font-weight: bold; }
-/* #oils-acq-pl_builder-table tr { border-bottom: 1px solid #808080;} */
-.oils-acq-record_list-records-phys_desc-row { border-bottom: 1px solid #6BA160; }
-.oils-acq-record_list-picklist-td { border-style: solid; border-color: #A1A1A1; border-width: 0px 1px 0px 1px; }
-.oils-acq-record_list-records-service-td { font-size: 85%; }
-#oils-acq-pl_builder-picklist-submit { text-align: right; }
-
-
-#oils-acq-rdetail-marc-block { border-top: 1px solid #808080; }
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,22 @@
+
+#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; border-bottom: 1px solid #6BA160;}
+#oils-acq-search-fields-label { font-weight: bold; border-bottom: 1px solid #6BA160;}
+#oils-acq-search-subsources-label { font-weight: bold; }
+#oils-acq-search-fields-submit-block { border: 2px solid #A1A1A1; }
+
+#oils-acq-pl_builder-table thead td { font-weight: bold; }
+/* #oils-acq-pl_builder-table tr { border-bottom: 1px solid #808080;} */
+.oils-acq-record_list-records-phys_desc-row { border-bottom: 1px solid #6BA160; }
+.oils-acq-record_list-picklist-td { border-style: solid; border-color: #A1A1A1; border-width: 0px 1px 0px 1px; }
+.oils-acq-record_list-records-service-td { font-size: 85%; }
+#oils-acq-pl_builder-picklist-submit { text-align: right; }
+
+
+#oils-acq-rdetail-marc-block { border-top: 1px solid #808080; }
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/admin.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/admin.css (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/admin.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1 @@
+#oils-admin-object-table tr { border-bottom: 1px solid #6BA160; }
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,9 +1,9 @@
/* import the default css for the install applications */
- at import "acq_default.css";
+ at import "default/acq.css";
+ at import "default/admin.css";
body { font-size: 80%; }
-/* base default style */
#oils-base-body-block {}
#oils-base-navigate-block {border: 2px solid #85C777; background: #6BA160;}
#oils-base-navigate-block a { color: #000000; }
@@ -14,5 +14,7 @@
#oils-base-header-block {border-bottom: 1px solid #5E5E5E; }
+.oils-base-sub-navigate-block { border: 2px solid #6BA160; background: #85C777;}
+.oils-base-sub-navigate-block a { color: #000000; }
+.oils-base-sub-navigate-block span:hover { background: #6BA160; }
-
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,4 @@
+<%inherit file='../base.html'/>
+<%def name="block_sub_navigate()">
+ <%include file='navigate.html'/>
+</%def>
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,4 +1,4 @@
-<%inherit file='../base.html'/>
+<%inherit file='base.html'/>
<%def name="block_title()">${_('Evergreen Acquisitions Home')}</%def>
<%def name="block_content()">
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/navigate.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/navigate.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/navigate.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,3 @@
+<span><a href='index'>${_('Acquisitions Home')}</a></span>
+<span><a href='search'>${_('Bib Search')}</a></span>
+
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,4 +1,4 @@
-<%inherit file='../base.html'/>
+<%inherit file='base.html'/>
<%def name="block_title()">${_('Evergreen ACQ Picklist')}</%def>
<%def name="block_content()">
<table id='oils-acq-picklist-table'>
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,15 +1,14 @@
-<%inherit file='../base.html'/>
+<%inherit file='base.html'/>
<%def name="block_title()">${_('Evergreen Acquisitions Results')}</%def>
<%def name="block_content()">
<form action='create_picklist' method='GET'>
<input type='hidden' name='${c.oils.acq.search_cache_key_.cgi_name}' value='${c.oils.acq.search_cache_key}'/>
- <input type='hidden' name='${c.oils.core.authtoken_.cgi_name}' value='${c.oils.core.authtoken}'/>
<table id='oils-acq-pl_builder-table'>
<tbody>
% for res in c.oils_acq_records:
% for rec in res['records']:
<tr class='oils-acq-record_list-records-title-row'>
- <td rowspan='3'>
+ <td class='oils-acq-record_list-records-jacket-td' rowspan='3'>
<img class='oils-acq-record_list-records-jacket'
src='${c.oils.core.ac_prefix}/jacket/small/${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec,"isbns.isbn"))}'/>
</td>
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,4 +1,4 @@
-<%inherit file='../base.html'/>
+<%inherit file='base.html'/>
<%def name="block_title()">${_('Evergreen ACQ Details')}</%def>
<%def name="block_content()">
<table>
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,7 +1,7 @@
% for res in c.oils_acq_records:
% for rec in res['records']:
<tr class='oils-acq-record_list-records-title-row'>
- <td rowspan='3'>
+ <td class='oils-acq-record_list-records-jacket-td' rowspan='3'>
<img class='oils-acq-record_list-records-jacket'
src='${c.oils.core.ac_prefix}/jacket/small/${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec,"isbns.isbn"))}'/>
</td>
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,9 +1,8 @@
-<%inherit file='../base.html'/>
+<%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>
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/base.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/base.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/base.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,5 @@
+<%inherit file='../base.html'/>
+<%def name="block_sub_navigate()">
+ <%include file='navigate.html'/>
+</%def>
+
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/navigate.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/navigate.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/navigate.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,17 @@
+<span>
+ <a href='${c.oils.adm.prefix}/search/${c.oils.adm.object_class}'>${_('Search')}</a>
+</span>
+% if c.oils.adm.mode != 'create':
+ <span>
+ <a href='${c.oils.adm.prefix}/create/${c.oils.adm.object_class}'>${_('Create')}</a>
+ </span>
+ % if c.oils.adm.mode != 'update':
+ <span>
+ <a href='${c.oils.adm.prefix}/update/${c.oils.adm.object_class}/${c.oils.adm.object.id()}'>${_('Update')}</a>
+ </span>
+ % endif
+ <span>
+ <a href='${c.oils.adm.prefix}/delete/${c.oils.adm.object_class}/${c.oils.adm.object.id()}'>${_('Delete')}</a>
+ </span>
+% endif
+
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/object.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/object.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/admin/object.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,37 @@
+<%inherit file='base.html'/>
+
+<%def name="block_title()">${_('Evergreen Admin')}</%def>
+<%def name="block_content()">
+ <div id='oils-admin-object-lable'>${c.oils.adm.object_meta['rpt_label']}</div>
+ % if c.oils.adm.mode == 'delete':
+ <div>
+ <%
+ ## Why does doing this inline (inside ${...}) give me a syntax error????
+ string = _("Are you sure you want to delete %(cls)s with id %(id)d?") % {"cls":c.oils.adm.object_class, "id":c.oils.adm.object.id()}
+ %>
+ ${string}
+ </div>
+ % else:
+ <table id='oils-admin-object-table'>
+ % for fieldmeta in [ f for f in c.oils.adm.object_meta['fields'] if not f['virtual']]:
+ <tr>
+ <td>${fieldmeta['rpt_label']}</td>
+ <td>
+ % if c.oils.adm.mode == 'update':
+ <input type='text' size='36' value='${unicode(getattr(c.oils.adm.object, fieldmeta["name"])())}'/>
+ % else:
+ % if c.oils.adm.mode == 'create':
+ <input type='text'size='36' />
+ % else:
+ % if c.oils.adm.mode == 'view':
+ <span>${unicode(getattr(c.oils.adm.object, fieldmeta['name'])())}</span>
+ % endif
+ % endif
+ % endif
+ </td>
+ </tr>
+ % endfor
+ </table>
+ % endif
+</%def>
+
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -10,7 +10,7 @@
${self.block_navigate()}
</div>
<div id='oils-base-content-block'>
- ${self.block_content()}
+ ${self.block_global_content()}
</div>
<div id='oils-base-sidebar-block'>
${self.block_sidebar()}
@@ -26,6 +26,12 @@
<%include file='header.html'/>
</%def>
<%def name='block_sidebar()'/>
+<%def name='block_global_content()'>
+ <div class='oils-base-sub-navigate-block'>
+ ${self.block_sub_navigate()}
+ </div>
+ ${self.block_content()}
+</%def>
<%def name='block_content()'/>
<%def name='block_navigate()'>
<%include file='navigate.html'/>
@@ -33,3 +39,4 @@
<%def name='block_footer()'>
<%include file='footer.html'/>
</%def>
+<%def name='block_sub_navigate()'/>
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,9 @@
+<%inherit file='base.html'/>
+
+<%def name="block_title()">${_('Evergreen Dashboard')}</%def>
+<%def name="block_content()">
+ <div id='oils-dashboard-block'>
+ DASHBOARD
+ </div>
+</%def>
+
Modified: 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 2007-12-26 21:49:32 UTC (rev 8279)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html 2007-12-27 21:18:27 UTC (rev 8280)
@@ -1,7 +1,9 @@
<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()}'>${_('Bib Search')}</a></td></tr>
+ <tr><td><a href='${c.oils.core.prefix}/base/dashboard'>${_('Dashboard')}</a></td></tr>
+ <tr><td><a href='${c.oils.core.prefix}/acq/index'>${_('Acqisitions')}</a></td></tr>
+ <tr><td><a href='${c.oils.core.prefix}/ser/index'>${_('Serials')}</a></td></tr>
+ <tr><td><a href='${c.oils.core.prefix}/admin/index'>${_('Admin')}</a></td></tr>
</tbody>
</table>
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,7 @@
+from oilsweb.tests import *
+
+class TestAdminController(TestController):
+
+ def test_index(self):
+ response = self.app.get(url_for(controller='admin'))
+ # Test response...
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py 2007-12-27 21:18:27 UTC (rev 8280)
@@ -0,0 +1,7 @@
+from oilsweb.tests import *
+
+class TestBaseController(TestController):
+
+ def test_index(self):
+ response = self.app.get(url_for(controller='base'))
+ # Test response...
More information about the open-ils-commits
mailing list