[Pcsclite-cvs-commit] r3368 - in /website: matrix.py supported.template

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Mar 23 14:44:03 UTC 2009


Author: rousseau
Date: Mon Mar 23 14:44:02 2009
New Revision: 3368

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3368
Log:
do not link to an URL if the reader has none

Modified:
    website/matrix.py
    website/supported.template

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=3368&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Mon Mar 23 14:44:02 2009
@@ -135,10 +135,18 @@
 
         # for each reader
         for r in sorted(manufacturer_readers[m]):
-            main_layer.write_layer('reader',
+            url=supported_readers[r].get('url', "")
+            if (url):
+                main_layer.write_layer('reader_with_url',
                     manufacturer=m,
                     product=supported_readers[r]['iProduct'],
-                    url=supported_readers[r].get('url', ""),
+                    url=url,
+                    image="img/" + supported_readers[r].get('image',
+                        "no_image.png"))
+            else:
+                main_layer.write_layer('reader',
+                    manufacturer=m,
+                    product=supported_readers[r]['iProduct'],
                     image="img/" + supported_readers[r].get('image',
                         "no_image.png"))
     file_writer.close()

Modified: website/supported.template
URL: http://svn.debian.org/wsvn/pcsclite/website/supported.template?rev=3368&op=diff
==============================================================================
--- website/supported.template (original)
+++ website/supported.template Mon Mar 23 14:44:02 2009
@@ -30,10 +30,17 @@
 
     {reader}
     <ul>
+      <li><p>%product%</p>
+      <p><img src="%image%" alt="%manufacturer% %product%"></p></li>
+    </ul>
+    {/reader}
+
+    {reader_with_url}
+    <ul>
       <li><p><a href="%url%">%product%</a></p>
       <p><img src="%image%" alt="%manufacturer% %product%"></p></li>
     </ul>
-    {/reader}
+    {/reader_with_url}
 
     {/contents}
     <hr>




More information about the Pcsclite-cvs-commit mailing list