The beginnings of the simplified-desktop theme
[atutor.git] / docs / themes / default / instructor / polls / index.tmpl.php
1 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
2 <table class="data" summary="Course polls listed by question, creation date and votes" rules="cols">
3 <colgroup>
4         <?php if ($this->col == 'question'): ?>
5                 <col />
6                 <col class="sort" />
7                 <col span="2" />
8         <?php elseif($this->col == 'created_date'): ?>
9                 <col span="2" />
10                 <col class="sort" />
11                 <col />
12         <?php elseif($this->col == 'total'): ?>
13                 <col span="3" />
14                 <col class="sort" />
15         <?php endif; ?>
16 </colgroup>
17 <thead>
18 <tr>
19         <th scope="col">&nbsp;</th>
20         <th scope="col"><a href="mods/_standard/polls/tools/index.php?<?php echo $this->orders[$this->order]; ?>=question"><?php echo _AT('question'); ?></a></th>
21         <th scope="col"><a href="mods/_standard/polls/tools/index.php?<?php echo $this->orders[$this->order]; ?>=created_date"><?php echo _AT('created'); ?></a></th>
22         <th scope="col"><a href="mods/_standard/polls/tools/index.php?<?php echo $this->orders[$this->order]; ?>=total"><?php echo _AT('total_votes'); ?></a></th>
23 </tr>
24 </thead>
25 <tfoot>
26 <tr>
27         <td colspan="4">
28                 <input type="submit" name="edit"   value="<?php echo _AT('edit'); ?>" />
29                 <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" />
30         </td>
31 </tr>
32 </tfoot>
33 <tbody>
34 <?php if ($row = mysql_fetch_assoc($this->result)) : ?>
35         <?php do { ?>
36                 <tr onmousedown="document.form['p_<?php echo $row['poll_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['poll_id']; ?>">
37                         <td><input type="radio" id="p_<?php echo $row['poll_id']; ?>" name="poll" value="<?php echo $row['poll_id']; ?>" /></td>
38                         <td><label for="p_<?php echo $row['poll_id']; ?>"><?php echo AT_print($row['question'], 'polls.question'); ?></label></td>
39                         <td><?php echo AT_DATE(_AT("server_date_format"), $row['created_date']); ?></td>
40                         <td><?php echo $row['total']; ?></td>
41                 </tr>
42         <?php } while($row = mysql_fetch_assoc($this->result)); ?>
43 <?php else: ?>
44         <tr>
45                 <td colspan="4"><?php echo _AT('none_found'); ?></td>
46         </tr>
47 <?php endif; ?>
48 </tbody>
49 </table>
50 </form>