Acq: List provider code in lineitem lists
authorBill Erickson <berick@esilibrary.com>
Thu, 15 Sep 2011 18:57:19 +0000 (14:57 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 4 Nov 2011 21:16:30 +0000 (17:16 -0400)
Along with selection list and purchase order, when an item is attached
to a purchase order, also show the provider code

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/acq/common/li_table.tt2
Open-ILS/web/js/ui/default/acq/common/li_table.js

index 8f078ab..7b10181 100644 (file)
                                         <span name='pl' class='hidden'> | <a title='Select List' name='pl_link' href='javascript:void(0);'>&#x2756; </a></span>
                                         <span name='po' class='hidden'> | <a title='Purchase Order' name='po_link' href='javascript:void(0);'>&#x2318; </a></span>
                                         <span name="show_requests"> | <a title='Patron Requests' name="show_requests_link" href="javascript:void(0);">requests</a></span> 
+                                        <span name='pro' class='hidden'> | <a title='[% l('Provider') %]' name='pro_link' href='javascript:void(0);'>&#x235F; </a></span>
                                     </td>
                                 </tr>
                             </tbody>
index addf137..eb0b620 100644 (file)
@@ -391,6 +391,7 @@ function AcqLiTable() {
                     {params: [
                         this.authtoken, li.purchase_order(), {
                             "flesh_price_summary": true,
+                            "flesh_provider" : true,
                             "flesh_lineitem_count": true
                         }
                     ]});
@@ -399,6 +400,11 @@ function AcqLiTable() {
                 var link = nodeByName('po_link', row);
                 link.setAttribute('href', oilsBasePath + '/acq/po/view/' + li.purchase_order());
                 link.innerHTML += po.name();
+
+                openils.Util.show(nodeByName('pro', row), 'inline');
+                link = nodeByName('pro_link', row);
+                link.setAttribute('href', oilsBasePath + '/conify/global/acq/provider/' + po.provider().id())
+                link.innerHTML += po.provider().code();
             }
         }