From d26a405ac77709bfa851dfa2b9a543ead21e40ec Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 19 May 2008 16:19:28 +0000 Subject: [PATCH] added initial currency type config interface git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9638 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../oilsweb/controllers/acq/currency_type.py | 8 +++ .../default/acq/financial/list_currency_types.js | 24 +++++++++ .../default/acq/financial/list_currency_types.html | 63 ++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 Open-ILS/web/oilsweb/oilsweb/controllers/acq/currency_type.py create mode 100644 Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js create mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.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 new file mode 100644 index 0000000000..08b73c1d90 --- /dev/null +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/currency_type.py @@ -0,0 +1,8 @@ +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/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js new file mode 100644 index 0000000000..7048a29c77 --- /dev/null +++ b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_currency_types.js @@ -0,0 +1,24 @@ +dojo.require("dijit.Dialog"); +dojo.require('dijit.form.Button'); +dojo.require('dojox.grid.Grid'); +dojo.require('openils.acq.CurrencyType'); +dojo.require('openils.Event'); +dojo.require('fieldmapper.dojoData'); + +var currencyTypes = []; + +function loadCTypesGrid() { + openils.acq.CurrencyType.fetchAll( + function(types) { + var store = new dojo.data.ItemFileReadStore( + {data:acqct.toStoreData(types, 'code', {identifier:'code'})}); + var model = new dojox.grid.data.DojoData(null, store, + {rowsPerPage: 20, clientSort: true, query:{code:'*'}}); + currencyTypeListGrid.setModel(model); + currencyTypeListGrid.update(); + } + ); +} + + +dojo.addOnLoad(loadCTypesGrid); diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html new file mode 100644 index 0000000000..538c909449 --- /dev/null +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_currency_types.html @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +<%inherit file='../base.html'/> +<%def name="page_title()">${_('Currency Types')} +<%def name="block_content()"> + +
+
${_('Currency Types')}
+
+ + + + + + +
+
+ ${('New Currency Type')} + +
+ + + + + + + + + + + + + + +
+ +
+
+
+ + +
+ + + +
+ + -- 2.11.0