[Pypi-checkins] r895 - trunk/pypi/templates

martin.von.loewis python-checkins at python.org
Fri Mar 11 10:03:46 CET 2011


Author: martin.von.loewis
Date: Fri Mar 11 10:03:44 2011
New Revision: 895

Modified:
   trunk/pypi/templates/display.pt
Log:
Add documentation link into the top of the page.


Modified: trunk/pypi/templates/display.pt
==============================================================================
--- trunk/pypi/templates/display.pt	(original)
+++ trunk/pypi/templates/display.pt	Fri Mar 11 10:03:44 2011
@@ -21,8 +21,13 @@
 <metal:fill fill-slot="body">
 <p style="font-style: italic" tal:content="data/release/summary | nothing" />
 
-<p tal:condition="python:len(data['release'].get('description', ''))>500 and data['files']">
-    <a href="#downloads">Downloads &darr;</a>
+<p tal:define="
+  cond1 python:len(data['release'].get('description',''))>500 and data['files'];
+  cond2 data/docs | nothing"
+  tal:condition="python:cond1 or cond2">
+ <a tal:condition="cond1" href="#downloads">Downloads &darr;</a>
+   <tal:block tal:condition="python:cond1 and cond2"> | </tal:block>
+   <a tal:condition="cond2" tal:attributes="href data/docs">Package Documentation</a>
 </p>
 
 <p tal:condition="not:data/usinglatest">


More information about the Pypi-checkins mailing list