[open-ils-commits] r576 - in conifer/trunk: tools web/opac/skin/default/js web/opac/skin/default/xml/rdetail xul/server/patron (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jul 9 17:26:13 EDT 2009


Author: dbs
Date: 2009-07-09 17:26:08 -0400 (Thu, 09 Jul 2009)
New Revision: 576

Added:
   conifer/trunk/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
Modified:
   conifer/trunk/tools/patch_conifer.sh
   conifer/trunk/web/opac/skin/default/js/rdetail.js
   conifer/trunk/xul/server/patron/util.js
Log:
First cut at updating skins, etc, to rel_1_6 standards


Modified: conifer/trunk/tools/patch_conifer.sh
===================================================================
--- conifer/trunk/tools/patch_conifer.sh	2009-07-09 20:41:44 UTC (rev 575)
+++ conifer/trunk/tools/patch_conifer.sh	2009-07-09 21:26:08 UTC (rev 576)
@@ -88,10 +88,7 @@
 		done
 		sed -i -e "s/\/$skin\/css\/layout.css/\/$skin\_test\/css\/layout.css/" "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/xml/common/css_common.xml
 
-		if [ "$skin" == "lul" ]
-		then
-			sed -i -e 's/var googleBooksLink = true/var googleBooksLink = false/' "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/js/result_common.js
-		fi
+		sed -i -e 's/var googleBooksLink = true/var googleBooksLink = false/' "$INSTALL_DIR"/var/web/opac/skin/"$skin"_test/js/result_common.js
 
 		# Make global config default to grouping metarecords and formats
 		sed -i -e 's/var SHOW_MR_DEFAULT = false/var SHOW_MR_DEFAULT = true/' "$INSTALL_DIR"/var/web/opac/common/js/config.js
@@ -102,10 +99,11 @@
 # We need the Canuck patch in place. Save us, Canuck patch!
 copy_xul()
 {
-	cp -r "$LOCAL_EXPORT_DIR"/trunk/xul/server/patron/ue_config.js "$INSTALL_DIR"/var/web/xul/server/patron/ue_config.js
+	cp "$LOCAL_EXPORT_DIR"/trunk/xul/server/cat/* "$INSTALL_DIR"/var/web/xul/server/cat/.
+	cp "$LOCAL_EXPORT_DIR"/trunk/xul/server/patron/* "$INSTALL_DIR"/var/web/xul/server/patron/.
 }
 
-# We'll need to restart Perl services after an update of circ rules
+# Update our circ rules
 copy_circ_rules()
 {
 	for circ_rule in `ls -1 "$LOCAL_EXPORT_DIR"/trunk/circ/*`
@@ -115,7 +113,6 @@
 		then echo -n
 		else
 			cp --backup=numbered "$circ_rule" "$INSTALL_DIR"/var/circ/.
-			osrf_ctl.sh -a restart_perl > /dev/null
 		fi
 	done
 }

Modified: conifer/trunk/web/opac/skin/default/js/rdetail.js
===================================================================
--- conifer/trunk/web/opac/skin/default/js/rdetail.js	2009-07-09 20:41:44 UTC (rev 575)
+++ conifer/trunk/web/opac/skin/default/js/rdetail.js	2009-07-09 21:26:08 UTC (rev 576)
@@ -197,8 +197,8 @@
 	dojo.require('openils.PermaCrud');
 
 	win.xulG = {
-		"record" : {"marc" : rec.marc()},
-		"save" : {
+		"record": {"marc": rec.marc()},
+		"save": {
 			"label": opac_strings.SAVE_MFHD_LABEL,
 			"func": function(xmlString) {
 				rec.marc(xmlString);
@@ -229,14 +229,15 @@
 }
 
 function _holdingsDrawMFHD(holdings, entryNum) {
-	var here = findOrgUnit(getLocation());
-	if (getDepth() > 0 || getDepth === 0 ) {
-		while (getDepth() < findOrgDepth(here))
-		here = findOrgUnit( here.parent_ou() );
+        var here = findOrgUnit(getLocation());
+        if (getDepth() > 0 || getDepth === 0 ) {
+                while (getDepth() < findOrgDepth(here))
+                here = findOrgUnit( here.parent_ou() );
 		if (!orgIsMine(findOrgUnit(here), findOrgUnit(holdings.owning_lib()))) {
 			return null;
 		}
-	}
+        }
+
 	var hh = holdings.holdings();
 	var hch = holdings.current_holdings();
 	var hs = holdings.supplements();
@@ -246,16 +247,17 @@
 	var ho = holdings.online();
 	var hm = holdings.missing();
 	var hinc = holdings.incomplete();
+	var hloc = holdings.location() || 'MFHD';
 
 	if (	hh.length == 0 && hch.length == 0 && hs.length == 0 &&
 		hcs.length == 0 && hi.length == 0 && hci.length == 0 &&
-		ho.length == 0 && hm.length == 0 && hinc.length == 0
+		ho.length == 0 && hm.length == 0 && hinc.length == 0 && !isXUL()
 	) {
 		return null;
 	}
 
 	dojo.place("<table style='width: 100%;'><caption id='mfhdHoldingsCaption' class='rdetail_header color_1'>" +
-		dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [holdings.location()]) +
+		dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) +
 		"</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
 		"'></tbody></table>", "rdetail_details_table", "after"
 	);
@@ -686,7 +688,7 @@
 	if( rdetailShowLocal && getLocation() != globalOrgTree.id() ) {
 		var loc = findOrgUnit(getLocation());
 		if( node ) {
-			if( !orgIsMine(node, loc) && !orgIsMine(loc, node) ) return;
+			if( !orgIsMine(node, loc) && !orgIsMine(loc,node) ) return;
 		} else {
 			for( var i = 0; i < globalOrgTree.children().length; i++ ) {
 				var org = findOrgUnit(globalOrgTree.children()[i]);

Added: conifer/trunk/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
===================================================================
--- conifer/trunk/web/opac/skin/default/xml/rdetail/rdetail_summary.xml	                        (rev 0)
+++ conifer/trunk/web/opac/skin/default/xml/rdetail/rdetail_summary.xml	2009-07-09 21:26:08 UTC (rev 576)
@@ -0,0 +1,158 @@
+
+<abbr class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+	<table id='rdetail_details_table'>
+		<tbody id='rdetail_details_tbody'>
+
+			<tr>
+				<td id='rdetail_image_cell' rowspan='20'>
+					<a id='rdetail_img_link'>
+						<img style='border: none;' id='rdetail_image' 
+                            onerror='
+                                hideMe($("rdetail.jacket_attrib_div"));
+                                hideMe($("rdetail_img_link"));'/>
+					</a>
+                    <!-- vendor attribution link -->
+                    <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+                        <div>&opac.image_provided;</div>
+                        <div><a target='_blank' href='&vendor.base_link;' 
+                            class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+                    </div>
+				</td>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>		
+                <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                     *** summary screen with more and/or different information.  In this case, the raw MARC 245. -->
+                <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item' id='rdetail_title'> </td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>		
+				<td class='rdetail_item'>
+					<a title='&rdetail.author.search;' id='rdetail_author'> </a>
+				</td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>			
+				<td class='rdetail_item' id='rdetail_isbn'> </td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>		
+				<td class='rdetail_item' id='rdetail_edition'> </td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>		
+				<td class='rdetail_item' id='rdetail_pubdate'> </td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>		
+				<td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item' id='rdetail_publisher'> </td>
+			</tr>
+
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>		
+				<td class='rdetail_item' id='rdetail_physical_desc'> </td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>			
+				<td class='rdetail_item'>
+					<img id='rdetail_tor_pic' class='tor_pic' />
+					<span id='rdetail_tor' style='padding-left: 5px;'> </span>
+				</td>
+			</tr>
+
+			<tr>
+				<td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>	
+				<td class='rdetail_item' id='rdetail_abstract'> </td>
+			</tr>
+
+            <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                 *** summary screen with complex information, such as new search links on subjects. -->
+            <tr>
+                <td nowrap='nowrap' class='rdetail_desc'>Subjects</td>
+                <td type='opac/slot-data' query='datafield[tag=650]' class='rdetail_item'>
+                    <script type='opac/slot-format'><![CDATA[
+                        var cgi = new CGI();
+                        var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+                        var total = '';
+                        var output = [];
+                        var list = dojo.query( 'subfield', item );
+                        for (var i =0; i < list.length; i++) {
+                            total += dojox.data.dom.textContent(list[i]) + ' ';
+                            var current = '<a href="rresult.xml?rt=subject&t=' + total;
+                            for (var p in other_params) {
+                                if (cgi.param(other_params[p]))
+                                    current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+                            }
+                            current += '">' + dojox.data.dom.textContent(list[i]) + '</a>'
+                            output.push(current);
+                        }
+                        return '<span>' + output.join(' &#x2d;&#x2d; ') + '</span><br/>';
+                    ]]></script>
+                </td>
+            </tr>
+
+			<tr class='hide_me' id='rdetail_online_row'>
+				<!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+				     *** summary screen with complex information, such as location-specific URIs (856$9). -->
+   				<td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;
+					<span class='hide_me' type='opac/slot-data' query='datafield[tag=856] subfield[code=9]'>
+						<script type='opac/slot-format'><![CDATA[
+							// There exists at least one localized URI. Clear all links.
+							dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+							return '';
+						]]></script>
+					</span>
+				</td>
+				<td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes > volume > uris > uri' join=", ">
+					<script type='opac/slot-format'><![CDATA[
+						var link = '<a href="' + item.getAttribute('href') + '" class="classic_link">' + item.getAttribute('label') + '</a>';
+						if (item.getAttribute('use_restriction'))
+							link += ' (' + item.getAttribute('use_restriction') + ') <br />';
+						return link;
+					]]></script>
+				</td>
+			</tr>
+
+		</tbody>
+	</table>
+
+	<!-- Empty span used for creating unAPI links -->
+	<abbr name="unapi" class="unapi-id">
+		<!-- unAPI URI goes here -->
+	</abbr>
+
+	<script language='javascript' type='text/javascript'><![CDATA[
+
+		config.ids.rdetail.details_body		= 'rdetail_details_body'; 
+		config.ids.rdetail.title				= 'rdetail_title';
+		config.ids.rdetail.author				= 'rdetail_author';
+		config.ids.rdetail.isbn					= 'rdetail_isbn';
+		config.ids.rdetail.edition				= 'rdetail_edition';
+		config.ids.rdetail.pubdate				= 'rdetail_pubdate';
+		config.ids.rdetail.publisher			= 'rdetail_publisher';
+		config.ids.rdetail.tor					= 'rdetail_tor';
+		config.ids.rdetail.abstr				= 'rdetail_abstract';
+		config.ids.rdetail.image				= 'rdetail_image';
+		config.ids.rdetail.tor_pic				= 'rdetail_tor_pic';
+
+        dojo.addOnLoad( function () {
+            var here = findOrgUnit(getLocation());
+            if (getDepth() > 0 || getDepth === 0 ) {
+                while (getDepth() < findOrgDepth(here))
+                    here = findOrgUnit( here.parent_ou() );
+            }
+
+            dojo.require('openils.BibTemplate');
+            new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+        });
+	]]></script>
+
+</div> <!-- details_body -->
+

Modified: conifer/trunk/xul/server/patron/util.js
===================================================================
--- conifer/trunk/xul/server/patron/util.js	2009-07-09 20:41:44 UTC (rev 575)
+++ conifer/trunk/xul/server/patron/util.js	2009-07-09 21:26:08 UTC (rev 576)
@@ -6,7 +6,7 @@
 patron.util.EXPORT_OK	= [ 
 	'columns', 'mbts_columns', 'mb_columns', 'mp_columns', /*'std_map_row_to_column',*/ 'std_map_row_to_columns',
 	'retrieve_au_via_id', 'retrieve_fleshed_au_via_id', 'retrieve_fleshed_au_via_barcode', 'set_penalty_css', 'retrieve_name_via_id',
-    'merge'
+    'merge', 'ausp_columns'
 ];
 patron.util.EXPORT_TAGS	= { ':all' : patron.util.EXPORT_OK };
 



More information about the open-ils-commits mailing list