Stub of the new surveys.
[platal.git] / templates / survey / index.tpl
index 2d4890f..5523fc8 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2010 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 
 <h1>Sondages</h1>
 
+{if $active->total() > 0}
 <table class="bicol">
   <tr>
     <th>
       Sondages en cours
     </th>
   </tr>
-  {iterate item=s from=$survey_current}
-  <tr class="{cycle values="impair,pair"}">
-    <td class="half">
-      &bull;
-      <a href="survey/show/{$s.survey_id}">
-        {$s.title} ({$s.end|date_format:"%x"})
-      </a>
-    </td>
-  </tr>
-  {assign var="has_cs" value="true"}
-  {/iterate}
-  {if !$has_cs}
+  {iterate from=$active item=survey}
   <tr>
-    <td class="half">Aucun sondage en cours</td>
-  </tr>
-  {/if}
-</table>
-
-<br />
-
-<table class="bicol">
-  <tr>
-    <th>
-      Anciens sondages
-    </th>
-  </tr>
-  {iterate item=s from=$survey_old}
-  <tr class="{cycle values="impair,pair"}">
-    <td class="half">
-      &bull;
-      <a href="survey/show/{$s.survey_id}">
-        {$s.title} ({$s.end|date_format:"%x"})
-      </a>
+    <td>
+      <a href="survey/vote/{$survey->shortname}">{$survey->title}</a>
     </td>
   </tr>
-  {assign var="has_os" value="true"}
   {/iterate}
-  {if !$has_os}
-  <tr>
-    <td class="half">Aucun ancien sondage</td>
-  </tr>
-  {/if}
 </table>
-
-<a href="./survey/edit/new">Proposer un sondage</a>
+{/if}
 
 {* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}