From ad55943b5fdb357c64d73c1308eaadf7e5e68461 Mon Sep 17 00:00:00 2001 From: djfiander Date: Tue, 19 Feb 2008 16:18:00 +0000 Subject: [PATCH] Add ability to view all picklists, not just mine. git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8776 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../oilsweb/oilsweb/controllers/acq/picklist.py | 5 +++ Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py | 13 +++++--- .../public/oils/media/css/skin/default/acq.css | 2 +- .../public/oils/media/css/theme/default/acq.css | 2 +- .../default/acq/financial/list_fund_sources.html | 2 +- .../oils/default/acq/financial/list_funds.html | 2 +- .../oils/default/acq/financial/list_providers.html | 2 +- .../oils/default/acq/financial/view_fund.html | 2 +- .../default/acq/financial/view_fund_source.html | 2 +- .../oils/default/acq/picklist/view_list.html | 3 +- .../oils/default/acq/picklist/view_listall.html | 39 ++++++++++++++++++++++ 11 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html diff --git a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py index 6366cb964d..6cdedb0141 100644 --- a/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py +++ b/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py @@ -52,6 +52,11 @@ class PicklistController(BaseController): r.ctx.acq.picklist_list.value = pl_manager.retrieve_list() return r.render('acq/picklist/view_list.html') + def listall(self): + r = RequestMgr() + pl_manager = oilsweb.lib.acq.picklist.PicklistMgr(r) + r.ctx.acq.picklist_list.value = pl_manager.retrieve_list(all=True) + return r.render('acq/picklist/view_listall.html') def search(self): r = RequestMgr() diff --git a/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py b/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py index 23ac6c5963..05a0c80bf2 100644 --- a/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py +++ b/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py @@ -70,11 +70,16 @@ class PicklistMgr(object): self.picklist.entries(entries) - def retrieve_list(self): + def retrieve_list(self, all=False): ''' Returns my list of picklist objects ''' - list = self.ses.request( - 'open-ils.acq.picklist.user.retrieve', - self.request_mgr.ctx.core.authtoken.value, {'flesh_entry_count':1}).recv().content() + if (all): + request = 'open-ils.acq.picklist.user.all.retrieve.atomic' + else: + request = 'open-ils.acq.picklist.user.retrieve' + + list = self.ses.request(request, + self.request_mgr.ctx.core.authtoken.value, + {'flesh_entry_count':1, 'flesh_username':1}).recv().content() oils.event.Event.parse_and_raise(list) usermgr = oilsweb.lib.user.User(self.request_mgr.ctx.core) diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css index 266a1bf7ad..f3c7b2258b 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css +++ b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css @@ -43,7 +43,7 @@ #oils-acq-list-header { margin: 10px; width: 98%;} #oils-acq-list-header-label { float: left; } -#oils-acq-list-header-create { float: right; } +#oils-acq-list-header-actions { float: right; } /* picklist entry page */ #oils-acq-picklist-entry-header { padding: 4px; margin-bottom: 20px; } diff --git a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css index e5fdc065f7..2428aa0147 100644 --- a/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css +++ b/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css @@ -30,7 +30,7 @@ #oils-acq-list-header {border-bottom: 1px solid #6BA160;} #oils-acq-list-header-label { font-weight: bold; font-size: 110%; } -#oils-acq-list-header-create { font-weight: bold; } +#oils-acq-list-header-actions { font-weight: bold; } /* entry display */ diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html index 789b8b3b9f..410ccb1e0c 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html @@ -6,7 +6,7 @@
${_('Funding Sources')}
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html index a0e5710e23..ec1ae659e9 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html @@ -6,7 +6,7 @@
${_('Funds')}
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html index b1f45c0670..e28816b31f 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html @@ -6,7 +6,7 @@
${_('Providers')}
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html index a39ac0d21a..935c3a0824 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html @@ -8,7 +8,7 @@
${fund.name()}
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html index 8f12de9a99..705f2ce0fc 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html @@ -8,7 +8,7 @@
${source.name()}
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html index 1280f1314c..8d8bb7c92a 100644 --- a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html @@ -5,7 +5,8 @@
${_('My Picklists')}
- diff --git a/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html new file mode 100644 index 0000000000..ba45909a6d --- /dev/null +++ b/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +<%inherit file='../base.html'/> +<%def name="page_title()">${_('Evergreen All Picklists')} +<%def name="block_content()"> + +
+
${_('All Picklists')}
+ +
+ + + + + + + + + + + + + % for picklist in c.oils.acq.picklist_list.value: + + + + + + + + + % endfor + +
${_('Name')}${_('Owner')}${_('Creation Date')}${_('Edit Date')}${_('Number of Entries')} + +
${picklist.name()}${picklist.owner()}${picklist.create_time()}${picklist.edit_time()}${picklist.entry_count()}${_('Delete')}
+ -- 2.11.0