pushed view-in-catalog link up to the main lineitem display.
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jul 2010 21:16:59 +0000 (21:16 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Jul 2010 21:16:59 +0000 (21:16 +0000)
moved pl/po/worksheet/catalog links to a row of their own for a more consistent location (visually).
replaced 'PO:' 'PL:' with small icons to easier catch the eye;
added 'worksheet' tag to the worksheet icon for clarity
TODO: plug in bib discovery and linking mechanism for freerange lineitems

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17004 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index abeb2ae..c865237 100644 (file)
@@ -274,6 +274,14 @@ function AcqLiTable() {
             );
         }
 
+        if(li.eg_bib_id()) {
+            openils.Util.show(nodeByName('catalog', row), 'inline');
+            nodeByName("catalog_link", row).onclick = this.generateMakeRecTab(li.eg_bib_id());
+        } else {
+            // TODO: Add discovery mechanism for bib linking
+            openils.Util.show(nodeByName('link_to_catalog', row), 'inline');
+        }
+
         nodeByName("worksheet_link", row).href =
             oilsBasePath + "/acq/lineitem/worksheet/" + li.id();
 
@@ -305,7 +313,7 @@ function AcqLiTable() {
                 openils.Util.show(nodeByName('po', row), 'inline');
                 var link = nodeByName('po_link', row);
                 link.setAttribute('href', oilsBasePath + '/acq/po/view/' + li.purchase_order());
-                link.innerHTML = 'PO: ' + po.name(); // TODO i18n
+                link.innerHTML += po.name();
             }
         }
 
@@ -318,13 +326,16 @@ function AcqLiTable() {
                     ['open-ils.acq', 'open-ils.acq.picklist.retrieve'],
                     {params: [this.authtoken, li.picklist()]});
             if (pl) {
-                if (pl.name() == "")
+                if (pl.name() == "") {
                     openils.Util.show(nodeByName("bib_origin", row), "inline");
 
-                openils.Util.show(nodeByName('pl', row), 'inline');
-                var link = nodeByName('pl_link', row);
-                link.setAttribute('href', oilsBasePath + '/acq/picklist/view/' + li.picklist());
-                link.innerHTML = 'PL: '+pl.name(); // TODO i18n
+                } else {
+
+                    openils.Util.show(nodeByName('pl', row), 'inline');
+                    var link = nodeByName('pl_link', row);
+                    link.setAttribute('href', oilsBasePath + '/acq/picklist/view/' + li.picklist());
+                    link.innerHTML += pl.name();
+                }
             }
         }
 
@@ -839,24 +850,6 @@ function AcqLiTable() {
                 oilsBasePath + "/acq/lineitem/related/" + li.id();
         }
 
-        if(li.eg_bib_id()) {
-
-            openils.Util.show('acq-lit-info-cat-link');
-            var link = dojo.byId('acq-lit-info-cat-link').getElementsByTagName('a')[0];
-
-            if(openils.XUL.isXUL()) {
-
-                link.setAttribute('href', 'javascript:void(0);');
-                link.onclick = this.generateMakeRecTab( li.eg_bib_id() );
-
-            } else {
-                var href = link.getAttribute('href');
-                if(href.match(/=$/))
-                    link.setAttribute('href',  href + li.eg_bib_id());
-            }
-        } else {
-            openils.Util.hide('acq-lit-info-cat-link');
-        }
     };
 
     this.generateMakeRecTab = function(bib_id,default_view, row) {
index 9284aa6..6fc5456 100644 (file)
@@ -8,9 +8,6 @@
                 <tr id="acq-[% which_lc %]-info-row"><td name="label"/><td name="value"/></tr>
             </tbody>
         </table>
-        <div style="margin-top:10px;" class="hidden" id="acq-[% which_lc %]-info-cat-link">
-            View in the <a href="/opac/en-US/skin/default/xml/rdetail.xml?r=">Catalog</a>
-        </div>
 [% IF which == "Lit" %]
         <div class="hidden" id="acq-[% which_lc %]-info-related">
             Show the <a name="rel_link" href="#"><span name="related_number"></span> lineitem(s)</a> related to the same bibliographic record.
index 51a5bcd..6a1f026 100644 (file)
                         <table style='width:100%;'>
                             <tbody>
                                 <tr>
-                                    <td rowspan='2' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></td>
+                                    <td rowspan='3' style='width:43px;'><img style='width:40px;height:65px;' name='jacket'></td>
                                     <td style='width:70%;font-weight:bold;'>
                                         <span name="bib_origin" class="hidden">
                                             <img src="/opac/images/book-icon.png" />
                                         </span><a attr='title' href='javascript:void(0);'></a>
-                                        <span name="worksheet">(<a name="worksheet_link" href="javascript:void(0);">&#x270D;</a>)</span>
-                                        <span name='pl' class='hidden'>(<a name='pl_link' href='javascript:void(0);'></a>)</span>
-                                        <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>
                                         <span name='source_label'></span>
                                     </td>
                                 </tr>
+                                <tr>
+                                    <td colspan='0'>
+                                        <span name="catalog" class='hidden'><a title='Show In Catalog' name="catalog_link" href="javascript:void(0);">&#x279F; catalog</a></span> 
+                                        <span name="link_to_catalog" class='hidden'><a title='Link To Catalog Record' name="link_to_catalog_link" href="javascript:void(0);">&#x27BE; link to catalog</a></span> 
+                                        <span name="worksheet"> | <a title='Generate Worksheet' name="worksheet_link" href="javascript:void(0);">&#x270D; worksheet</a></span>
+                                        <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>
+                                    </td>
+                                </tr>
                             </tbody>
                         </table>
                     </td>
-                    <td><a name='copieslink' href='javascript:void(0);'>Copies(<span name='count'>0</span>)</a></td>
+                    <td><a title='FOOOBAR' name='copieslink' href='javascript:void(0);'>Copies(<span name='count'>0</span>)</a></td>
                     <td>
                         <a name='noteslink' href='javascript:void(0);'>Notes(<span name='notes_count'>0</span>)</a><span name="notes_alert_flag"></span>
                     </td>