From 1630df7f602115e83589487fa5c7f44b0368eb2d Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 21 Jul 2010 21:35:50 +0000 Subject: [PATCH] added an 'Add Brief Record' button to the PO interface, which is visible when there are no lineitems on an existing PO. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17006 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/acq/po/view_po.js | 3 +++ Open-ILS/web/templates/default/acq/po/view.tt2 | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Open-ILS/web/js/ui/default/acq/po/view_po.js b/Open-ILS/web/js/ui/default/acq/po/view_po.js index a9dd76592..09e7862ae 100644 --- a/Open-ILS/web/js/ui/default/acq/po/view_po.js +++ b/Open-ILS/web/js/ui/default/acq/po/view_po.js @@ -381,11 +381,13 @@ function init() { ); var totalEstimated = 0; + var zeroLi = true; fieldmapper.standardRequest( ['open-ils.acq', 'open-ils.acq.lineitem.search'], { async: true, params: [openils.User.authtoken, {purchase_order:poId}, {flesh_attrs:true, flesh_notes:true, flesh_cancel_reason:true}], onresponse: function(r) { + zeroLi = false; liTable.show('list'); var li = openils.Util.readResponse(r); // TODO: Add po_item's to total estimated amount @@ -396,6 +398,7 @@ params: [openils.User.authtoken, {purchase_order:poId}, {flesh_attrs:true, flesh oncomplete : function() { dojo.byId("acq-po-view-total-estimated").innerHTML = totalEstimated.toFixed(2); if (liFocus) liTable.drawCopies(liFocus); + if(zeroLi) openils.Util.show('acq-po-no-lineitems'); } } ); diff --git a/Open-ILS/web/templates/default/acq/po/view.tt2 b/Open-ILS/web/templates/default/acq/po/view.tt2 index 6ff5b21ae..d345af08c 100644 --- a/Open-ILS/web/templates/default/acq/po/view.tt2 +++ b/Open-ILS/web/templates/default/acq/po/view.tt2 @@ -118,6 +118,11 @@ [% INCLUDE 'default/acq/common/li_table.tt2' %] [% INCLUDE "default/acq/common/notes.tt2" which = "Po" %] + [% INCLUDE "default/acq/po/item_table.tt2" %] [% END %] -- 2.11.0