[open-ils-commits] r19249 - branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/result (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jan 21 15:20:47 EST 2011


Author: dbs
Date: 2011-01-21 15:20:42 -0500 (Fri, 21 Jan 2011)
New Revision: 19249

Modified:
   branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
Log:
Avoid hard-coded location IDs for displaying library / call number / copy location /copy status

Also use marcxml-full to get the copy location opac visibility attribute,
and remove the "hide_me" attribute to make the results visible by default.


Modified: branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/result/result_table.xml
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/result/result_table.xml	2011-01-21 19:50:39 UTC (rev 19248)
+++ branches/rel_2_0/Open-ILS/web/opac/skin/default/xml/result/result_table.xml	2011-01-21 20:20:42 UTC (rev 19249)
@@ -136,16 +136,15 @@
 
 								</td>
 							</tr>
-							<tr name="local_callnumber_list" class="result_table_title_cell hide_me">
+							<tr name="local_callnumber_list" class="result_table_title_cell">
 								<td>
-								<span type='opac/slot-data+holdings_xml' query='volumes'>
+								<span type='opac/slot-data+marcxml-full' query='volumes'>
 								<span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
 									var output = dojo.create('span'); 
 
 									var item_cnt = 0;
 									var max_items = 4;
 
-
 									dojo.query('volume', item).forEach(function(vol) {
 										if (item_cnt >= max_items) {
 											return output.innerHTML;
@@ -158,11 +157,11 @@
 												return;
 											}
 											var cp_entry = dojo.create('div');
-											var loc_id;
+											var loc_visible;
 											var vol_appended = false;
 											dojo.query('location', cp).forEach(function (location) {
-												loc_id = parseInt(location.getAttribute('ident'));
-												if (loc_id != 8 && loc_id != 20 && loc_id != 185 && loc_id != 156) {
+												loc_visible = location.getAttribute('opac_visible');
+												if (loc_visible == 't') {
 													if (!vol_appended) {
 														var cn = dojo.create('span', { style: "font-weight: bold;" }, cp_entry);
 														var cn_txt = dojo.doc.createTextNode(vol.getAttribute('label'));
@@ -174,7 +173,7 @@
 													loc.appendChild(loc_txt);
 												}
 											});
-											if (loc_id == 8 || loc_id == 20 || loc_id == 185 || loc_id == 156) {
+											if (loc_visible != 't') {
 												return;
 											}
 											dojo.query('circ_lib', cp).forEach(function (circ_lib) {



More information about the open-ils-commits mailing list