[open-ils-commits] r8822 - 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/po
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 22 12:40:34 EST 2008
Author: djfiander
Date: 2008-02-22 12:09:52 -0500 (Fri, 22 Feb 2008)
New Revision: 8822
Added:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/po_li_summary.html
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/po_manager.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/po/view_lineitem.html
Log:
Beginnings of PO Line Item Detail display
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-02-22 16:22:48 UTC (rev 8821)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py 2008-02-22 17:09:52 UTC (rev 8822)
@@ -74,6 +74,7 @@
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()
# -------------------------------------------------------------
# utility functions
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py 2008-02-22 16:22:48 UTC (rev 8821)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/po.py 2008-02-22 17:09:52 UTC (rev 8822)
@@ -35,4 +35,10 @@
r = RequestMgr()
po_mgr = oilsweb.lib.acq.po_manager.PO_Manager(r, liid=kwargs['id'])
po_mgr.retrieve_lineitem()
+ r.ctx.acq.po_li.value = po_mgr.li
+
+ po_mgr.id = po_mgr.li.purchase_order()
+ po_mgr.retrieve(flesh_lineitems=0)
+ r.ctx.acq.po.value = po_mgr.po
+
return r.render('acq/po/view_lineitem.html')
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/po_manager.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/po_manager.py 2008-02-22 16:22:48 UTC (rev 8821)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/po_manager.py 2008-02-22 17:09:52 UTC (rev 8822)
@@ -34,12 +34,18 @@
return list
- def retrieve(self):
+ def retrieve(self, **kwargs):
+ if 'flesh_lineitems' in kwargs:
+ flesh = kwargs['flesh_lineitems']
+ else:
+ flesh = 1
+
po = self.ses.request('open-ils.acq.purchase_order.retrieve',
self.request_mgr.ctx.core.authtoken.value,
- self.id, {'flesh_lineitems':1}).recv().content()
+ self.id,
+ {'flesh_lineitems':flesh}).recv().content()
+ oils.event.Event.parse_and_raise(po)
- oils.event.Event.parse_and_raise(po)
datefmt = oilsweb.lib.user.User(self.request_mgr.ctx.core).get_date_format()
po.create_time(mx.DateTime.ISO.ParseAny(po.create_time()).strftime(datefmt))
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-02-22 16:22:48 UTC (rev 8821)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css 2008-02-22 17:09:52 UTC (rev 8822)
@@ -63,6 +63,16 @@
#oils-acq-list-header-label { float: left; }
#oils-acq-list-header-actions { float: right; }
+/* purchase order line item detail page */
+#oils-acq-po-li-header { padding: 4px; margin-bottom: 20px; }
+#oils-acq-po-li-summary {}
+#oils-acq-po-li-summary td {padding: 2px;}
+.oils-acq-po-li-attr {}
+.oils-acq-po-li-attr-type {}
+.oils-acq-po-li-attr-name {}
+.oils-acq-po-li-attr-value {}
+#oils-acq-po-li-marc-block { margin-top: 10px; padding: 6px; }
+
/* picklist entry page */
#oils-acq-picklist-entry-header { padding: 4px; margin-bottom: 20px; }
#oils-acq-picklist-entry-summary {}
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-02-22 16:22:48 UTC (rev 8821)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css 2008-02-22 17:09:52 UTC (rev 8822)
@@ -28,16 +28,17 @@
.oils-acq-picklist-entry-delete-link { font-size: 85%; }
#oils-acq-picklist-header-subtable tr { border: none; }
+/* po display */
#oils-acq-po-table thead tr { border: 1px solid #A1A1A1; }
#oils-acq-po-header {border: 1px solid #85C777;}
-#oils-acq-po-entry-header {border: 1px solid #85C777;}
+#oils-acq-po-li-header {border: 1px solid #85C777;}
#oils-acq-po-name { font-weight: bold; font-style: italic; }
.oils-acq-po-attributes { font-size: 90%; margin-left: 15px;}
-.oils-acq-po-entry-attributes { font-size: 90%; margin-left: 15px;}
+.oils-acq-po-li-attributes { font-size: 90%; margin-left: 15px;}
.oils-acq-po-records-phys_desc-row { border-bottom: 1px solid #6BA160; }
.oils-acq-po-po-td { border-style: solid; border-color: #A1A1A1; border-width: 0px 1px 0px 1px; }
.oils-acq-po-records-service-td { font-size: 85%; }
-.oils-acq-po-entry-delete-link { font-size: 85%; }
+.oils-acq-po-li-delete-link { font-size: 85%; }
#oils-acq-po-header-subtable tr { border: none; }
#oils-acq-list-header {border-bottom: 1px solid #6BA160;}
Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/po_li_summary.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/po_li_summary.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/po_li_summary.html 2008-02-22 17:09:52 UTC (rev 8822)
@@ -0,0 +1,11 @@
+<div id='oils-acq-po-li-header'>
+ ${_('Purchase Order Line Item')}
+ <div class='oils-acq-po-li-attributes'>
+ <%
+ ctime = _("Create date %(data)s") % {"data":c.oils.acq.po_li.value.create_time()}
+ etime = _("Last update time %(data)s") % {"data":c.oils.acq.po_li.value.edit_time()}
+ %>
+ <div>${ctime}</div>
+ <div>${etime}</div>
+ </div>
+</div>
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_lineitem.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_lineitem.html 2008-02-22 16:22:48 UTC (rev 8821)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/po/view_lineitem.html 2008-02-22 17:09:52 UTC (rev 8822)
@@ -4,5 +4,8 @@
<%def name='page_title()'>${_('Evergreen View PO')}</%def>
<%def name='block_content()'>
-Here's a line item
+
+<%include file='po_summary.html' />
+<%include file='po_li_summary.html' />
+
</%def>
More information about the open-ils-commits
mailing list