[open-ils-commits] r461 - in servres/trunk/conifer: . templates/phys (gfawcett)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed May 6 20:27:56 EDT 2009


Author: gfawcett
Date: 2009-05-06 20:27:55 -0400 (Wed, 06 May 2009)
New Revision: 461

Modified:
   servres/trunk/conifer/TODO
   servres/trunk/conifer/templates/phys/circlist_for_term.xhtml
Log:
Added link from circ-needs page to title-details in catalogue.

It's Evergreen-specific; that needs fixing.


Modified: servres/trunk/conifer/TODO
===================================================================
--- servres/trunk/conifer/TODO	2009-05-07 00:15:54 UTC (rev 460)
+++ servres/trunk/conifer/TODO	2009-05-07 00:27:55 UTC (rev 461)
@@ -24,6 +24,7 @@
 
 * manage z3950 targets? Search z3950 targets?
 
+* title-details links in circ-needs, that needs to be made non EG specific.
 MAYBE:
 
 * Generating barcodes in emails, printable screens? (3 of 9 enough?)

Modified: servres/trunk/conifer/templates/phys/circlist_for_term.xhtml
===================================================================
--- servres/trunk/conifer/templates/phys/circlist_for_term.xhtml	2009-05-07 00:15:54 UTC (rev 460)
+++ servres/trunk/conifer/templates/phys/circlist_for_term.xhtml	2009-05-07 00:27:55 UTC (rev 461)
@@ -2,6 +2,10 @@
 title = _('Wanted items: %s') % term
 from conifer.libsystems.z3950.marcxml import marcxml_dictionary_to_dc as to_dublin
 dc_keys = ['dc:title', 'dc:creator', 'dc:publisher', 'dc:date']
+from django.conf import settings
+lang = settings.LANGUAGE_CODE.replace('_','-')
+catalogue_pattern = 'http://%s/opac/%s/skin/default/xml/rdetail.xml?r=%%s'
+catalogue_pattern = catalogue_pattern % (settings.EVERGREEN_GATEWAY_SERVER, lang)
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:xi="http://www.w3.org/2001/XInclude"
@@ -17,16 +21,19 @@
       <thead>
 	<tr><th>#</th><th>Title</th><th>Author</th><th>Publisher</th><th>PubDate</th></tr>
       </thead>
-      <tbody py:for="resultnum, res in enumerate(w.marc() for w in wanted)"
+      <tbody py:for="resultnum, res in enumerate(w.marc() or {} for w in wanted)"
 	     py:with="dc=to_dublin(res)">
 	<tr>
 	  <td>${resultnum+1}.</td>
 	  <td>
 	    ${dc.get('dc:title', '???')}
-	    <a href="javascript:$('#full_${resultnum}').toggle(); void(0);">details</a>
+	    <a href="javascript:$('#full_${resultnum}').toggle(); void(0);">MARC</a>
 	    <p py:if="res.get('8569')" style="margin: 8px 0; font-size: 90%; color: darkred;">
 	      Electronic resource. <a href="${res.get('856u')}">view</a>
 	    </p>
+	    <div py:if="res.get('901c')" style="margin: 8px 0; font-size: 90%; color: darkred;">
+	      <a href="${catalogue_pattern % res.get('901c')}">Title details in catalogue</a>
+	    </div>
 	  </td>
 	  <td py:for="k in dc_keys[1:]">${dc.get(k) or '&mdash;'}</td>
 	</tr>



More information about the open-ils-commits mailing list