Show LI summary in copies display page
authorBill Erickson <berick@esilibrary.com>
Mon, 25 Jul 2011 17:24:53 +0000 (13:24 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 25 Jul 2011 17:24:53 +0000 (13:24 -0400)
Using the new, self-contained Lineitem.fetchAndRender, show a full LI
summary along the top of the LI copies edit page.

Includes some minor layout smoothing

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/css/skin/default/acq.css
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/templates/default/acq/common/li_table.tt2

index 7844e17..91fceb4 100644 (file)
@@ -146,7 +146,7 @@ label[for="attr_search_type_scalar"] { vertical-align: top; }
 .acq-lit-po-heading td span a[attr="name"] { font-weight: bold; }
 #acq-lit-info-tbody td {padding:5px;}
 #acq-lit-info-related { margin-top: 10px; }
-#acq-lit-li-details-table {margin-top:20px;}
+#acq-lit-li-details-table {margin-top:5px;}
 #acq-lit-li-details-table td {padding:0px 3px 1px 3px;}
 #acq-lit-li-details-table th {padding:0px 3px 1px 3px; font-weight:bold;}
 #acq-lit-li-details-table .dijit {width:130px;}
@@ -252,3 +252,8 @@ span[name="bib_origin"] img { vertical-align: middle; }
 #acq-litpager-controls[disabled="true"] { color: #ccc; }
 
 .acq-po-info th { text-align: right; }
+#acq-lit-copies-li-summary { 
+    border: 1px #666 dashed;
+    margin-bottom: 15px;
+    padding: 4px;
+}
index 4068294..d3dad87 100644 (file)
@@ -921,6 +921,12 @@ function AcqLiTable() {
         if (typeof force_fetch == "undefined")
             force_fetch = false;
 
+        openils.acq.Lineitem.fetchAndRender(liId, {}, 
+            function(li, html) {
+                dojo.byId('acq-lit-copies-li-summary').innerHTML = html;
+            }
+        );
+
         this.show('copies');
         var self = this;
         this.copyCache = {};
index 645a0ae..6f4606c 100644 (file)
 
     <!-- Copies table -->
     <div id='acq-lit-li-details' class='hidden'>
-        <h2>Copies</h2>
+
+        <div id='acq-lit-copies-li-summary'></div>
+
+        <h3>Add/Edit Items</h3>
+        <hr/>
 
         <div class='acq-lit-li-menu-bar'>
             <table style='width:100%'>
             </table>
         </div>
 
+        <hr/>
+
         <table id='acq-lit-li-details-table'>
             <tbody><tr><td class='acq-lit-table-spacer' colspan='0'/></tr></tbody>
             <tbody style='font-weight:bold;'>