[open-ils-commits] r8416 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
controllers/acq lib/acq public/oils/media/css/skin/default
public/oils/media/css/theme/default
templates/oils/default/acq/picklist
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 18 10:21:41 EST 2008
Author: erickson
Date: 2008-01-18 09:55:52 -0500 (Fri, 18 Jan 2008)
New Revision: 8416
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
Log:
added a picklist entry viewing page
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py 2008-01-18 13:59:36 UTC (rev 8415)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py 2008-01-18 14:55:52 UTC (rev 8416)
@@ -20,13 +20,15 @@
self.z39_sources = ContextItem()
self.search_classes = ContextItem()
self.search_classes_sorted = ContextItem()
- self.picklist_id = ContextItem(cgi_name='acq.pl')
+ #self.picklist_id = ContextItem(cgi_name='acq.pl')
self.picklist = ContextItem()
+ self.picklist_entry = ContextItem()
self.offset = ContextItem(cgi_name='acq.os', default_value=0)
self.limit = ContextItem(cgi_name='acq.li', default_value=10)
self.extract_bib_field = ContextItem(default_value=oilsweb.lib.acq.search.extract_bib_field)
self.find_entry_attr = ContextItem(default_value=oilsweb.lib.acq.picklist.PicklistMgr.find_entry_attr)
+ self.picklist_entry_marc_html = ContextItem()
def postinit(self):
self.prefix = "%s/acq" % Context.getContext().core.prefix
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py 2008-01-18 13:59:36 UTC (rev 8415)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py 2008-01-18 14:55:52 UTC (rev 8416)
@@ -18,7 +18,15 @@
return r.render('acq/picklist/view.html')
def view_entry(self, **kwargs):
- return 'details for entry ' + str(kwargs.get('id'))
+ r = RequestMgr()
+ pl_manager = oilsweb.lib.acq.picklist.PicklistMgr(r)
+ entry = pl_manager.retrieve_entry(kwargs.get('id'), flesh=1, flesh_provider=True)
+ pl_manager.id = entry.picklist()
+ picklist = pl_manager.retrieve()
+ r.ctx.acq.picklist = pl_manager.picklist
+ r.ctx.acq.picklist_entry = entry
+ r.ctx.acq.picklist_entry_marc_html = oilsweb.lib.bib.marc_to_html(entry.marc())
+ return r.render('acq/picklist/view_entry.html')
def search(self):
return 'search interface'
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py 2008-01-18 13:59:36 UTC (rev 8415)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py 2008-01-18 14:55:52 UTC (rev 8416)
@@ -42,11 +42,20 @@
self.picklist.entries(entries)
- def retrieve_entry(self, entry_id):
+ def retrieve_entry(self, entry_id, **kwargs):
+ args = {'flesh': kwargs.get('flesh')}
entry = self.ses.request(
'open-ils.acq.picklist_entry.retrieve',
- self.request_mgr.ctx.core.auththoken, entry_id).recv.content()
+ self.request_mgr.ctx.core.authtoken, entry_id, args).recv().content()
oils.event.Event.parse_and_raise(entry)
+ if kwargs.get('flesh_provider'):
+ if entry.provider():
+ provider = self.ses.request(
+ 'open-ils.acq.provider.retrieve',
+ self.request_mgr.ctx.core.authtoken,
+ entry.provider()).recv().content()
+ entry.provider(provider)
+
return entry
@staticmethod
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css 2008-01-18 13:59:36 UTC (rev 8415)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css 2008-01-18 14:55:52 UTC (rev 8416)
@@ -32,9 +32,15 @@
.oils-acq-picklist-records-phys_desc-row td { padding-left: 30px; }
.oils-acq-picklist-records-phys_desc-row {}
-#oils-acq-rdetail-marc-block { margin-top: 0px; padding: 6px; }
-#oils-acq-rdetail-summary-block { margin-top: 0px; padding: 6px; }
+#oils-acq-picklist-entry-header { padding: 4px; margin-bottom: 20px; }
+#oils-acq-picklist-entry-summary {}
+#oils-acq-picklist-entry-summary td {padding: 2px;}
+.oils-acq-picklist-entry-attr {}
+.oils-acq-picklist-entry-attr-type {}
+.oils-acq-picklist-entry-attr-name {}
+.oils-acq-picklist-entry-attr-value {}
+#oils-acq-picklist-entry-marc-block { margin-top: 10px; padding: 6px; }
#oils-acq-picklist-table { width: 100%; }
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css 2008-01-18 13:59:36 UTC (rev 8415)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css 2008-01-18 14:55:52 UTC (rev 8416)
@@ -13,13 +13,14 @@
#oils-acq-picklist-table thead tr { border: 1px solid #A1A1A1; }
#oils-acq-picklist-header {border: 1px solid #85C777;}
+#oils-acq-picklist-entry-header {border: 1px solid #85C777;}
#oils-acq-picklist-name { font-weight: bold; font-style: italic; }
.oils-acq-picklist-attributes { font-size: 90%; margin-left: 15px;}
+.oils-acq-picklist-entry-attributes { font-size: 90%; margin-left: 15px;}
.oils-acq-picklist-records-phys_desc-row { border-bottom: 1px solid #6BA160; }
.oils-acq-picklist-picklist-td { border-style: solid; border-color: #A1A1A1; border-width: 0px 1px 0px 1px; }
.oils-acq-picklist-records-service-td { font-size: 85%; }
-#oils-acq-pl_builder-picklist-submit { text-align: right; }
+.oils-acq-picklist-entry-attr-name {}
-#oils-acq-rdetail-marc-block { border: 1px solid #6BA160; }
-#oils-acq-rdetail-summary-block { border: 1px solid #6BA160; }
+#oils-acq-picklist-entry-marc-block { border: 1px solid #6BA160; }
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html 2008-01-18 13:59:36 UTC (rev 8415)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html 2008-01-18 14:55:52 UTC (rev 8416)
@@ -3,17 +3,7 @@
<%def name="page_title()">${_('Evergreen ACQ Picklist')}</%def>
<%def name="block_content()">
-<div id='oils-acq-picklist-header'>
- ${_('Picklist')} <span id='oils-acq-picklist-name'>${c.oils.acq.picklist.name()}</span>
- <div class='oils-acq-picklist-attributes'>
- <%
- meta = _("Create date %(date)s") % {"date":c.oils.acq.picklist.create_time()}
- meta2 = _("Last update time %(date)s") % {"date":c.oils.acq.picklist.edit_time()}
- %>
- <div>${meta}</div>
- <div>${meta2}</div>
- </div>
-</div>
+<%include file='picklist_summary.html'/>
<table id='oils-acq-picklist-table'>
<thead>
More information about the open-ils-commits
mailing list