From 558bb088bb2c71d8c2f5775879dcb248c4d126ef Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 17 Oct 2008 22:08:10 +0000 Subject: [PATCH] Given the 100% Dojo-ization of the ACQ interfaces, Pylons is no longer serving any purpose outside of basic HTML templating. As such, and in the interest of moving toward a common web infrastucture for new web-based UIs and reduced overall dependencies, ported all ACQ HTML pages to Template Toolkit (an existing EG requirement) and trimmed the Pylons bits. git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@10867 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/apache/eg_vhost.conf | 20 ++ Open-ILS/examples/oils_web.xml | 35 ++++ Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm | 150 +++++++++++++++ .../public/oils/media => }/css/skin/default.css | 21 +- .../oils/media => }/css/skin/default/acq.css | 0 .../oils/media => }/css/skin/default/admin.css | 0 .../public/oils/media => }/css/theme/default.css | 0 .../oils/media => }/css/theme/default/acq.css | 0 .../oils/media => }/css/theme/default/admin.css | 0 .../public/oils/media => }/images/eg_logo.jpg | Bin .../public/oils/media => }/images/eg_tiny_logo.jpg | Bin Open-ILS/web/js/ui/base.js | 34 ++++ .../ui/default/acq}/common/jubgrid.js | 2 - .../default/acq/financial/list_currency_types.js | 3 +- .../default/acq/financial/list_funding_sources.js | 3 +- .../ui}/default/acq/financial/list_funds.js | 3 +- .../ui}/default/acq/financial/list_providers.js | 3 +- .../ui}/default/acq/financial/view_fund.js | 3 +- .../default/acq/financial/view_funding_source.js | 3 +- .../ui}/default/acq/financial/view_provider.js | 3 +- .../ui}/default/acq/picklist/bib_search.js | 3 +- .../ui}/default/acq/picklist/view_list.js | 19 +- .../oils => js/ui}/default/acq/po/li_search.js | 3 +- .../ui_js/oils => js/ui}/default/acq/po/search.js | 3 +- .../ui_js/oils => js/ui}/default/acq/po/view_po.js | 3 +- .../ui}/default/acq/receiving/process.js | 3 +- .../oils => js/ui}/default/acq/settings/li_attr.js | 0 Open-ILS/web/oilsweb/MANIFEST.in | 2 - Open-ILS/web/oilsweb/development.ini.example | 104 ---------- Open-ILS/web/oilsweb/docs/index.txt | 12 -- Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO | 10 - Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt | 129 ------------- .../oilsweb/oilsweb.egg-info/dependency_links.txt | 1 - .../web/oilsweb/oilsweb.egg-info/entry_points.txt | 7 - .../oilsweb.egg-info/paste_deploy_config.ini_tmpl | 58 ------ .../oilsweb/oilsweb.egg-info/paster_plugins.txt | 3 - Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt | 1 - .../web/oilsweb/oilsweb.egg-info/top_level.txt | 1 - Open-ILS/web/oilsweb/oilsweb/__init__.py | 0 Open-ILS/web/oilsweb/oilsweb/config/__init__.py | 0 Open-ILS/web/oilsweb/oilsweb/config/environment.py | 33 ---- Open-ILS/web/oilsweb/oilsweb/config/middleware.py | 62 ------ Open-ILS/web/oilsweb/oilsweb/config/routing.py | 39 ---- .../web/oilsweb/oilsweb/controllers/__init__.py | 0 .../oilsweb/oilsweb/controllers/acq/__init__.py | 88 --------- .../web/oilsweb/oilsweb/controllers/acq/base.py | 6 - .../oilsweb/controllers/acq/currency_type.py | 8 - .../web/oilsweb/oilsweb/controllers/acq/fund.py | 22 --- .../oilsweb/controllers/acq/funding_source.py | 20 -- .../oilsweb/oilsweb/controllers/acq/picklist.py | 34 ---- Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py | 85 --------- .../oilsweb/oilsweb/controllers/acq/provider.py | 20 -- .../oilsweb/oilsweb/controllers/acq/receiving.py | 19 -- .../oilsweb/oilsweb/controllers/acq/settings.py | 12 -- Open-ILS/web/oilsweb/oilsweb/controllers/base.py | 22 --- Open-ILS/web/oilsweb/oilsweb/controllers/error.py | 39 ---- .../web/oilsweb/oilsweb/controllers/template.py | 27 --- .../web/oilsweb/oilsweb/controllers/translator.py | 24 --- Open-ILS/web/oilsweb/oilsweb/lib/__init__.py | 40 ---- Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py | 13 -- Open-ILS/web/oilsweb/oilsweb/lib/base.py | 27 --- Open-ILS/web/oilsweb/oilsweb/lib/bib.py | 18 -- Open-ILS/web/oilsweb/oilsweb/lib/context.py | 121 ------------ Open-ILS/web/oilsweb/oilsweb/lib/helpers.py | 6 - Open-ILS/web/oilsweb/oilsweb/lib/request.py | 45 ----- Open-ILS/web/oilsweb/oilsweb/lib/user.py | 96 ---------- Open-ILS/web/oilsweb/oilsweb/lib/util.py | 31 --- Open-ILS/web/oilsweb/oilsweb/model/__init__.py | 0 .../oilsweb/public/oils/media/ui_js/oils/base.js | 41 ---- .../public/oils/media/xsl/acq-bibdata-marc.xslt | 154 --------------- .../public/oils/media/xsl/oilsMARC21slim2HTML.xsl | 81 -------- .../web/oilsweb/oilsweb/templates/oils/base.html | 56 ------ .../oilsweb/templates/oils/default/acq/base.html | 2 - .../templates/oils/default/acq/financial/base.html | 4 - .../oilsweb/templates/oils/default/acq/index.html | 10 - .../templates/oils/default/acq/picklist/base.html | 13 -- .../oils/default/acq/picklist/bib_search.html | 105 ---------- .../templates/oils/default/acq/picklist/view.html | 65 ------- .../templates/oils/default/acq/po/base.html | 12 -- .../templates/oils/default/acq/po/marc_upload.html | 62 ------ .../templates/oils/default/acq/po/view_po.html | 46 ----- .../templates/oils/default/acq/receiving/base.html | 12 -- .../oilsweb/templates/oils/default/base.html | 70 ------- .../templates/oils/default/common/jubgrid.html | 212 --------------------- .../templates/oils/default/common/widgets.html | 93 --------- .../oilsweb/templates/oils/default/dashboard.html | 10 - .../oilsweb/templates/oils/default/footer.html | 3 - .../oilsweb/templates/oils/default/navigate.html | 25 --- Open-ILS/web/oilsweb/oilsweb/tests/__init__.py | 40 ---- .../oilsweb/oilsweb/tests/functional/__init__.py | 0 .../oilsweb/oilsweb/tests/functional/test_acq.py | 7 - .../oilsweb/oilsweb/tests/functional/test_admin.py | 7 - .../oilsweb/oilsweb/tests/functional/test_base.py | 7 - Open-ILS/web/oilsweb/oilsweb/tests/test_models.py | 0 Open-ILS/web/oilsweb/oilsweb/websetup.py | 14 -- Open-ILS/web/oilsweb/setup.cfg | 59 ------ Open-ILS/web/oilsweb/setup.py | 31 --- Open-ILS/web/templates/base.tt2 | 41 ++++ .../web/templates/default/acq/common/jubgrid.tt2 | 209 ++++++++++++++++++++ .../default/acq/financial/list_currency_types.tt2} | 27 ++- .../acq/financial/list_funding_sources.tt2} | 42 ++-- .../default/acq/financial/list_funds.tt2} | 47 +++-- .../default/acq/financial/list_providers.tt2} | 38 ++-- .../default/acq/financial/view_fund.tt2} | 92 +++++---- .../default/acq/financial/view_funding_source.tt2} | 79 ++++---- .../default/acq/financial/view_provider.tt2} | 68 +++---- .../templates/default/acq/picklist/bib_search.tt2 | 99 ++++++++++ .../default/acq/picklist/list.tt2} | 48 ++--- .../web/templates/default/acq/picklist/view.tt2 | 41 ++++ .../default/acq/po/li_search.tt2} | 49 +++-- .../default/acq/po/search.tt2} | 44 ++--- Open-ILS/web/templates/default/acq/po/view.tt2 | 40 ++++ .../default/acq/receiving/process.tt2} | 27 +-- .../default/acq/settings/li_attr.tt2} | 48 +++-- Open-ILS/web/templates/default/base.tt2 | 28 +++ Open-ILS/web/templates/default/footer.tt2 | 2 + .../header.html => templates/default/header.tt2} | 3 +- .../menu.html => templates/default/menu.tt2} | 53 ++---- 118 files changed, 1030 insertions(+), 2938 deletions(-) create mode 100644 Open-ILS/examples/oils_web.xml create mode 100644 Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/css/skin/default.css (89%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/css/skin/default/acq.css (100%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/css/skin/default/admin.css (100%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/css/theme/default.css (100%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/css/theme/default/acq.css (100%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/css/theme/default/admin.css (100%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/images/eg_logo.jpg (100%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media => }/images/eg_tiny_logo.jpg (100%) create mode 100644 Open-ILS/web/js/ui/base.js rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils/default => js/ui/default/acq}/common/jubgrid.js (99%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/list_currency_types.js (91%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/list_funding_sources.js (94%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/list_funds.js (96%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/list_providers.js (93%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/view_fund.js (97%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/view_funding_source.js (98%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/financial/view_provider.js (97%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/picklist/bib_search.js (98%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/picklist/view_list.js (85%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/po/li_search.js (98%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/po/search.js (97%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/po/view_po.js (97%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/receiving/process.js (96%) rename Open-ILS/web/{oilsweb/oilsweb/public/oils/media/ui_js/oils => js/ui}/default/acq/settings/li_attr.js (100%) delete mode 100644 Open-ILS/web/oilsweb/MANIFEST.in delete mode 100644 Open-ILS/web/oilsweb/development.ini.example delete mode 100644 Open-ILS/web/oilsweb/docs/index.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt delete mode 100644 Open-ILS/web/oilsweb/oilsweb/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/config/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/config/environment.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/config/middleware.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/config/routing.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/currency_type.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/funding_source.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/receiving.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/settings.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/base.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/error.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/template.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/translator.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/base.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/bib.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/context.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/helpers.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/request.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/user.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/lib/util.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/model/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/base.js delete mode 100644 Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt delete mode 100644 Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/oilsMARC21slim2HTML.xsl delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/bib_search.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/marc_upload.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/widgets.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html delete mode 100644 Open-ILS/web/oilsweb/oilsweb/tests/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/tests/functional/__init__.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/tests/test_models.py delete mode 100644 Open-ILS/web/oilsweb/oilsweb/websetup.py delete mode 100644 Open-ILS/web/oilsweb/setup.cfg delete mode 100644 Open-ILS/web/oilsweb/setup.py create mode 100644 Open-ILS/web/templates/base.tt2 create mode 100644 Open-ILS/web/templates/default/acq/common/jubgrid.tt2 rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html => templates/default/acq/financial/list_currency_types.tt2} (67%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html => templates/default/acq/financial/list_funding_sources.tt2} (67%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html => templates/default/acq/financial/list_funds.tt2} (68%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html => templates/default/acq/financial/list_providers.tt2} (63%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html => templates/default/acq/financial/view_fund.tt2} (53%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html => templates/default/acq/financial/view_funding_source.tt2} (65%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html => templates/default/acq/financial/view_provider.tt2} (64%) create mode 100644 Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html => templates/default/acq/picklist/list.tt2} (51%) create mode 100644 Open-ILS/web/templates/default/acq/picklist/view.tt2 rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/po/li_search.html => templates/default/acq/po/li_search.tt2} (71%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/po/search.html => templates/default/acq/po/search.tt2} (56%) create mode 100644 Open-ILS/web/templates/default/acq/po/view.tt2 rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html => templates/default/acq/receiving/process.tt2} (66%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/acq/settings/li_attr.html => templates/default/acq/settings/li_attr.tt2} (57%) create mode 100644 Open-ILS/web/templates/default/base.tt2 create mode 100644 Open-ILS/web/templates/default/footer.tt2 rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/header.html => templates/default/header.tt2} (92%) rename Open-ILS/web/{oilsweb/oilsweb/templates/oils/default/menu.html => templates/default/menu.tt2} (59%) diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index b2b2f390a4..e353a842dd 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -353,3 +353,23 @@ RewriteMap openurl prg:/openils/bin/openurl_map.pl RewriteCond %{QUERY_STRING} (^.*$) RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] + + +# General Evergreen web template processor + + SetHandler perl-script + PerlHandler OpenILS::WWW::EGWeb + Options +ExecCGI + PerlSendHeader On + allow from all + +# Note: the template processor will decline handling anything it does not +# have an explicit configuration for, which means it will fall back to +# Apache to serve the file. However, in the interest of speed, go ahead +# and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content. +# Add more exemptions as needed. + + SetHandler None + + + diff --git a/Open-ILS/examples/oils_web.xml b/Open-ILS/examples/oils_web.xml new file mode 100644 index 0000000000..babb51abb0 --- /dev/null +++ b/Open-ILS/examples/oils_web.xml @@ -0,0 +1,35 @@ + + + /eg + + + + + + + + /openils/var/web/templates + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm new file mode 100644 index 0000000000..14146b9b3b --- /dev/null +++ b/Open-ILS/src/perlmods/OpenILS/WWW/EGWeb.pm @@ -0,0 +1,150 @@ +package OpenILS::WWW::EGWeb; +use strict; use warnings; +use Template; +use XML::Simple; +use File::stat; +use Apache2::Const -compile => qw(OK DECLINED HTTP_INTERNAL_SERVER_ERROR); +use Apache2::Log; + +use constant OILS_HTTP_COOKIE_SKIN => 'oils:skin'; +use constant OILS_HTTP_COOKIE_THEME => 'oils:theme'; +use constant OILS_HTTP_COOKIE_LOCALE => 'oils:locale'; + +my $web_config; +my $web_config_file; +my $web_config_edit_time; + +sub import { + my $self = shift; + $web_config_file = shift; + unless(-r $web_config_file) { + warn "Invalid web config $web_config_file"; + return; + } + check_web_config(); +} + + +sub handler { + my $r = shift; + check_web_config($r); # option to disable this + my $ctx = load_context($r); + my $base = $ctx->{base_uri}; + my($template, $page_args) = find_template($r, $base); + return Apache2::Const::DECLINED unless $template; + + $template = $ctx->{skin} . "/$template"; + $ctx->{page_args} = $page_args; + $r->content_type('text/html; encoding=utf8'); + + my $tt = Template->new({ + OUTPUT => $r, + INCLUDE_PATH => $ctx->{template_paths}, + }); + + unless($tt->process($template, {ctx => $ctx})) { + $r->log->warn('Template error: ' . $tt->error); + return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; + } + + return Apache2::Const::OK; +} + +sub load_context { + my $r = shift; + my $cgi = CGI->new; + my $ctx = $web_config->{ctx}; + $ctx->{skin} = $cgi->cookie(OILS_HTTP_COOKIE_SKIN) || 'default'; + $ctx->{theme} = $cgi->cookie(OILS_HTTP_COOKIE_THEME) || 'default'; + $ctx->{locale} = + $r->headers_in->get('Accept-Language') || # this will need some trimming + $cgi->cookie(OILS_HTTP_COOKIE_LOCALE) || 'en-US'; + $r->log->debug('skin = ' . $ctx->{skin} . ' : theme = ' . + $ctx->{theme} . ' : locale = ' . $ctx->{locale}); + return $ctx; +} + +# Given a URI, finds the configured template and any extra page +# arguments (trailing path info). Any extra data is returned +# as page arguments, in the form of an array, one item per +# /-separated URI component +sub find_template { + my $r = shift; + my $base = shift; + my $path = $r->uri; + $path =~ s/$base//og; + my @parts = split('/', $path); + my $template = ''; + my $page_args = []; + my $handler = $web_config->{handlers}; + while(@parts) { + my $part = shift @parts; + next unless $part; + my $t = $handler->{$part}; + if(ref $t) { + $handler = $t; + } else { + $template = $t; + $page_args = [@parts]; + last; + } + } + + unless($template) { + $r->log->warn("No template configured for path $path"); + return (); + } + + $r->log->debug("template = $template : page args = @$page_args"); + return ($template, $page_args); +} + +# if the web configuration file has never been loaded or has +# changed since the last load, reload it +sub check_web_config { + my $r = shift; + my $epoch = stat($web_config_file)->mtime; + unless($web_config_edit_time and $web_config_edit_time == $epoch) { + $r->log->debug("Reloading web config after edit...") if $r; + $web_config_edit_time = $epoch; + $web_config = parse_config($web_config_file); + } +} + +sub parse_config { + my $cfg_file = shift; + my $data = XML::Simple->new->XMLin($cfg_file); + my $ctx = {}; + my $handlers = {}; + + $ctx->{media_prefix} = (ref $data->{media_prefix}) ? '' : $data->{media_prefix}; + $ctx->{base_uri} = (ref $data->{base_uri}) ? '' : $data->{base_uri}; + $ctx->{template_paths} = []; + + my $tpaths = $data->{template_paths}->{path}; + $tpaths = [$tpaths] unless ref $tpaths; + push(@{$ctx->{template_paths}}, $_) for @$tpaths; + + for my $handler (@{$data->{handlers}->{handler}}) { + my @parts = split('/', $handler->{path}); + my $h = $handlers; + my $pcount = scalar(@parts); + for(my $i = 0; $i < $pcount; $i++) { + my $p = $parts[$i]; + unless(defined $h->{$p}) { + if($i == $pcount - 1) { + $h->{$p} = $handler->{template}; + last; + } else { + $h->{$p} = {}; + } + } + $h = $h->{$p}; + } + } + + return {ctx => $ctx, handlers => $handlers}; +} + + +1; diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css b/Open-ILS/web/css/skin/default.css similarity index 89% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css rename to Open-ILS/web/css/skin/default.css index e6c3789860..cda9b27d08 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css +++ b/Open-ILS/web/css/skin/default.css @@ -2,20 +2,11 @@ @import "default/acq.css"; @import "default/admin.css"; /* import the dojo CSS */ -@import "../../js/dojo/dojox/grid/_grid/Grid.css"; -@import "../../js/dojo/dijit/themes/tundra/tundra.css"; -@import "../../js/dojo/dojo/resources/dojo.css"; +@import "/js/dojo/dojo/resources/dojo.css"; +@import "/js/dojo/dijit/themes/tundra/tundra.css"; +@import "/js/dojo/dojox/grid/_grid/Grid.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; } - html, body, #oils-base-body-block { width:100%; height:100%; @@ -23,10 +14,14 @@ html, body, #oils-base-body-block { margin:0; padding:0; } +table { border-collapse: collapse; } +/* use this for divs whose contents should be entirely contained within the div */ +.container:after {content: ""; display: block; height: 0; clear: both; } .invisible { visibility: hidden; } .hidden { display: none; visibility: hidden; } .display { display: block; visibility: visible; } +.oils-login-dialog td { padding: 5px; } /* main layout blocks */ #oils-base-main-block { width: 100%; margin-top: 0px; padding-top: 0px;} @@ -58,8 +53,10 @@ html, body, #oils-base-body-block { /* .dojoxGrid {border: 1px solid #333; height: 90%;} */ +/* .dojoxGrid {height: 90%;} .dojoxGrid-cell {padding: 8px;} +*/ .dijitTooltipTable td {padding: 3px;} /* custom class for handling dialog tables */ /* ----------------------------------------------------------------- */ diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css b/Open-ILS/web/css/skin/default/acq.css similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css rename to Open-ILS/web/css/skin/default/acq.css diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/admin.css b/Open-ILS/web/css/skin/default/admin.css similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/admin.css rename to Open-ILS/web/css/skin/default/admin.css diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css b/Open-ILS/web/css/theme/default.css similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css rename to Open-ILS/web/css/theme/default.css diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css b/Open-ILS/web/css/theme/default/acq.css similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css rename to Open-ILS/web/css/theme/default/acq.css diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/admin.css b/Open-ILS/web/css/theme/default/admin.css similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/admin.css rename to Open-ILS/web/css/theme/default/admin.css diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_logo.jpg b/Open-ILS/web/images/eg_logo.jpg similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_logo.jpg rename to Open-ILS/web/images/eg_logo.jpg diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_tiny_logo.jpg b/Open-ILS/web/images/eg_tiny_logo.jpg similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/images/eg_tiny_logo.jpg rename to Open-ILS/web/images/eg_tiny_logo.jpg diff --git a/Open-ILS/web/js/ui/base.js b/Open-ILS/web/js/ui/base.js new file mode 100644 index 0000000000..1c3c2491bf --- /dev/null +++ b/Open-ILS/web/js/ui/base.js @@ -0,0 +1,34 @@ +dojo.require('dijit.Dialog'); +dojo.require('fieldmapper.dojoData'); +dojo.require('openils.User'); +dojo.require('dojo.cookie'); +dojo.require('openils.CGI'); +dojo.require('openils.Event'); + +function oilsSetupUser() { + var authtoken = new openils.CGI().param('ses') || dojo.cookie('ses'); + var user; + if(authtoken) user = new openils.User({authtoken:authtoken}); + if(!authtoken || openils.Event.parse(user.user)) { + dojo.cookie('ses', openils.User.authtoken, {expires:-1, path:'/'}); + openils.User.authtoken = null; + dojo.addOnLoad(function(){oilsLoginDialog.show();}); + return; + } + dojo.cookie('ses', authtoken, {path : oilsCookieBase}); + openils.User.authtoken = authtoken; +} + +function oilsDoLogin() { + var user = new openils.User(); + user.login({ + username: dojo.byId('oils-login-username').value, + passwd: dojo.byId('oils-login-password').value, + type: 'staff' // hardcode for now + }); + dojo.cookie('ses', user.authtoken, {path : oilsCookieBase}); + return true; +} + +oilsSetupUser(); + diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js b/Open-ILS/web/js/ui/default/acq/common/jubgrid.js similarity index 99% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js rename to Open-ILS/web/js/ui/default/acq/common/jubgrid.js index f432314e9e..6a0c451aef 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js +++ b/Open-ILS/web/js/ui/default/acq/common/jubgrid.js @@ -18,8 +18,6 @@ dojo.require('openils.Event'); dojo.require("openils.widget.OrgUnitFilteringSelect"); dojo.require("fieldmapper.OrgUtils"); -var globalUser = new openils.User(); - /* put all the accessors, etc. into a local object for namespacing */ var JUBGrid = { jubGrid : null, diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js b/Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js similarity index 91% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js rename to Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js index 7048a29c77..f548788fce 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js +++ b/Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js @@ -3,6 +3,7 @@ dojo.require('dijit.form.Button'); dojo.require('dojox.grid.Grid'); dojo.require('openils.acq.CurrencyType'); dojo.require('openils.Event'); +dojo.require('openils.Util'); dojo.require('fieldmapper.dojoData'); var currencyTypes = []; @@ -21,4 +22,4 @@ function loadCTypesGrid() { } -dojo.addOnLoad(loadCTypesGrid); +openils.Util.addOnLoad(loadCTypesGrid); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funding_sources.js b/Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js similarity index 94% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funding_sources.js rename to Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js index 8653165328..d773f0b478 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funding_sources.js +++ b/Open-ILS/web/js/ui/default/acq/financial/list_funding_sources.js @@ -6,6 +6,7 @@ dojo.require('openils.widget.OrgUnitFilteringSelect'); dojo.require('dijit.form.Button'); dojo.require('dojox.grid.Grid'); dojo.require('openils.Event'); +dojo.require('openils.Util'); function getOrgInfo(rowIndex) { data = fundingSourceListGrid.model.getRow(rowIndex); @@ -31,4 +32,4 @@ function loadFSGrid() { ); } -dojo.addOnLoad(loadFSGrid); +openils.Util.addOnLoad(loadFSGrid); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funds.js b/Open-ILS/web/js/ui/default/acq/financial/list_funds.js similarity index 96% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funds.js rename to Open-ILS/web/js/ui/default/acq/financial/list_funds.js index 5b047ef141..43acbb5657 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funds.js +++ b/Open-ILS/web/js/ui/default/acq/financial/list_funds.js @@ -6,6 +6,7 @@ dojo.require('dojox.grid.Grid'); dojo.require('openils.widget.OrgUnitFilteringSelect'); dojo.require('openils.acq.CurrencyType'); dojo.require('openils.Event'); +dojo.require('openils.Util'); dojo.require('openils.acq.Fund'); function getOrgInfo(rowIndex) { @@ -58,5 +59,5 @@ function filterGrid() { fundListGrid.update(); } -dojo.addOnLoad(loadFundGrid); +openils.Util.addOnLoad(loadFundGrid); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js b/Open-ILS/web/js/ui/default/acq/financial/list_providers.js similarity index 93% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js rename to Open-ILS/web/js/ui/default/acq/financial/list_providers.js index 68d7ddbf1a..cf41b397c8 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js +++ b/Open-ILS/web/js/ui/default/acq/financial/list_providers.js @@ -5,6 +5,7 @@ dojo.require('dojox.grid.Grid'); dojo.require('openils.acq.CurrencyType'); dojo.require('openils.Event'); +dojo.require('openils.Util'); dojo.require('openils.acq.Provider'); dojo.require("fieldmapper.OrgUtils"); dojo.require('openils.widget.OrgUnitFilteringSelect'); @@ -31,4 +32,4 @@ function createProvider(fields) { } -dojo.addOnLoad(loadProviderGrid); +openils.Util.addOnLoad(loadProviderGrid); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js b/Open-ILS/web/js/ui/default/acq/financial/view_fund.js similarity index 97% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js rename to Open-ILS/web/js/ui/default/acq/financial/view_fund.js index ad7f52b752..1f73b44154 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js +++ b/Open-ILS/web/js/ui/default/acq/financial/view_fund.js @@ -9,6 +9,7 @@ dojo.require('openils.acq.Fund'); dojo.require('openils.acq.FundingSource'); dojo.require('openils.Event'); dojo.require('openils.User'); +dojo.require('openils.Util'); var fund = null; @@ -82,4 +83,4 @@ function fetchFund() { ); } -dojo.addOnLoad(fetchFund); +openils.Util.addOnLoad(fetchFund); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js b/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js similarity index 98% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js rename to Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js index 78a144677d..8f6a31e43e 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js +++ b/Open-ILS/web/js/ui/default/acq/financial/view_funding_source.js @@ -10,6 +10,7 @@ dojo.require("fieldmapper.OrgUtils"); dojo.require('openils.acq.FundingSource'); dojo.require('openils.acq.Fund'); dojo.require('openils.Event'); +dojo.require('openils.Util'); var ses = new OpenSRF.ClientSession('open-ils.acq'); var fundingSource = null; @@ -96,4 +97,4 @@ function loadAllocationGrid() { fsAllocationGrid.isLoaded = true; } -dojo.addOnLoad(loadFS); +openils.Util.addOnLoad(loadFS); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js b/Open-ILS/web/js/ui/default/acq/financial/view_provider.js similarity index 97% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js rename to Open-ILS/web/js/ui/default/acq/financial/view_provider.js index df1a17b3cf..181aff8333 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js +++ b/Open-ILS/web/js/ui/default/acq/financial/view_provider.js @@ -7,6 +7,7 @@ dojo.require("fieldmapper.OrgUtils"); dojo.require('openils.acq.Provider'); dojo.require('openils.Event'); dojo.require('openils.User'); +dojo.require('openils.Util'); var provider = null; var marcRegex = /^\/\/\*\[@tag="(\d+)"]\/\*\[@code="(\w)"]$/; @@ -93,6 +94,6 @@ function deleteORDataFields() { } -dojo.addOnLoad(fetchProvider); +openils.Util.addOnLoad(fetchProvider); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/bib_search.js b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js similarity index 98% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/bib_search.js rename to Open-ILS/web/js/ui/default/acq/picklist/bib_search.js index ff9453b30a..51e6bcc40e 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/bib_search.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js @@ -8,6 +8,7 @@ dojo.require('openils.Event'); dojo.require('openils.acq.Picklist'); dojo.require('openils.acq.Lineitem'); dojo.require('openils.User'); +dojo.require('openils.Util'); var searchFields = []; var resultPicklist; @@ -201,4 +202,4 @@ function updateLiList(pl, list, idx, oncomplete) { ); } -dojo.addOnLoad(drawForm); +openils.Util.addOnLoad(drawForm); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/view_list.js b/Open-ILS/web/js/ui/default/acq/picklist/view_list.js similarity index 85% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/view_list.js rename to Open-ILS/web/js/ui/default/acq/picklist/view_list.js index 9db1a032cb..ca257410e8 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/view_list.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/view_list.js @@ -4,6 +4,7 @@ dojo.require('dijit.form.Button'); dojo.require('dijit.form.TextBox'); dojo.require('dijit.form.Button'); dojo.require('openils.acq.Picklist'); +dojo.require('openils.Util'); var plList = []; var listAll = false; @@ -18,12 +19,7 @@ function makeGridFromList() { function loadGrid() { - - function handleResponse(r) { - plList.push(r.recv().content()); - } - - var method = 'open-ils.acq.picklist.user.retrieve'; + var method = 'open-ils.acq.picklist.user.retrieve.atomic'; if(listAll) method = method.replace(/user/, 'user.all'); @@ -32,8 +28,13 @@ function loadGrid() { { async: true, params: [openils.User.authtoken, {flesh_lineitem_count:1, flesh_username:1}], - onresponse: handleResponse, - oncomplete: makeGridFromList + oncomplete: function(r) { + var resp = r.recv().content(); + if(e = openils.Event.parse(resp)) + return alert(e); + plList = resp; + makeGridFromList(); + } } ); } @@ -75,6 +76,6 @@ function deleteFromGrid() { openils.acq.Picklist.deleteList(list, function() { makeGridFromList(); }); } -dojo.addOnLoad(loadGrid); +openils.Util.addOnLoad(loadGrid); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/li_search.js b/Open-ILS/web/js/ui/default/acq/po/li_search.js similarity index 98% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/li_search.js rename to Open-ILS/web/js/ui/default/acq/po/li_search.js index e1de9f7c14..d099ed0f2b 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/li_search.js +++ b/Open-ILS/web/js/ui/default/acq/po/li_search.js @@ -7,6 +7,7 @@ dojo.require('dijit.form.FilteringSelect'); dojo.require('dijit.form.Button'); dojo.require("dijit.Dialog"); dojo.require('openils.Event'); +dojo.require('openils.Util'); dojo.require('openils.acq.Lineitem'); dojo.require('openils.acq.Provider'); dojo.require('openils.acq.PO'); @@ -184,5 +185,5 @@ function createAssets(poId) { } -dojo.addOnLoad(drawForm); +openils.Util.addOnLoad(drawForm); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js b/Open-ILS/web/js/ui/default/acq/po/search.js similarity index 97% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js rename to Open-ILS/web/js/ui/default/acq/po/search.js index 7f8eb1febf..acec485177 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js +++ b/Open-ILS/web/js/ui/default/acq/po/search.js @@ -8,6 +8,7 @@ dojo.require('fieldmapper.OrgUtils'); dojo.require('dojo.date.locale'); dojo.require('dojo.date.stamp'); dojo.require('openils.User'); +dojo.require('openils.Util'); dojo.require('openils.widget.OrgUnitFilteringSelect'); function getOrgInfo(rowIndex) { @@ -77,4 +78,4 @@ function loadForm() { new openils.User().buildPermOrgSelector('VIEW_PURCHASE_ORDER', poSearchOrderingAgencySelect); } -dojo.addOnLoad(loadForm); +openils.Util.addOnLoad(loadForm); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js b/Open-ILS/web/js/ui/default/acq/po/view_po.js similarity index 97% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js rename to Open-ILS/web/js/ui/default/acq/po/view_po.js index 0a8e3621c4..542a13202b 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js +++ b/Open-ILS/web/js/ui/default/acq/po/view_po.js @@ -6,6 +6,7 @@ dojo.require('dojox.grid.Grid'); dojo.require('openils.acq.PO'); dojo.require('openils.Event'); dojo.require('openils.User'); +dojo.require('openils.Util'); dojo.require('fieldmapper.OrgUtils'); dojo.require('openils.acq.Provider'); dojo.require('openils.acq.Lineitem'); @@ -78,4 +79,4 @@ function fetchPO() { ); } -dojo.addOnLoad(loadPage); +openils.Util.addOnLoad(loadPage); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js b/Open-ILS/web/js/ui/default/acq/receiving/process.js similarity index 96% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js rename to Open-ILS/web/js/ui/default/acq/receiving/process.js index 7d7aa320d1..8c7a8b8a43 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/receiving/process.js +++ b/Open-ILS/web/js/ui/default/acq/receiving/process.js @@ -7,6 +7,7 @@ dojo.require('dijit.form.FilteringSelect'); dojo.require('dijit.form.Button'); dojo.require("dijit.Dialog"); dojo.require('openils.Event'); +dojo.require('openils.Util'); dojo.require('openils.acq.Lineitem'); dojo.require('openils.widget.OrgUnitFilteringSelect'); @@ -57,5 +58,5 @@ function viewList() { JUBGrid.populate(liGrid, model, lineitems); } -dojo.addOnLoad(drawForm); +openils.Util.addOnLoad(drawForm); diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/settings/li_attr.js b/Open-ILS/web/js/ui/default/acq/settings/li_attr.js similarity index 100% rename from Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/settings/li_attr.js rename to Open-ILS/web/js/ui/default/acq/settings/li_attr.js diff --git a/Open-ILS/web/oilsweb/MANIFEST.in b/Open-ILS/web/oilsweb/MANIFEST.in deleted file mode 100644 index 98a73b81f5..0000000000 --- a/Open-ILS/web/oilsweb/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include oilsweb/public * -recursive-include oilsweb/templates * diff --git a/Open-ILS/web/oilsweb/development.ini.example b/Open-ILS/web/oilsweb/development.ini.example deleted file mode 100644 index 671e8646f3..0000000000 --- a/Open-ILS/web/oilsweb/development.ini.example +++ /dev/null @@ -1,104 +0,0 @@ - -# 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@yourdomain.com -smtp_server = localhost -error_email_from = paste@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 -# 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 -beaker.session.type = ext:memcached -beaker.session.url = 127.0.0.1:11211 - -# 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 - -# ---------------------------------------------------------------- -# OpenSRF / OpenILS / Custom configs -# ---------------------------------------------------------------- -osrf_config = /openils/conf/opensrf_core.xml -osrf_config_ctxt = config.opensrf -oils_prefix = /oils - -# media_prefix can be a path or full URL -oils_media_prefix = /oils/media - -# added_content_prefix can be a path or full URL -oils_added_content_prefix = http://dev.gapines.org/opac/extras/ac - -# URL relative to the app root where XSL files are found -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 - -# if uncommented, they system will login automatically using -# these credentials. Note that this user will either need to -# be an superuser or have appropriate ACQ perms -#oils_demo_user = demo-admin -#oils_demo_password = demo123 -#oils_demo_workstation = BR1-demo - - -# when using the opensrf translator proxy, define the -# translator host and path here -#osrf_http_translator_host = localhost:80 -#osrf_http_translator_path = /osrf-http-translator - - - -# 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 diff --git a/Open-ILS/web/oilsweb/docs/index.txt b/Open-ILS/web/oilsweb/docs/index.txt deleted file mode 100644 index 00a69cc5d8..0000000000 --- a/Open-ILS/web/oilsweb/docs/index.txt +++ /dev/null @@ -1,12 +0,0 @@ -oilsweb -+++++++ - -This is the main index page of your documentation. It should be written in -`reStructuredText format `_. - -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``. diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO b/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO deleted file mode 100644 index 00bd980615..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/PKG-INFO +++ /dev/null @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: oilsweb -Version: 0.0.0dev-r9917 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt b/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt deleted file mode 100644 index 0411f188dd..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/SOURCES.txt +++ /dev/null @@ -1,129 +0,0 @@ -MANIFEST.in -development.ini -setup.cfg -setup.py -docs/index.txt -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/paster_plugins.txt -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/acq_admin.py -oilsweb/controllers/admin.py -oilsweb/controllers/base.py -oilsweb/controllers/error.py -oilsweb/controllers/template.py -oilsweb/controllers/translator.py -oilsweb/controllers/acq/__init__.py -oilsweb/controllers/acq/base.py -oilsweb/controllers/acq/currency_type.py -oilsweb/controllers/acq/fund.py -oilsweb/controllers/acq/funding_source.py -oilsweb/controllers/acq/picklist.py -oilsweb/controllers/acq/po.py -oilsweb/controllers/acq/provider.py -oilsweb/lib/__init__.py -oilsweb/lib/app_globals.py -oilsweb/lib/base.py -oilsweb/lib/bib.py -oilsweb/lib/context.py -oilsweb/lib/helpers.py -oilsweb/lib/request.py -oilsweb/lib/user.py -oilsweb/lib/util.py -oilsweb/lib/acq/__init__.py -oilsweb/lib/acq/fund.py -oilsweb/lib/acq/picklist.py -oilsweb/lib/acq/po_manager.py -oilsweb/lib/acq/provider_mgr.py -oilsweb/middleware/__init__.py -oilsweb/middleware/hilite.py -oilsweb/middleware/xmllint.py -oilsweb/model/__init__.py -oilsweb/public/test.html -oilsweb/public/oils/media/css/skin/default.css -oilsweb/public/oils/media/css/skin/default/acq.css -oilsweb/public/oils/media/css/skin/default/admin.css -oilsweb/public/oils/media/css/theme/default.css -oilsweb/public/oils/media/css/theme/default/acq.css -oilsweb/public/oils/media/css/theme/default/admin.css -oilsweb/public/oils/media/images/eg_logo.jpg -oilsweb/public/oils/media/images/eg_tiny_logo.jpg -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funding_sources.js -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_funds.js -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_fund.js -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_funding_source.js -oilsweb/public/oils/media/ui_js/oils/default/acq/financial/view_provider.js -oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/bib_search.js -oilsweb/public/oils/media/ui_js/oils/default/acq/picklist/view_list.js -oilsweb/public/oils/media/ui_js/oils/default/acq/po/li_search.js -oilsweb/public/oils/media/ui_js/oils/default/acq/po/search.js -oilsweb/public/oils/media/ui_js/oils/default/acq/po/view_po.js -oilsweb/public/oils/media/ui_js/oils/default/common/jubgrid.js -oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt -oilsweb/public/oils/media/xsl/oilsMARC21slim2HTML.xsl -oilsweb/templates/oils/base.html -oilsweb/templates/oils/default/base.html -oilsweb/templates/oils/default/dashboard.html -oilsweb/templates/oils/default/footer.html -oilsweb/templates/oils/default/header.html -oilsweb/templates/oils/default/menu.html -oilsweb/templates/oils/default/navigate.html -oilsweb/templates/oils/default/acq/admin.html -oilsweb/templates/oils/default/acq/base.html -oilsweb/templates/oils/default/acq/index.html -oilsweb/templates/oils/default/acq/financial/base.html -oilsweb/templates/oils/default/acq/financial/create_fund.html -oilsweb/templates/oils/default/acq/financial/create_fund_allocation.html -oilsweb/templates/oils/default/acq/financial/create_funding_source.html -oilsweb/templates/oils/default/acq/financial/create_funding_source_credit.html -oilsweb/templates/oils/default/acq/financial/create_provider.html -oilsweb/templates/oils/default/acq/financial/list_currency_types.html -oilsweb/templates/oils/default/acq/financial/list_funding_sources.html -oilsweb/templates/oils/default/acq/financial/list_funds.html -oilsweb/templates/oils/default/acq/financial/list_providers.html -oilsweb/templates/oils/default/acq/financial/view_fund.html -oilsweb/templates/oils/default/acq/financial/view_funding_source.html -oilsweb/templates/oils/default/acq/financial/view_provider.html -oilsweb/templates/oils/default/acq/picklist/base.html -oilsweb/templates/oils/default/acq/picklist/bib_search.html -oilsweb/templates/oils/default/acq/picklist/lineitem_summary.html -oilsweb/templates/oils/default/acq/picklist/picklist_summary.html -oilsweb/templates/oils/default/acq/picklist/view.html -oilsweb/templates/oils/default/acq/picklist/view_lineitem.html -oilsweb/templates/oils/default/acq/picklist/view_list.html -oilsweb/templates/oils/default/acq/po/.view_po.html.swp -oilsweb/templates/oils/default/acq/po/base.html -oilsweb/templates/oils/default/acq/po/create.html -oilsweb/templates/oils/default/acq/po/li_search.html -oilsweb/templates/oils/default/acq/po/marc_upload.html -oilsweb/templates/oils/default/acq/po/po_li_summary.html -oilsweb/templates/oils/default/acq/po/po_summary.html -oilsweb/templates/oils/default/acq/po/search.html -oilsweb/templates/oils/default/acq/po/view_lineitem.html -oilsweb/templates/oils/default/acq/po/view_po.html -oilsweb/templates/oils/default/acq/po/view_po_list.html -oilsweb/templates/oils/default/admin/base.html -oilsweb/templates/oils/default/admin/index.html -oilsweb/templates/oils/default/admin/object.html -oilsweb/templates/oils/default/admin/widgets.html -oilsweb/templates/oils/default/common/jubgrid.html -oilsweb/templates/oils/default/common/widgets.html -oilsweb/tests/__init__.py -oilsweb/tests/test_models.py -oilsweb/tests/functional/__init__.py -oilsweb/tests/functional/test_acq.py -oilsweb/tests/functional/test_admin.py -oilsweb/tests/functional/test_base.py \ No newline at end of file diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt b/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt b/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt deleted file mode 100644 index dd90926b48..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/entry_points.txt +++ /dev/null @@ -1,7 +0,0 @@ - - [paste.app_factory] - main = oilsweb.config.middleware:make_app - - [paste.app_install] - main = pylons.util:PylonsInstaller - \ No newline at end of file diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl b/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl deleted file mode 100644 index 8db796cd3f..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/paste_deploy_config.ini_tmpl +++ /dev/null @@ -1,58 +0,0 @@ -# -# oilsweb - Pylons configuration -# -# The %(here)s variable will be replaced with the parent directory of this file -# -[DEFAULT] -debug = true -email_to = you@yourdomain.com -smtp_server = localhost -error_email_from = paste@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 diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt b/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt deleted file mode 100644 index b3ee8d7458..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/paster_plugins.txt +++ /dev/null @@ -1,3 +0,0 @@ -Pylons -WebHelpers -PasteScript diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt b/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt deleted file mode 100644 index a7c9299b90..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -Pylons>=0.9.6.1 \ No newline at end of file diff --git a/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt b/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt deleted file mode 100644 index 94a1c0c50a..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -oilsweb diff --git a/Open-ILS/web/oilsweb/oilsweb/__init__.py b/Open-ILS/web/oilsweb/oilsweb/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/web/oilsweb/oilsweb/config/__init__.py b/Open-ILS/web/oilsweb/oilsweb/config/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/web/oilsweb/oilsweb/config/environment.py b/Open-ILS/web/oilsweb/oilsweb/config/environment.py deleted file mode 100644 index 9bef51a700..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/config/environment.py +++ /dev/null @@ -1,33 +0,0 @@ -"""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=[app_conf.get('local_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) diff --git a/Open-ILS/web/oilsweb/oilsweb/config/middleware.py b/Open-ILS/web/oilsweb/oilsweb/config/middleware.py deleted file mode 100644 index e413da1919..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/config/middleware.py +++ /dev/null @@ -1,62 +0,0 @@ -"""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:] section of the Paste ini file (where - 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]) - -# import oilsweb.middleware.xmllint -# app = oilsweb.middleware.xmllint.XMLLintMiddleware(app) - - return app - diff --git a/Open-ILS/web/oilsweb/oilsweb/config/routing.py b/Open-ILS/web/oilsweb/oilsweb/config/routing.py deleted file mode 100644 index 516b6949a9..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/config/routing.py +++ /dev/null @@ -1,39 +0,0 @@ -"""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 - - prefix = '' - if not config.get('use_mod_python'): - prefix = 'oils/' - - map.connect(prefix+':controller/:action') - map.connect(prefix+':controller/:action/:id') - map.connect(prefix+'admin/:action/:type/:id', controller='admin') - map.connect(prefix+'admin/:action/:type', controller='admin') - - map.connect('osrf-http-translator', controller='translator', action='proxy') - - ''' 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 diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/__init__.py b/Open-ILS/web/oilsweb/oilsweb/controllers/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py deleted file mode 100644 index 3f629bed41..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py +++ /dev/null @@ -1,88 +0,0 @@ -from oilsweb.lib.context import Context, SubContext, ContextItem - -# ---------------------------------------------------------------- -# Define the CGI params for this application -# ---------------------------------------------------------------- - -class AcqContext(SubContext): - def __init__(self): - - # ------------------------------------------------------------- - # URL params - 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) - self.offset = ContextItem(cgi_name='acq.os', default_value=0) - self.limit = ContextItem(cgi_name='acq.li', default_value=10) - - # ------------------------------------------------------------- - # shared objects and data - self.prefix = ContextItem() - self.z39_sources = ContextItem() - self.search_classes = ContextItem() - self.search_classes_sorted = ContextItem() - - self.picklist = ContextItem() # picklist object - self.picklist_list = ContextItem() # list of picklist objects - self.picklist_id_list = ContextItem(cgi_name='acq.plil', multi=True) # list of picklist IDs - self.picklist_name = ContextItem(cgi_name='acq.pln') - self.picklist_action = ContextItem(cgi_name='acq.pla') - self.picklist_source_id = ContextItem(cgi_name='acq.plsi') - self.picklist_dest_id = ContextItem(cgi_name='acq.pldi') - - self.lineitem = ContextItem() # lineitem object - self.lineitem_id = ContextItem(cgi_name='acq.liid') - self.lineitem_item_count = ContextItem(cgi_name='acq.pllic') - self.lineitem_id_list = ContextItem(cgi_name='acq.pleil', multi=True) - self.lineitem_detail_id = ContextItem(cgi_name='acq.lidid') - - self.currency_types = ContextItem() - - self.fund = ContextItem() - self.fund_id = ContextItem(cgi_name='acq.fi') - self.fund_list = ContextItem(cgi_name='acq.fl') - self.fund_name = ContextItem(cgi_name='acq.fn') - self.fund_year = ContextItem(cgi_name='acq.fc') - self.fund_org = ContextItem(cgi_name='acq.fo') - self.fund_currency_type = ContextItem(cgi_name='acq.fc') - self.fund_summary = ContextItem() - - self.funding_source = ContextItem() - self.funding_source_id = ContextItem(cgi_name='acq.fsi') - self.funding_source_list = ContextItem() - self.funding_source_name = ContextItem(cgi_name='acq.fsn') - self.funding_source_currency_type = ContextItem(cgi_name='acq.fsc') - self.funding_source_owner = ContextItem(cgi_name='acq.fso') - self.funding_source_credit_amount = ContextItem(cgi_name='acq.fsca') - self.funding_source_credit_note = ContextItem(cgi_name='acq.fscn') - - self.fund_allocation = ContextItem() - self.fund_allocation_list = ContextItem() - self.fund_allocation_source= ContextItem(cgi_name='acq.fas') - self.fund_allocation_fund = ContextItem(cgi_name='acq.faf') - self.fund_allocation_amount = ContextItem(cgi_name='acq.faa') - self.fund_allocation_percent = ContextItem(cgi_name='acq.fap') - self.fund_allocation_note = ContextItem(cgi_name='acq.fan') - - self.provider = ContextItem() - self.provider_id = ContextItem(cgi_name='acq.proid') - self.provider_list = ContextItem() - self.provider_name = ContextItem(cgi_name='acq.pn') - self.provider_currency_type = ContextItem(cgi_name='acq.pct') - self.provider_owner = ContextItem(cgi_name='acq.po') - - self.po = ContextItem() - self.po_list = ContextItem() - self.po_id = ContextItem(cgi_name='acq.poid') - self.po_li_id_list = ContextItem(cgi_name='acq.poliil', multi=True) - self.po_li = ContextItem() - self.po_li_sum = ContextItem() - - self.lineitem_marc_html = ContextItem() - - def postinit(self): - self.prefix.value = "%s/acq" % Context.get_context().core.prefix.value - -Context.apply_sub_context('acq', AcqContext) - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py deleted file mode 100644 index 1bdde68cb2..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py +++ /dev/null @@ -1,6 +0,0 @@ -from oilsweb.lib.base import * -from oilsweb.lib.request import RequestMgr - -class BaseController(BaseController): - def index(self): - return RequestMgr().render('acq/index.html') diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/currency_type.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/currency_type.py deleted file mode 100644 index 08b73c1d90..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/currency_type.py +++ /dev/null @@ -1,8 +0,0 @@ -from oilsweb.lib.base import * -from oilsweb.lib.request import RequestMgr - -class CurrencyTypeController(BaseController): - def list(self, **kwargs): - r = RequestMgr() - return r.render('acq/financial/list_currency_types.html') - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py deleted file mode 100644 index c88ecbada6..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/fund.py +++ /dev/null @@ -1,22 +0,0 @@ -from oilsweb.lib.base import * -import pylons -from oilsweb.lib.request import RequestMgr -import oilsweb.lib.user -import osrf.net_obj -import oils.const -from osrf.ses import ClientSession -from oils.event import Event -from oils.org import OrgUtil - - -class FundController(BaseController): - - def view(self, **kwargs): - r = RequestMgr() - r.ctx.acq.fund_id = kwargs['id'] - return r.render('acq/financial/view_fund.html') - - def list(self): - return RequestMgr().render('acq/financial/list_funds.html') - - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/funding_source.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/funding_source.py deleted file mode 100644 index 38342a3778..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/funding_source.py +++ /dev/null @@ -1,20 +0,0 @@ -from oilsweb.lib.base import * -import pylons -from oilsweb.lib.request import RequestMgr -import osrf.net_obj -import oils.const -from osrf.ses import ClientSession -from oils.event import Event -from oils.org import OrgUtil - -class FundingSourceController(BaseController): - - def view(self, **kwargs): - r = RequestMgr() - r.ctx.acq.funding_source_id = kwargs['id'] - return r.render('acq/financial/view_funding_source.html') - - def list(self): - return RequestMgr().render('acq/financial/list_funding_sources.html') - - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py deleted file mode 100644 index 5133e59423..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py +++ /dev/null @@ -1,34 +0,0 @@ -from oilsweb.lib.base import * -import logging, pylons -import oilsweb.lib.context, oilsweb.lib.util -import oilsweb.lib.bib -import oils.const, oils.utils.utils -import osrf.net_obj - -import simplejson - -from osrf.ses import ClientSession -from oils.event import Event -from oils.org import OrgUtil -from oilsweb.lib.request import RequestMgr - -class PicklistController(BaseController): - - def view(self, **kwargs): - r = RequestMgr() - r.ctx.acq.picklist.value = kwargs['id'] - return r.render('acq/picklist/view.html') - - def list(self): - r = RequestMgr() - return r.render('acq/picklist/view_list.html') - - def listall(self): - r = RequestMgr() - return r.render('acq/picklist/view_list.html') - - def bib_search(self): - r = RequestMgr() - return r.render('acq/picklist/bib_search.html') - - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py deleted file mode 100644 index 0ab41a60e6..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py +++ /dev/null @@ -1,85 +0,0 @@ -from oilsweb.lib.base import * -from oilsweb.lib.request import RequestMgr -import oilsweb.lib.user -import osrf.net_obj -import oils.const -from osrf.ses import ClientSession -from oils.event import Event -from oils.org import OrgUtil -import mx.DateTime.ISO - -class PoController(BaseController): - - # Render display of individual PO: list of line items - def view(self, **kwargs): - r = RequestMgr() - r.ctx.acq.po_id.value = kwargs['id'] - return r.render('acq/po/view_po.html') - - def li_search(self): - r = RequestMgr() - return r.render('acq/po/li_search.html') - - def search(self): - r = RequestMgr() - return r.render('acq/po/search.html') - - def marc_upload(self): - ''' - Requires pymarc-1.5, elementree - $ easy_install elementtree - $ easy_install http://pypi.python.org/packages/source/p/pymarc/pymarc-1.5.tar.gz - - Takes a MARC file, converts it to marcxml, and creates a new PO - and lineitems from the data. - ''' - - import pymarc - import pymarc.reader - import pymarc.marcxml - import pylons - import oils.system - - r = RequestMgr() - - oils.system.System.remote_connect( - config_file = pylons.config['osrf_config'], - config_context = pylons.config['osrf_config_ctxt']) - - if 'marc_file' in r.request.params: - - provider_id = r.request.params['provider'] - authtoken = r.request.params['authtoken'] - - # first, create the PO - po = osrf.net_obj.NetworkObject.acqpo() - po.provider(provider_id) - po.state('in-process') - po_id = ClientSession.atomic_request( - 'open-ils.acq', - 'open-ils.acq.purchase_order.create', authtoken, po) - oils.event.Event.parse_and_raise(po_id) - - provider = ClientSession.atomic_request( - 'open-ils.acq', - 'open-ils.acq.provider.retrieve', authtoken, provider_id) - oils.event.Event.parse_and_raise(provider) - - # now, parse the MARC and create a lineitem per record - marc_reader = pymarc.reader.MARCReader(r.request.params['marc_file'].file) - for record in marc_reader: - - lineitem = osrf.net_obj.NetworkObject.jub() - lineitem.marc(pymarc.marcxml.record_to_xml(record)) - lineitem.provider(provider_id) - lineitem.purchase_order(po_id) - lineitem.source_label(provider.code()) # XXX where should this really come from? - lineitem.state('in-process') - - stat = ClientSession.atomic_request( - 'open-ils.acq', - 'open-ils.acq.lineitem.create', authtoken, lineitem) - oils.event.Event.parse_and_raise(stat) - return redirect_to(controller='acq/po', action='view', id=po_id) - - return r.render('acq/po/marc_upload.html') diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py deleted file mode 100644 index 8e8cf4b44e..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/provider.py +++ /dev/null @@ -1,20 +0,0 @@ -from oilsweb.lib.base import * -from oilsweb.lib.request import RequestMgr -from osrf.ses import ClientSession -from osrf.net_obj import NetworkObject -from oils.event import Event -from oils.org import OrgUtil -from oilsweb.lib.user import User -import oils.const - -class ProviderController(BaseController): - - def view(self, **kwargs): - r = RequestMgr() - r.ctx.acq.provider_id = kwargs['id'] - return r.render('acq/financial/view_provider.html') - - def list(self): - return RequestMgr().render('acq/financial/list_providers.html') - - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/receiving.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/receiving.py deleted file mode 100644 index 3c48da8617..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/receiving.py +++ /dev/null @@ -1,19 +0,0 @@ -from oilsweb.lib.base import * -import logging, pylons -import oilsweb.lib.context, oilsweb.lib.util -import oilsweb.lib.bib -import oils.const, oils.utils.utils -import osrf.net_obj - -import simplejson - -from osrf.ses import ClientSession -from oils.event import Event -from oils.org import OrgUtil -from oilsweb.lib.request import RequestMgr - -class ReceivingController(BaseController): - - def process(self, **kwargs): - r = RequestMgr() - return r.render('acq/receiving/process.html') diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/settings.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/settings.py deleted file mode 100644 index be0d704011..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/settings.py +++ /dev/null @@ -1,12 +0,0 @@ -from oilsweb.lib.base import * -from oilsweb.lib.request import RequestMgr -import oilsweb.lib.user -import osrf.net_obj -import oils.const -from osrf.ses import ClientSession -from oils.event import Event -from oils.org import OrgUtil - -class SettingsController(BaseController): - def li_attr(self, **kwargs): - return RequestMgr().render('acq/settings/li_attr.html') diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/base.py b/Open-ILS/web/oilsweb/oilsweb/controllers/base.py deleted file mode 100644 index ee21fc69d3..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/base.py +++ /dev/null @@ -1,22 +0,0 @@ -import logging - -from oilsweb.lib.request import RequestMgr -from oilsweb.lib.base import * -from oilsweb.lib.context import Context, SubContext, ContextItem - -log = logging.getLogger(__name__) - - -class BaseContext(SubContext): - def postinit(self): - self.prefixvalue = "%s/base" % Context.get_context().core.prefix.value -Context.apply_sub_context('base', BaseContext) - - -class BaseController(BaseController): - ''' Controller for globally shared interfaces ''' - - def dashboard(self): - r = RequestMgr() - return r.render('dashboard.html') - diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/error.py b/Open-ILS/web/oilsweb/oilsweb/controllers/error.py deleted file mode 100644 index 766c0447ba..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/error.py +++ /dev/null @@ -1,39 +0,0 @@ -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) diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/template.py b/Open-ILS/web/oilsweb/oilsweb/controllers/template.py deleted file mode 100644 index fbcbb3f66f..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/template.py +++ /dev/null @@ -1,27 +0,0 @@ -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) diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/translator.py b/Open-ILS/web/oilsweb/oilsweb/controllers/translator.py deleted file mode 100644 index 0df6a559f2..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/translator.py +++ /dev/null @@ -1,24 +0,0 @@ -from oilsweb.lib.base import * -import urllib2, urllib, httplib -import osrf.json -import pylons - -class TranslatorController(BaseController): - ''' This controller acts as a proxy for the OpenSRF http translator - so that paster can handle opensrf AJAX requests. ''' - def proxy(self): - try: - headers = {} - for k,v in request.headers.iteritems(): - headers[k] = v - conn = httplib.HTTPConnection(pylons.config['osrf_http_translator_host']) - conn.request("POST", pylons.config['osrf_http_translator_path'], - urllib.urlencode({'osrf-msg':request.params['osrf-msg']}), headers) - resp = conn.getresponse() - for h in resp.getheaders(): - response.headers[h[0]] = h[1] - return resp.read() - except Exception, e: - import sys - sys.stderr.write(unicode(e) + '\n') - diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py b/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py deleted file mode 100644 index b2b8fd27b1..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -from oilsweb.lib.context import Context, SubContext, ContextItem -import osrf.ses, oils.utils.csedit, pylons.config, oils.utils.utils, oils.event -import oilsweb.lib.user -from gettext import gettext as _ -import oils.org - -class CoreContext(SubContext): - # cache the authenticated user info - def __init__(self): - self.prefix = ContextItem() # web prefix - self.media_prefix = ContextItem() # media prefix - self.ac_prefix = ContextItem() # added content prefix - self.skin = ContextItem() # web skin - self.theme = ContextItem() # web theme - self.authtoken = ContextItem(cgi_name='ses', session=True) # authtoken string - self.user = ContextItem() # logged in user object - self.workstation = ContextItem() # workstation object - self.use_demo = ContextItem(cgi_name='demo') # use the demo login - self.org_tree = ContextItem() # full org tree - self.page = ContextItem() # the current page - - self.work_orgs = ContextItem() - - # place to store perm org sets for a given permission - self.high_perm_orgs = ContextItem(default_value={}) - - # place to store slim perm org trees - self.perm_tree = ContextItem(default_value={}) - - def postinit(self): - self.prefix.value = pylons.config['oils_prefix'] - self.media_prefix.value = pylons.config['oils_media_prefix'] - self.ac_prefix.value = pylons.config['oils_added_content_prefix'] - self.skin.value = 'default' # XXX - self.theme.value = 'default' # XXX - #usermgr = oilsweb.lib.user.User(self) - #usermgr.fetch_user() - #self.work_orgs = usermgr.fetch_work_orgs() - -Context.apply_sub_context('core', CoreContext) diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py b/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py deleted file mode 100644 index bf97da2852..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/app_globals.py +++ /dev/null @@ -1,13 +0,0 @@ -"""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): - pass - - diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/base.py b/Open-ILS/web/oilsweb/oilsweb/lib/base.py deleted file mode 100644 index 4381f60bda..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/base.py +++ /dev/null @@ -1,27 +0,0 @@ -"""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 == '_'] diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/bib.py b/Open-ILS/web/oilsweb/oilsweb/lib/bib.py deleted file mode 100644 index 5a00c8a8d3..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/bib.py +++ /dev/null @@ -1,18 +0,0 @@ -import os, re -import pylons -import osrf.ses -import oils.utils.csedit -import oilsweb.lib.util - -def marc_to_html(marcxml): - # create a path building utility function .... - xslFile = os.path.join(pylons.config['oils_xsl_prefix'], pylons.config['oils_xsl_marc2html']) - html = oilsweb.lib.util.apply_xsl(marcxml, xslFile) - return html - -def scrub_isbn(isbn): - ''' removes trailing data from an ISBN ''' - if not isbn: return '' - return re.sub('\s.*','', isbn) - - diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/context.py b/Open-ILS/web/oilsweb/oilsweb/lib/context.py deleted file mode 100644 index bcc2f360de..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/context.py +++ /dev/null @@ -1,121 +0,0 @@ -from oilsweb.lib.util import childInit -import cgi - -# global context -_context = None -# global collection of sub-contexts -_subContexts = {} - -class ContextItem(object): - ''' Defines a single field on a subcontext 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') - self.session = kwargs.get('session') - self.value = self.default_value - -class SubContext(object): - ''' A SubContext is a class-specific context object that lives inside the global context object ''' - def _fields(self): - ''' Returns all public fields for this subcontext ''' - return [ f for f in dir(self) if f[0:1] != '_' and - getattr(self, f).__class__.__name__.find('method') < 0 ] - - def postinit(self): - ''' Overide with any post-global-init initialization ''' - pass - -class Context(object): - ''' Global context object ''' - - def __init__(self): - self._fields = [] - self._req = None - self._resp = None - - def make_query_string(self): - ''' Compiles a CGI query string from the collection of values - stored in the subcontexts ''' - - q = '' - for f in self._fields: - if f.cgi_name and not f.session: - val = f.value - if val != f.default_value: - if isinstance(val, list): - for v in val: - if isinstance(val, str) or isinstance(val, unicode): - q += f.cgi_name+'='+cgi.escape(v)+'&' - else: - if isinstance(val, str) or isinstance(val, unicode): - q += f.cgi_name+'='+cgi.escape(val)+'&' - - return q[:-1] # strip the trailing & - - def apply_session_vars(self): - from oilsweb.lib.base import session - for f in self._fields: - if f.cgi_name and f.session: - val = f.value - if val is not None and val != f.default_value: - session[f.cgi_name] = val - - @staticmethod - def apply_sub_context(app, ctx): - global _subContexts - _subContexts[app] = ctx - - @staticmethod - def get_context(): - global _context - return _context - - @staticmethod - def init(req, resp): - global _context, _subContexts - from oilsweb.lib.base import session - c = _context = Context() - c._req = req - c._resp = resp - #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) - - # ------------------------------------------------------------------- - # Load the cgi/session data. First try the URL params, then try the - # session cache, and finally see if the data is in a cookie. If - # no data is found, use the default - # ------------------------------------------------------------------- - if item.cgi_name: - if item.cgi_name in req.params: - if item.multi: - item.value = req.params.getall(item.cgi_name) - else: - item.value = req.params[item.cgi_name] - else: - if item.session: - if item.cgi_name in session: - item.value = session[item.cgi_name] - set = True - else: - if item.cgi_name in req.cookies: - item.value = req.cookies[item.cgi_name] - - # run postinit after all contexts have been loaded - for app in _subContexts.keys(): - ctx = getattr(c, app) - ctx.postinit() - - return c diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py b/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py deleted file mode 100644 index 0eb7c8fcca..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/helpers.py +++ /dev/null @@ -1,6 +0,0 @@ -"""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 * diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/request.py b/Open-ILS/web/oilsweb/oilsweb/lib/request.py deleted file mode 100644 index 94c2b55ba7..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/request.py +++ /dev/null @@ -1,45 +0,0 @@ -import pylons -from oilsweb.lib.base import * -import oilsweb.lib.context - -class RequestMgr(object): - ''' This is container class for aggregating the various Pylons global - variables, initializing the local and pylons context objects, and - rendering templates based on the skin - ''' - - def __init__(self): - # pylons request object - self.request = request - # pylons response object - self.response = response - # pylons session - self.session = session - # our local context object. - self.ctx = oilsweb.lib.context.Context.init(request, response) - # the global pylons context object - self.pylons_context = c - # true if we've saved the session/cookie data, etc. - self.finalized = False - - def finalize(self): - ''' Perform any last minute cleanup just prior to sending the result ''' - if not self.finalized: - self.ctx.apply_session_vars() - self.session.save() - self.pylons_context.oils = self.ctx - self.finalized = True - - def render(self, tpath): - ''' Renders the given template using the configured skin. - @param tpath The path to the template. The tpath should - only include the path to the template after the skin component. - E.g. if the full path is /oils/myskin/base/dashboard.html, tpath - would be 'base/dashboard.html' - ''' - self.finalize() - self.ctx.core.page.value = tpath - return pylons.templating.render('oils/%s/%s' % (self.ctx.core.skin.value, tpath)) - - - diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/user.py b/Open-ILS/web/oilsweb/oilsweb/lib/user.py deleted file mode 100644 index a67093fb04..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/user.py +++ /dev/null @@ -1,96 +0,0 @@ -import osrf.ses, oils.utils.csedit, pylons.config, oils.utils.utils, oils.event, oils.const -from gettext import gettext as _ - -class AuthException(Exception): - def __init__(self, info=''): - self.info = info - def __str__(self): - return "%s: %s" % (self.__class__.__name__, unicode(self.info)) - -class User(object): - ''' General purpose user utility methods ''' - - def __init__(self, ctx): - self.ctx = ctx - - def try_auto_login(self): - if pylons.config.get('oils_demo_user'): - evt = oils.utils.utils.login( - pylons.config['oils_demo_user'], - pylons.config['oils_demo_password'], - 'staff', - pylons.config['oils_demo_workstation']) - oils.event.Event.parse_and_raise(evt) - self.ctx.authtoken.value = evt['payload']['authtoken'] - - def fetch_user(self): - ''' Grab the logged in user and their workstation ''' - - if not self.ctx.authtoken.value: - self.try_auto_login() - - if not self.ctx.authtoken.value: - raise AuthException(_('No authentication token provided')) - - self.ctx.user.value = osrf.ses.ClientSession.atomic_request( - 'open-ils.auth', - 'open-ils.auth.session.retrieve', self.ctx.authtoken.value) - - evt = oils.event.Event.parse_event(self.ctx.user.value) - if evt and evt.text_code == 'NO_SESSION': - # our authtoken has timed out. See if we can autologin - self.try_auto_login() - if not self.ctx.authtoken.value: - raise AuthException(_('No authentication token provided')) - self.ctx.user.value = osrf.ses.ClientSession.atomic_request( - 'open-ils.auth', - 'open-ils.auth.session.retrieve', self.ctx.authtoken.value) - oils.event.Event.parse_and_raise(self.ctx.user.value) - - self.ctx.workstation.value = oils.utils.csedit.CSEditor().retrieve_actor_workstation(self.ctx.user.value.wsid()) - if not self.ctx.workstation.value: - raise AuthException(_('No workstation found')) - - def fetch_work_orgs(self): - work_orgs = osrf.ses.ClientSession.atomic_request( - 'open-ils.actor', - 'open-ils.actor.user.get_work_ous.ids', - self.ctx.authtoken.value) - oils.event.Event.parse_and_raise(work_orgs) - return work_orgs - - def highest_work_perm_set(self, perm): - perm_orgs = osrf.ses.ClientSession.atomic_request( - 'open-ils.actor', - 'open-ils.actor.user.work_perm.highest_org_set', self.ctx.authtoken.value, perm); - self.ctx.high_perm_orgs.value[perm] = perm_orgs - return perm_orgs - - def highest_work_perm_tree(self, perm): - perm_orgs = self.highest_work_perm_set(perm) - if len(perm_orgs) == 0: - return None - self.ctx.perm_tree.value[perm] = oils.org.OrgUtil.get_union_tree(perm_orgs) - return self.ctx.perm_tree.value[perm] - - def fetch_user_setting(self, setting): - setting = osrf.ses.ClientSession.atomic_request( - oils.const.OILS_APP_ACTOR, - 'open-ils.actor.patron.settings.retrieve', - self.ctx.authtoken.value, self.ctx.user.value.id(), setting) - oils.event.Event.parse_and_raise(setting) - return setting - - def get_date_format(self): - setting = self.fetch_user_setting('common.date_format') - if not setting: - return '%Y-%m-%d' - return setting - - def get_datetime_format(self): - setting = self.fetch_user_setting('common.datetime_format') - if not setting: - return '%Y-%m-%d %H:%M' - return setting - - diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/util.py b/Open-ILS/web/oilsweb/oilsweb/lib/util.py deleted file mode 100644 index b5fb9e131d..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/lib/util.py +++ /dev/null @@ -1,31 +0,0 @@ -import pylons.config, pylons.templating -import libxml2, libxslt - -def childInit(): - ''' Global child-init handler. - - 1. Connects to the OpenSRF network. - 2. Parses the IDL file - ''' - - import oils.system - oils.system.System.remote_connect( - config_file = pylons.config['osrf_config'], - config_context = pylons.config['osrf_config_ctxt'], - connect_cache = True) - -_parsedSheets = {} -def apply_xsl(xmlStr, xslFile, xslParams={}): - ''' Applies xslFile to xmlStr and returns the string result ''' - 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) - - diff --git a/Open-ILS/web/oilsweb/oilsweb/model/__init__.py b/Open-ILS/web/oilsweb/oilsweb/model/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/base.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/base.js deleted file mode 100644 index 912afcc821..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/base.js +++ /dev/null @@ -1,41 +0,0 @@ -function loadUser(username, password) { - dojo.require('dojo.cookie'); - dojo.require('openils.CGI'); - dojo.require("openils.User"); - - openils.User.authcookie = 'ses'; - openils.User.authtoken = dojo.cookie('ses') || new openils.CGI().param('ses'); - // cache the user object as a cookie? - //openils.User.user = JSON2js(dojo.cookie('user')); - - if(!username) return; - - dojo.require('openils.Event'); - - function dologin() { - openils.User.authtoken = null; - user = new openils.User(); - user.login({ - login_type:'staff', - username:username, - passwd:password, - login:true - }); - user.getBySession(); - openils.User.authtoken = user.authtoken; - openils.User.user = user.user; - //dojo.cookie('user', js2JSON(openils.User.user),{path:'/'}); - } - - if(!openils.User.user) { - if(openils.User.authtoken) { - user = new openils.User(); - openils.User.user = user.user; - if(openils.Event.parse(user.user)) // session timed out - dologin(); - } else { - dologin(); - } - } -} - diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt deleted file mode 100644 index 3d34a426b6..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/acq-bibdata-marc.xslt +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <xsl:call-template name="subfieldSelect"> - <xsl:with-param name="codes">abcmnopr</xsl:with-param> - </xsl:call-template> - - - - - -
-
-
-
- - - - -
- - - - - - ad - - - - - - - - - b - - - - - - - - - c - - - - - - - - - a - - - - - - - - - a - - - - - - - - - c - - - - - - - - - - - a - - - - - - - - - - - - - a - - - - - - - - - - - c - - - - -
-
- - - - - - - - - - - - - - -
diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/oilsMARC21slim2HTML.xsl b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/oilsMARC21slim2HTML.xsl deleted file mode 100644 index bbc8c2d50c..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/xsl/oilsMARC21slim2HTML.xsl +++ /dev/null @@ -1,81 +0,0 @@ - - - - - -
- - -
-
- - - - - - - - -
- LDR - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - ‡ - - - -
- - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html deleted file mode 100644 index 02cdfa6d65..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/base.html +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - - - - -<% locale = 'en-US' %> - - ${self.block_head()} - ${self.block_body()} - - -<%def name='block_head()'> - - - <%def name="page_title()">${_('Evergreen')} - ${self.page_title()} - ${self.block_css()} - ${self.block_js()} - - - -<%def name='block_body()'> - ${self.block_body_content()} - -<%def name='block_body_content()'/> -<%def name='body_css()'/> - -<%def name='block_css()'> - - - -<%def name='block_js()'> - - - - - - - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html deleted file mode 100644 index b285202232..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/base.html +++ /dev/null @@ -1,2 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/base.html deleted file mode 100644 index 46a0233fb8..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/base.html +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> -<%def name='block_navigate()'> - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html deleted file mode 100644 index 9b472e7fb5..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/index.html +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> - -<%def name="page_title()">${_('Evergreen Acquisitions Home')} -<%def name="block_content()"> -
- ACQ HOME -
- - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/base.html deleted file mode 100644 index 763500a0f0..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/base.html +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> -<%def name='block_navigate()'> - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/bib_search.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/bib_search.html deleted file mode 100644 index bfd220009b..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/bib_search.html +++ /dev/null @@ -1,105 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%namespace file='/oils/default/common/jubgrid.html' name='jubgrid'/> -<%def name="page_title()">${_('Title Search')} - -<%def name="block_content()"> - - - - - -
-
- -
-
${_('Search Sources')}
- -
-
-
- -
-
-
${_('Search Fields')}
-
-
- - - - - - - - - - - -
Hits Per Source -
-
-
${_("Submit")}
-
-
-
- -
- -
- ${('Save Results')} -
- - - - - - - - - - - - - - - - - -
- - - - -

- -
- -
-
-
- ${jubgrid.jubgrid('oils-acq-lineitem', 'plResultGrid', True)} -
- - - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html deleted file mode 100644 index c38784ff39..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- - -<%inherit file='base.html'/> -<%namespace file='../../common/jubgrid.html' name='jubgrid'/> -<%def name="block_js()"> - ${parent.block_js()} - - -<%def name="page_title()">${_('Picklist')} - -<%def name="block_content()"> -
-
-
- ${_('Picklist')} - -
-
Create - date:
-
Last updated:
-
Selector:
-
-
-
- - ${jubgrid.jubgrid('oils-acq-picklist', 'pickListGrid')} -
- - - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/base.html deleted file mode 100644 index 9bd815d7e2..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/base.html +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> -<%def name='block_navigate()'> - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/marc_upload.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/marc_upload.html deleted file mode 100644 index 2af0aa6d9b..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/marc_upload.html +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('MARC File Upload')} -<%def name="block_content()"> - - - - - -
- - - - - - - - - - - - - - - - - -
- -
- -
-
${_("Upload File")}
-
-
- - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html deleted file mode 100644 index 7db83d1704..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_po.html +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html' /> -<%namespace file='/oils/default/common/jubgrid.html' name='jubgrid'/> - -<%def name='page_title()'>${_('View PO')} -<%def name='block_content()'> - - - - - -
-
${_('PO Details')}
-
- -
-
- -
- - -
-
-
- - ${jubgrid.jubgrid('oils-acq-lineitem', 'liGrid')} -
-
-
- - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/base.html deleted file mode 100644 index 9bd815d7e2..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/base.html +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> -<%def name='block_navigate()'> - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html deleted file mode 100644 index 9806c02850..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> -<%def name="body_css()">tundra - -<%def name="block_js()"> - ${parent.block_js()} - - - - -<%def name='block_body_content()'> -
- -
-
- ${self.block_menu()} -
-
- ${self.block_header()} -
-
- -
- -
- ${self.block_navigate()} -
- -
- ${self.block_global_content()} -
-
- - -
- - -<%def name='block_header()'> - <%include file='header.html'/> - -<%def name='block_sidebar()'/> -<%def name='block_global_content()'> - ${self.block_content()} - -<%def name='block_content()'/> -<%def name='block_menu()'> - <%include file='menu.html'/> - -<%def name='block_navigate()'> - -<%def name='block_footer()'> - <%include file='footer.html'/> - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html deleted file mode 100644 index 76621b715b..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/jubgrid.html +++ /dev/null @@ -1,212 +0,0 @@ -<%def name='jubgrid(domprefix, grid_jsid, hide_details=False)'> -<%doc> -This template creates a split screen Dojo layout. The top frame -of the screen holds a list of of JUBs, or titles. Clicking on a -title in the top frame will load the purchase details for all the -copies on order for that title into the bottom frame. - -To create a display for a set of JUBs, create a Dojo store and -model for the set of JUBs, then place the following lines in your -HTML where you want the display to appear: - - <%namespace file='/oils/default/common/jubgrid.html' name='jubgrid'/> - ${jubgrid.jubgrid('dom_prefix', 'grid_jsid')} - -where 'dom_prefix' is a string that will be used as the prefix -for the DOM notes that are created by this template, and -'grid_jsid' is a valid JavaScript identifier that will name the -DOM node to which the list of JUBs will be attached. For example - - ${jubgrid.jubgrid('oils-acq-picklist', 'pickListGrid', hideDetails)} - -will create a Dojo grid with the DOM id of - - 'oils-acq-picklist-JUB-grid' - -and a jsid of - - pickListGrid - -To fill the grid with data, call the javascript function - - JUBGrid.populate(grid_jsid, model) - -'grid_jsid' is the same javascript id that was used to -instantiate the template, and model is a javascript variable -pointing to the JUB model (and store) that you have created. - - - -% if not hide_details: -
-% endif - - - - - - - -% if not hide_details: - -
-
- - -
-% endif -
-
-
-
-% if not hide_details: -
-
-
-
- ${_('New Copy')} -
- - - - - - - - - - - - - -
- -
-
- -
-
-
- - -
-
-
-
-
-
-
-% endif - - - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/widgets.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/widgets.html deleted file mode 100644 index d12d092e73..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/common/widgets.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -<%def name='org_draw_node(node, indent=0, selected=None, disable_depth=-1)'> - <% import oils.org %> - - <% indent += 1 %> - % for child in node.children(): - ${org_draw_node(child, indent)} - % endfor - - - -<%def name='org_select(select_name, tree=None, selected=None, disable_depth=-1)'> - - <% - if tree is None: - tree = c.oils.core.org_tree.value - %> - - - -<%def name='paging(start, count, max)'> - - - <% - start = int(start) - if (start + count > max): - end = max - else: - end = start + count - # set up the paging info - paging = _('Entries %(offset)d - %(limit)d of %(max)d') % { - 'offset': start + 1, 'limit': end, 'max': max } - %> - - % if start > 0: - « - % endif - - ${paging} - - % if end < max: - » - % endif - - -<%def name='build_selector(name, optionmap, chosen=None)'> - - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html deleted file mode 100644 index f51796dc4f..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/dashboard.html +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> - -<%def name="page_title()">${_('Evergreen Dashboard')} -<%def name="block_content()"> -
- DASHBOARD -
- - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html deleted file mode 100644 index 5e4dc340ed..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/footer.html +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- -${_('Powered By')} - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html deleted file mode 100644 index 27459cb30c..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html +++ /dev/null @@ -1,25 +0,0 @@ - - -
- -
diff --git a/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py b/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py deleted file mode 100644 index 91ff2e7099..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/tests/__init__.py +++ /dev/null @@ -1,40 +0,0 @@ -"""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) diff --git a/Open-ILS/web/oilsweb/oilsweb/tests/functional/__init__.py b/Open-ILS/web/oilsweb/oilsweb/tests/functional/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py b/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py deleted file mode 100644 index 845f3c67b6..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_acq.py +++ /dev/null @@ -1,7 +0,0 @@ -from oilsweb.tests import * - -class TestAcqController(TestController): - - def test_index(self): - response = self.app.get(url_for(controller='acq')) - # Test response... diff --git a/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py b/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py deleted file mode 100644 index 99d6439e63..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_admin.py +++ /dev/null @@ -1,7 +0,0 @@ -from oilsweb.tests import * - -class TestAdminController(TestController): - - def test_index(self): - response = self.app.get(url_for(controller='admin')) - # Test response... diff --git a/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py b/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py deleted file mode 100644 index 530c6a5554..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/tests/functional/test_base.py +++ /dev/null @@ -1,7 +0,0 @@ -from oilsweb.tests import * - -class TestBaseController(TestController): - - def test_index(self): - response = self.app.get(url_for(controller='base')) - # Test response... diff --git a/Open-ILS/web/oilsweb/oilsweb/tests/test_models.py b/Open-ILS/web/oilsweb/oilsweb/tests/test_models.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Open-ILS/web/oilsweb/oilsweb/websetup.py b/Open-ILS/web/oilsweb/oilsweb/websetup.py deleted file mode 100644 index 2eb8bbda38..0000000000 --- a/Open-ILS/web/oilsweb/oilsweb/websetup.py +++ /dev/null @@ -1,14 +0,0 @@ -"""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) diff --git a/Open-ILS/web/oilsweb/setup.cfg b/Open-ILS/web/oilsweb/setup.cfg deleted file mode 100644 index 3862d15dfa..0000000000 --- a/Open-ILS/web/oilsweb/setup.cfg +++ /dev/null @@ -1,59 +0,0 @@ -[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 diff --git a/Open-ILS/web/oilsweb/setup.py b/Open-ILS/web/oilsweb/setup.py deleted file mode 100644 index 8b55beea3d..0000000000 --- a/Open-ILS/web/oilsweb/setup.py +++ /dev/null @@ -1,31 +0,0 @@ -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 - """, -) diff --git a/Open-ILS/web/templates/base.tt2 b/Open-ILS/web/templates/base.tt2 new file mode 100644 index 0000000000..84549c1cbe --- /dev/null +++ b/Open-ILS/web/templates/base.tt2 @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + [% content %] + + diff --git a/Open-ILS/web/templates/default/acq/common/jubgrid.tt2 b/Open-ILS/web/templates/default/acq/common/jubgrid.tt2 new file mode 100644 index 0000000000..94bc3748f2 --- /dev/null +++ b/Open-ILS/web/templates/default/acq/common/jubgrid.tt2 @@ -0,0 +1,209 @@ +[%#- +This template creates a split screen Dojo layout. The top frame +of the screen holds a list of of JUBs, or titles. Clicking on a +title in the top frame will load the purchase details for all the +copies on order for that title into the bottom frame. + +To create a display for a set of JUBs, create a Dojo store and +model for the set of JUBs, then place the following lines in your +HTML where you want the display to appear: + + <%namespace file='/oils/default/common/jubgrid.html' name='jubgrid'/> + ${jubgrid.jubgrid('dom_prefix', 'grid_jsid')} + +where 'dom_prefix' is a string that will be used as the prefix +for the DOM notes that are created by this template, and +'grid_jsid' is a valid JavaScript identifier that will name the +DOM node to which the list of JUBs will be attached. For example + + ${jubgrid.jubgrid('oils-acq-picklist', 'pickListGrid', hideDetails)} + +will create a Dojo grid with the DOM id of + + 'oils-acq-picklist-JUB-grid' + +and a jsid of + + pickListGrid + +To fill the grid with data, call the javascript function + + JUBGrid.populate(grid_jsid, model) + +'grid_jsid' is the same javascript id that was used to +instantiate the template, and model is a javascript variable +pointing to the JUB model (and store) that you have created. +-#%] + +[% UNLESS hide_details %] +
+[% END %] + + + + + + + +[% UNLESS hide_details %] + + +
+
+ + +
+
+
+[% ELSE %] +
+[% END %] +
+
+
+[% UNLESS hide_details %] + +
+
+
+ New Copy +
+ + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+[% END %] diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html b/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 similarity index 67% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html rename to Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 index 2cbc929805..b98aab38c8 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html +++ b/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 @@ -1,14 +1,10 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('Currency Types')} -<%def name="block_content()"> - +[% WRAPPER 'default/base.tt2' %]
-
${_('Currency Types')}
+
Currency Types
- +
- - +[% END %] diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html b/Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2 similarity index 67% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html rename to Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2 index 00e3e762da..9924621196 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funding_sources.html +++ b/Open-ILS/web/templates/default/acq/financial/list_funding_sources.tt2 @@ -1,14 +1,10 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('Funding Sources')} -<%def name="block_content()"> - +[% WRAPPER 'default/base.tt2' %]
-
${_('Funding Sources')}
+
Funding Sources
- +
- +[% END %] diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html b/Open-ILS/web/templates/default/acq/financial/list_funds.tt2 similarity index 68% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html rename to Open-ILS/web/templates/default/acq/financial/list_funds.tt2 index 8d19b49758..dfaad92ffb 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html +++ b/Open-ILS/web/templates/default/acq/financial/list_funds.tt2 @@ -1,14 +1,11 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('Funds')} -<%def name="block_content()"> +[% WRAPPER 'default/base.tt2' %]
-
${_('Funds')}
+
Funds
- +
+[% END %] - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html b/Open-ILS/web/templates/default/acq/financial/list_providers.tt2 similarity index 63% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html rename to Open-ILS/web/templates/default/acq/financial/list_providers.tt2 index 07398dd696..607dc6971a 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html +++ b/Open-ILS/web/templates/default/acq/financial/list_providers.tt2 @@ -1,19 +1,13 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('Providers')} -<%def name="block_content()"> - - - - +[% WRAPPER default/base.tt2 %] +
-
${_('Providers')}
+
Providers
- ${('New Provider')} + New Provider
+[% END %] - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html b/Open-ILS/web/templates/default/acq/financial/view_fund.tt2 similarity index 53% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html rename to Open-ILS/web/templates/default/acq/financial/view_fund.tt2 index 25609c23b5..5c805df2d0 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html +++ b/Open-ILS/web/templates/default/acq/financial/view_fund.tt2 @@ -1,30 +1,26 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('View Fund')} -<%def name="block_content()"> - +[% WRAPPER 'default/base.tt2' %] - +
-
${_('Fund Details')}
+
Fund Details
- ${('Create Allocation')} + Create Allocation
- + - + - + - +
@@ -45,32 +41,32 @@
- +
@@ -82,63 +78,63 @@
+ class='oils-acq-detail-content-pane' title="Summary" selected='true'>
-
+
-
+
@@ -146,4 +142,4 @@
- +[% END %] diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html b/Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2 similarity index 65% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html rename to Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2 index 8eb7cf2459..3d21a63d56 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_funding_source.html +++ b/Open-ILS/web/templates/default/acq/financial/view_funding_source.tt2 @@ -1,43 +1,38 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%namespace file='../../common/widgets.html' name='widget'/> -<%def name="page_title()">${_('View Funding Source')} -<%def name="block_content()"> - +[% WRAPPER 'default/base.tt2' %] - +
-
${_('Funding Source Details')}
+
Funding Source Details
- ${('Apply Credit')} + Apply Credit
- + - + - + - +
- +
@@ -111,51 +106,51 @@
-
+
-
+
-
+
@@ -163,5 +158,5 @@
+[% END %] - diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html b/Open-ILS/web/templates/default/acq/financial/view_provider.tt2 similarity index 64% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html rename to Open-ILS/web/templates/default/acq/financial/view_provider.tt2 index e37092f862..1b34cf99a4 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_provider.html +++ b/Open-ILS/web/templates/default/acq/financial/view_provider.tt2 @@ -1,28 +1,19 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('View Provider')} -<%def name="block_content()"> - - - - - +[% WRAPPER default/base.tt2 %] + +
-
+ class='oils-acq-detail-content-pane' title="Summary" selected='true' style='height:400px;'> @@ -33,7 +24,7 @@ Provider order record data types -->
+ class='oils-acq-detail-content-pane' title="Order Record Format" style='height:400px;'>
@@ -41,12 +32,12 @@ Dropdown menu for creating a new order record data type -->
- ${('Create Order Record Field')} + Create Order Record Field
- + - + - + - + - + - +
- +
@@ -100,7 +91,7 @@ Delete order record data types button -->
@@ -108,13 +99,13 @@ @@ -122,6 +113,5 @@
- - +[% END %] diff --git a/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 b/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 new file mode 100644 index 0000000000..71cdf24046 --- /dev/null +++ b/Open-ILS/web/templates/default/acq/picklist/bib_search.tt2 @@ -0,0 +1,99 @@ +[% WRAPPER 'default/base.tt2' %] + + + + + +
+
+ +
+
Search Sources
+ +
+
+
+ +
+
+
Search Fields
+
+
+ + + + + + + + + + + +
Hits Per Source +
+
+
Submit
+
+
+
+ +
+ +
+ Save Results +
+ + + + + + + + + + + + + + + + + +
+ + + + +

+ +
+ +
+
+
+ [% grid_jsid = 'plResultGrid'; domprefix = 'oils-acq-lineitem'; hide_details = 1 %] + [% INCLUDE 'default/acq/common/jubgrid.tt2' %] +
+ +[% END %] + diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html b/Open-ILS/web/templates/default/acq/picklist/list.tt2 similarity index 51% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html rename to Open-ILS/web/templates/default/acq/picklist/list.tt2 index 18110f136c..c732b991bc 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html +++ b/Open-ILS/web/templates/default/acq/picklist/list.tt2 @@ -1,28 +1,14 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('My Picklists')} -<%def name="block_content()"> - +[% WRAPPER 'default/base.tt2' %]
-
${_('My Picklists')}
- +
My Picklists
-
${_('All Picklists')}
- +
All Picklists
- + -
- ${('New Picklist')} + New Picklist
- +
- +
@@ -63,20 +48,19 @@ function getName(rowIndex) { data = plListGrid.model.getRow(rowIndex); if(!data) return; - return ''+data.name+''; + return ''+data.name+''; } var plListGridStructure = [{ cells : [[ - {name: '${_("ID")}', field: 'id'}, - {name: '${_("Name")}', width:'auto', get:getName}, - {name: '${_("Selector")}', field:'owner'}, - {name: '${_("Create Time")}', field: 'create_time'}, - {name: '${_("Edit Time")}', field: 'edit_time'}, - {name: '${_("Entry Count")}', field: 'entry_count'}, + {name: 'ID', field: 'id'}, + {name: 'Name', width:'auto', get:getName}, + {name: 'Selector', field:'owner'}, + {name: 'Create Time', field: 'create_time'}, + {name: 'Edit Time', field: 'edit_time'}, + {name: 'Entry Count', field: 'entry_count'}, ]] }];
- - +[% END %] diff --git a/Open-ILS/web/templates/default/acq/picklist/view.tt2 b/Open-ILS/web/templates/default/acq/picklist/view.tt2 new file mode 100644 index 0000000000..157477dc80 --- /dev/null +++ b/Open-ILS/web/templates/default/acq/picklist/view.tt2 @@ -0,0 +1,41 @@ +[% WRAPPER 'default/base.tt2' %] + + +
+
+
+ Picklist + +
+
Create + date:
+
Last updated:
+
Selector:
+
+
+
+ + [% grid_jsid = 'pickListGrid'; domprefix = 'oils-acq-picklist' %] + [% INCLUDE 'default/acq/common/jubgrid.tt2' %] +
+[% END %] + diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/li_search.html b/Open-ILS/web/templates/default/acq/po/li_search.tt2 similarity index 71% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/li_search.html rename to Open-ILS/web/templates/default/acq/po/li_search.tt2 index 87a8088489..32ad32b642 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/li_search.html +++ b/Open-ILS/web/templates/default/acq/po/li_search.tt2 @@ -1,14 +1,8 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('Lineitem Search')} -<%namespace file='/oils/default/common/jubgrid.html' name='jubgrid'/> - - -<%def name="block_content()"> - +[% WRAPPER default/base.tt2 %] +
@@ -19,18 +13,18 @@ - + - + - +
${_("Search")}
Search
@@ -50,7 +44,7 @@
- ${('Create PO')} + reate PO
- ${jubgrid.jubgrid('oils-acq-li-search', 'liGrid')} + [% grid_jsid = 'liGrid'; domprefix = 'oils-acq-li-search' %] + [% INCLUDE 'default/acq/common/jubgrid.tt2' %]
- +[% END %] diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html b/Open-ILS/web/templates/default/acq/po/search.tt2 similarity index 56% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html rename to Open-ILS/web/templates/default/acq/po/search.tt2 index f7ba78155b..951795a56a 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/search.html +++ b/Open-ILS/web/templates/default/acq/po/search.tt2 @@ -1,20 +1,16 @@ -# -*- coding: utf-8 -*- -<%inherit file='base.html'/> -<%def name="page_title()">${_('PO Search')} -<%def name="block_content()"> - +[% WRAPPER default/base.tt2 %]
-
${_('PO Search')}
+
PO Search
- + @@ -31,32 +27,32 @@ - + - + - + - + - +
${_("Search")}
Search
@@ -64,19 +60,17 @@
- - - +[% END %] diff --git a/Open-ILS/web/templates/default/acq/po/view.tt2 b/Open-ILS/web/templates/default/acq/po/view.tt2 new file mode 100644 index 0000000000..3779485900 --- /dev/null +++ b/Open-ILS/web/templates/default/acq/po/view.tt2 @@ -0,0 +1,40 @@ +[% WRAPPER default/base.tt2 %] + + + + +
+
PO Details
+
+ +
+
+ +
+ + +
+
+
+ + [% grid_jsid = 'liGrid'; domprefix = 'oils-acq-lineitem' %] + [% INCLUDE 'default/acq/common/jubgrid.tt2' %] +
+
+
+[% END %] diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html b/Open-ILS/web/templates/default/acq/receiving/process.tt2 similarity index 66% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html rename to Open-ILS/web/templates/default/acq/receiving/process.tt2 index 21584b3601..8ca1eae4a9 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/receiving/process.html +++ b/Open-ILS/web/templates/default/acq/receiving/process.tt2 @@ -1,13 +1,5 @@ -# -*- coding: utf-8 -*- - -<%inherit file='base.html'/> -<%def name="page_title()">${_('Receiving')} -<%namespace file='../../common/jubgrid.html' name='jubgrid'/> - -<%def name="block_content()"> - +[% WRAPPER default/base.tt2 %] +

Receiving Processing


@@ -17,20 +9,20 @@ - + - + - +
${_("Search")}
Search
@@ -38,10 +30,9 @@
- ${jubgrid.jubgrid('oils-acq-recv', 'liGrid')} + [% grid_jsid = 'liGrid'; domprefix = 'oils-acq-recv' %] + [% INCLUDE 'default/acq/common/jubgrid.tt2' %]
- - - - +[% END %] + diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/settings/li_attr.html b/Open-ILS/web/templates/default/acq/settings/li_attr.tt2 similarity index 57% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/settings/li_attr.html rename to Open-ILS/web/templates/default/acq/settings/li_attr.tt2 index 59afe8e96e..5a2b16a003 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/settings/li_attr.html +++ b/Open-ILS/web/templates/default/acq/settings/li_attr.tt2 @@ -1,48 +1,44 @@ -# -*- coding: utf-8 -*- -<%inherit file='../base.html'/> -<%def name="page_title()">${_('Lineitem Attribute Definitions')} -<%def name="block_content()"> - - +[% WRAPPER default/base.tt2 %] +
- ${('Lineitem Attribute Attribute')} + Lineitem Attribute Attribute
- + - + - + - + - + - +
- +
@@ -51,27 +47,27 @@
+ class='oils-acq-detail-content-pane' title="MARC Attributes" style='height:600px;'>
+ class='oils-acq-detail-content-pane' title="Generated Attributes" style='height:600px;'>
- +[% END %] diff --git a/Open-ILS/web/templates/default/base.tt2 b/Open-ILS/web/templates/default/base.tt2 new file mode 100644 index 0000000000..0a36541665 --- /dev/null +++ b/Open-ILS/web/templates/default/base.tt2 @@ -0,0 +1,28 @@ +[% WRAPPER 'base.tt2' %] + + + +
+
+
+ [% INCLUDE default/menu.tt2 %] +
+
+ [% INCLUDE default/header.tt2 %] +
+
+
+
+
+
+ [% content %] +
+
+ +
+[% END %] diff --git a/Open-ILS/web/templates/default/footer.tt2 b/Open-ILS/web/templates/default/footer.tt2 new file mode 100644 index 0000000000..2b087d2434 --- /dev/null +++ b/Open-ILS/web/templates/default/footer.tt2 @@ -0,0 +1,2 @@ +Powered By + diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html b/Open-ILS/web/templates/default/header.tt2 similarity index 92% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html rename to Open-ILS/web/templates/default/header.tt2 index 748e240280..19040564eb 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/header.html +++ b/Open-ILS/web/templates/default/header.tt2 @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*-
diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/menu.html b/Open-ILS/web/templates/default/menu.tt2 similarity index 59% rename from Open-ILS/web/oilsweb/oilsweb/templates/oils/default/menu.html rename to Open-ILS/web/templates/default/menu.tt2 index fcae02e2e3..b33ff89b51 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/menu.html +++ b/Open-ILS/web/templates/default/menu.tt2 @@ -1,6 +1,6 @@
@@ -8,7 +8,7 @@
Currency Types
+ onClick="location.href = '[% ctx.base_uri %]/acq/currency_type/list';">Currency Types
-- 2.11.0