af2cc2196362dfc5e9fae7d77392cbd492eaef82
[atutor.git] / docs / themes / simplified-desktop / admin / modules / version_history.tmpl.php
1 <?php 
2 //$this->module_list_array[$id]['history']
3 ?>
4 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
5 <div class="input-form">
6 <input type="hidden" name="id" value="<?php echo $this->id; ?>" />
7 <table class="data" summary="" style="width: 100%" rules="cols">
8 <thead>
9         <tr>
10                 <th scope="col">&nbsp;</th>
11                 <th scope="col"><?php echo _AT('version');?></th>
12                 <th scope="col"><?php echo _AT('publish_date');?></th>
13                 <th scope="col"><?php echo _AT('state');?></th>
14                 <th scope="col"><?php echo _AT('maintainers');?></th>
15                 <th scope="col"><?php echo _AT('notes');?></th>
16         </tr>
17 </thead>
18
19 <tfoot>
20 <tr>
21         <td colspan="6">
22                 <input type="submit" name="download" value="<?php echo _AT('download'); ?>" />
23                 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
24         </td>
25 </tr>
26 </tfoot>
27
28 <tbody>
29 <?php 
30 $num_of_versions = count($this->module_list_array[$this->id]['history']);
31
32 if ($num_of_versions == 0)
33 {
34 ?>
35
36 <tr>
37         <td colspan="7">
38 <?php 
39         echo _AT('none_found'); 
40 ?>
41         </td>
42 </tr>
43
44 <?php 
45 }
46 else
47 {
48         // display version list
49         if(is_array($this->module_list_array[$this->id]['history']))
50         {
51                 for ($i=0; $i < $num_of_versions; $i++)
52                 {
53 ?>
54         <tr onmousedown="document.form['m<?php echo $i; ?>'].checked = true; rowselect(this);"  id="r_<?php echo $i; ?>">
55                 <td><input type="radio" name="vid" value="<?php echo $i; ?>" id="m<?php echo $i; ?>" /></td>
56                 <td><label for="m<?php echo $i; ?>"><?php echo $this->module_list_array[$this->id]["name"] . ' ' .$this->module_list_array[$this->id]['history'][$i]["version"]; ?></label></td>
57                 <td><?php echo $this->module_list_array[$this->id]['history'][$i]["date"]; ?></td>
58                 <td><?php echo $this->module_list_array[$this->id]['history'][$i]["state"]; ?></td>
59                 <td><?php echo $this->module_list_array[$this->id]['history'][$i]["maintainer"]; ?></td>
60                 <td><?php echo $this->module_list_array[$this->id]['history'][$i]["notes"]; ?></td>
61         </tr>
62
63 <?php 
64                 }
65         }
66
67 ?>
68 </tbody>
69
70 <?php 
71 }
72 ?>
73 </table>
74
75 </div>
76 </form>