Commits

rgrp  committed 2136486

[templates][s]: add new pd icon stuff into search results and do some minor tidying up.

  • Participants
  • Parent commits 78a5a47

Comments (0)

Files changed (4)

File pdw/templates/common.html

 
   <div py:def="person_list_link(person, dates=True)" py:strip="">
 	<li class="pd${str(person.pd).replace('.','')}">
-	<a href="${person.url}">${person.name}<py:if test="not person.name">UNKNOWN</py:if>
-	<py:if test="dates">
-	[${person.birth_date} - ${person.death_date}]
-      	</py:if></a>
-      	<py:if test="person.works">
-	<b>works</b>: ${len(person.works)}
-	</py:if>
-	<py:if test="person.items">
-	<b>items</b>: ${len(person.items)}
-	</py:if>
-    	</li>
-
+    <a href="${person.url}">${person.name}<py:if test="not person.name">UNKNOWN</py:if>
+    <py:if test="dates">
+	[${person.birth_date} - ${person.death_date}]</py:if></a>
+      (<strong>${len(person.works)}</strong> works, <strong>${len(person.items)}</strong> items)
+    </li>
   </div>
 
   <div py:def="work_list_link(work)" py:strip="" py:choose="work.pd">

File pdw/templates/person/list.html

   
   <py:def function="page_title">Persons - Index</py:def>
 
-        <div py:match="content">
-	  <h2>Persons</h2>
-          <py:if test="len(c.paginator)">
-            <p>${ c.paginator.pager('~2~') }</p>
-
-            <ul class="showpd">
-              <py:for each="person in c.paginator">
-                  ${person_list_link(person)}
-              </py:for>
-            </ul>
-
-            <p>${ c.paginator.pager('~2~') }</p>
-
-          </py:if>
+  <div py:match="content">
+    <h2>Persons</h2>
+    <py:if test="len(c.paginator)">
+      <p>${ c.paginator.pager('~2~') }</p>
+      <ul class="showpd">
+        <py:for each="person in c.paginator">
+            ${person_list_link(person)}
+        </py:for>
+      </ul>
+      <p>${ c.paginator.pager('~2~') }</p>
+    </py:if>
   </div>
 
   <xi:include href="layout.html" />

File pdw/templates/person/search.html

       </p>
     </form>
     <py:if test="c.had_query">
-	  <p>There are <strong>${c.total} results</strong>.</p>
-          <py:if test="len(c.paginator)">
-            <p>${ c.paginator.pager('~2~', q=c.q) }</p>
-
-			<ul>
-				<li py:for="p in c.paginator">
+      <p>There are <strong>${c.total} results</strong>.</p>
+      <py:if test="len(c.paginator)">
+      <p>${ c.paginator.pager('~2~', q=c.q) }</p>
+      <ul class="showpd">
+        <py:for each="p in c.paginator">
           ${person_list_link(p)} 
-				</li>
-			</ul>
-            <p>${ c.paginator.pager('~2~', q=c.q) }</p>
-          </py:if>
+        </py:for>
+      </ul>
+      <p>${ c.paginator.pager('~2~', q=c.q) }</p>
+      </py:if>
     </py:if>
   </div>
 

File pdw/templates/work/search.html

       </p>
     </form>
     <py:if test="c.had_query">
-		<p>There are <strong>${c.total} results</strong>.</p>
-          <py:if test="len(c.paginator)">
-            <p>${ c.paginator.pager('~2~', q=c.q) }</p>
-			<ul>
-				<li py:for="p in c.paginator">
+      <p>There are <strong>${c.total} results</strong>.</p>
+      <py:if test="len(c.paginator)">
+      <p>${ c.paginator.pager('~2~', q=c.q) }</p>
+      <ul class="showpd">
+        <py:for each="p in c.paginator">
           ${work_list_link(p)} 
-				</li>
-			</ul>
-            <p>${ c.paginator.pager('~2~', q=c.q) }</p>
-          </py:if>
+        </py:for>
+      </ul>
+      <p>${ c.paginator.pager('~2~', q=c.q) }</p>
+      </py:if>
     </py:if>
   </div>