when viewing a selection list, show a link to the related lineitem PO if necessary
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Oct 2009 21:12:24 +0000 (21:12 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 13 Oct 2009 21:12:24 +0000 (21:12 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14403 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/templates/default/acq/common/li_table.tt2

index d52b453..53e6fa3 100644 (file)
@@ -183,6 +183,11 @@ function AcqLiTable() {
         dojo.query('[name=notes_count]', row)[0].innerHTML = li.lineitem_notes().length;
         dojo.query('[name=noteslink]', row)[0].onclick = function() {self.drawLiNotes(li)};
 
+        if(li.purchase_order() && !this.isPO) {
+            openils.Util.show(nodeByName('po', row), 'inline');
+            nodeByName('po_link', row).setAttribute('href', oilsBasePath + '/acq/po/view/' + li.purchase_order());
+        }
+
         var countNode = nodeByName('count', row);
         countNode.innerHTML = li.item_count() || 0;
         countNode.id = 'acq-lit-copy-count-label-' + li.id();
index 52a7981..291669c 100644 (file)
                             <tbody>
                                 <tr>
                                     <td rowspan='2' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></img></td>
-                                    <td style='width:70%;font-weight:bold;'><a attr='title' href='javascript:void(0);'></a></td>
+                                    <td style='width:70%;font-weight:bold;'>
+                                        <a attr='title' href='javascript:void(0);'></a>
+                                        <span name='po' class='hidden'>(<a name='po_link' href='javascript:void(0);'>PO</a>)</span>
+                                    </td>
                                     <td rowspan='2' style='text-align:right'>
                                     </td>
                                 </tr>