Display TADL ezproxy OPAC links in search results
authorJeff Godin <jgodin@tadl.org>
Tue, 3 Apr 2012 13:40:24 +0000 (09:40 -0400)
committerJeff Godin <jgodin@tadl.org>
Tue, 3 Apr 2012 13:40:24 +0000 (09:40 -0400)
Feature the auri when it appears to be a TADL ezproxy link.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/opac/skin/tadlv2/xml/result/result_table.xml

index 858d146..4c628eb 100644 (file)
                                         if (vol.getAttribute('opac_visible') == 'f') {
                                             return;
                                         }
+                                        dojo.query('uri', vol).forEach(function (uri) {
+                                            var urihref = uri.getAttribute('href');
+                                            var urilabel = uri.getAttribute('label');
+                                            if (urihref.substring(0,20) == "http://via.tadl.org/") {
+                                                var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
+                                                var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
+                                                var link_text = dojo.doc.createTextNode(urilabel);
+                                                link.appendChild(link_text);
+                                                output.appendChild(uri_entry);
+                                            }
+                                        });
                                         dojo.query('copy', vol).forEach(function (cp) {
                                             if (item_cnt >= max_items) {
                                                 return;