diff zpt/www/common_template.zpt @ 92:45c7b240ee93

book pages and lists.
author casties
date Wed, 15 May 2013 21:14:26 +0200
parents d2f75c879335
children 782477730916
line wrap: on
line diff
--- a/zpt/www/common_template.zpt	Wed May 15 19:42:23 2013 +0200
+++ b/zpt/www/common_template.zpt	Wed May 15 21:14:26 2013 +0200
@@ -80,6 +80,29 @@
   <!-- /short person entry -->
 
 
+  <!-- two-column book entry -->
+  <div class="mini book" metal:define-macro="book_col" 
+    tal:define="bookurl python:book.getUrl(baseUrl=bookroot); imageurl book/getImageUrl;">
+    <div class="type" tal:content="python:book.getInfo('pubtype')">Book</div>
+    <div class="thumb" tal:condition="imageurl">
+      <a tal:attributes="href bookurl"><img tal:condition="imageurl" tal:attributes="src imageurl" alt=""/></a>
+    </div>
+    <h2 tal:content="python:book.getInfo('title')">On historicizing epistemology : an essay</h2>
+    <div class="author">
+      <span tal:repeat="author python:book.getByPrefix('author_')">
+        <tal:block tal:define="url python:author[0]; name python:author[2];">
+          <a tal:attributes="href url" tal:omit-tag="not:url" tal:content="name" /><tal:block 
+            tal:condition="not:repeat/author/end">;</tal:block>
+        </tal:block>
+      </span>
+    </div>
+    <p>
+      <span tal:replace="structure python:book.getInfo('short_summary').replace('\n','<br/>\n')">Epistemology, as generally
+        understood by philosophers of science, is rather remote from the history of science and from historical concerns in general.</span>
+      <a tal:attributes="href bookurl" class="internal">More</a>
+    </p>
+  </div>
+  <!-- /two-column book entry -->
 
 </body>
 </html>