53f0cf3e39fc5f2e8ab8638cb88bc59ee51f8ac2
[atutor.git] / docs / themes / default / admin / courses / course_categories.tmpl.php
1 <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
2 <table summary="" class="data" rules="cols" align="center" style="width: 95%;">
3
4 <thead>
5 <tr>
6         <th scope="col">&nbsp;</th>
7         <th scope="col"><?php echo _AT('name'); ?></th>
8         <th scope="col"><?php echo _AT('parent'); ?></th>
9 <?php if (defined('AT_ENABLE_CATEGORY_THEMES') && AT_ENABLE_CATEGORY_THEMES) : ?>
10         <th scope="col"><?php echo _AT('theme'); ?></th>
11 <?php endif; ?>
12 </tr>
13 </thead>
14 <tfoot>
15 <tr>
16         <td colspan="4">
17                 <div class="row buttons">
18                 <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" /> 
19                 </div>
20         </td>
21 </tr>
22 </tfoot>
23 <tbody>
24 <?php
25
26 if ($row = mysql_fetch_assoc($this->result)): ?>
27         <?php
28         do {
29                 $parent_cat_name = '';
30                 if ($row['cat_parent']) {
31                         // won't work
32                         $parent_cat_name = $this->row_cat['cat_name'];
33                 } 
34         ?>
35                 <tr onmousedown="document.form['m<?php echo $row['cat_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['cat_id']; ?>">
36                         <td width="10"><input type="radio" name="cat_id" value="<?php echo $row['cat_id']; ?>" id="m<?php echo $row['cat_id']; ?>" /></td>
37                         <td><label for="m<?php echo $row['cat_id']; ?>"><?php echo AT_print($row['cat_name'], 'course_cats.cat_name'); ?></label></td>
38                                 <td><?php echo AT_print($parent_cat_name, 'course_cats.cat_name'); ?></td>
39                         <?php if (defined('AT_ENABLE_CATEGORY_THEMES') && AT_ENABLE_CATEGORY_THEMES) : ?>
40                                 <td><?php echo AT_print(get_theme_name($row['theme']), 'themes.title'); ?></td>
41                         <?php endif; ?>
42
43                 </tr>
44         <?php } while ($row = mysql_fetch_assoc($this->result)); ?>
45 <?php else: ?>
46         <tr>
47                 <td colspan="3"><?php echo _AT('none_found'); ?></td>
48         </tr>
49 <?php endif; ?>
50 </tbody>
51 </table>
52
53 </form>