remove old readme
[atutor.git] / themes / default / instructor / groups / index.tmpl.php
1 <?php debug($this->group_type_rows);?>
2 <div class="input-form">
3 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" name="form">
4 <fieldset class="group_form" margin:auto;"><legend class="group_form"><?php echo _AT('groups'); ?></legend>
5 <table class="data" summary="" rules="cols" style="width: 80%">
6 <tfoot>
7 <tr>
8         <td>
9                 <input type="submit" name="edit"    value="<?php echo _AT('edit'); ?>" />
10                 <input type="submit" name="members" value="<?php echo _AT('members'); ?>" />
11                 <input type="submit" name="delete"  value="<?php echo _AT('delete'); ?>" />
12         </td>
13 </tr>
14 </tfoot>
15 <tbody>
16
17 <?php if (!empty($this->group_type_rows)): ?>
18
19                 <?php foreach ($this->group_type_rows as $type_id => $row): ?>
20                 <tr onmousedown="document.form['g<?php echo $row['type_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['type_id']; ?>">
21                         <th>
22                                 <input type="radio" id="g<?php echo $row['type_id']; ?>" name="id" value="<?php echo $row['type_id']; ?>" />
23                                 <label for="g<?php echo $row['type_id']; ?>"><?php echo AT_print($row['title'], 'groups.title'); ?></label> (<?php echo $this->num_groups.' '._AT('groups'); ?>)</td>
24                         </th>
25                 </tr>
26                 <?php endforeach; ?>
27                 <?php if ($num_groups) : ?>
28                         <?php while ($group_row = mysql_fetch_assoc($group_result)): ?>
29                                 <?php
30                                         $sql = "SELECT COUNT(*) AS cnt FROM ".TABLE_PREFIX."groups_members WHERE group_id=$group_row[group_id]";
31                                         $group_cnt_result = mysql_query($sql, $db);
32                                         $group_cnt = mysql_fetch_assoc($group_cnt_result);
33                                 ?>
34                                 <tr onmousedown="document.form['g<?php echo $row['type_id'].'_'.$group_row['group_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['type_id'].'_'.$group_row['group_id']; ?>">
35                                         <td class="indent"><input type="radio" id="g<?php echo $row['type_id'].'_'.$group_row['group_id']; ?>" name="id" value="<?php echo $row['type_id'].'_'.$group_row['group_id']; ?>" /> <label for="g<?php echo $row['type_id'].'_'.$group_row['group_id']; ?>"><?php echo AT_print($group_row['title'], 'groups.title'); ?></label> (<?php echo $group_cnt['cnt'].' '._AT('members'); ?>)</td>
36                                 </tr>
37                         <?php endwhile; ?>
38                 <?php else: ?>
39                         <tr>
40                                 <td class="indent"><strong><?php echo _AT('none_found'); ?></strong></td>
41                         </tr>
42                 <?php endif; ?>
43
44 <?php endif;?>
45 <?php if (empty($this->group_type_rows)): ?>
46 <?php else: ?>
47         <tr>
48                 <td><strong><?php echo _AT('none_found'); ?></strong></td>
49         </tr>
50 <?php endif;?>
51
52
53 </tbody>
54 </table>
55 </fieldset>
56 </form><br />
57 </div>