176a983f6332888c467404b0086fc418cf848333
[atutor.git] / docs / themes / default / admin / courses / courses.tmpl.php
1
2 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
3         <div class="input-form">
4                 <div class="row">
5                         <h3><?php echo _AT('results_found', $this->num_results); ?></h3>
6                 </div>
7
8                 <div class="row">
9                         <?php echo _AT('access'); ?><br />
10
11                         <input type="radio" name="access" value="0" id="s0" <?php if ($_GET['access'] == 0) { echo 'checked="checked"'; } ?> /><label for="s0"><?php echo _AT('public'); ?></label> 
12
13                         <input type="radio" name="access" value="1" id="s1" <?php if ($_GET['access'] == 1) { echo 'checked="checked"'; } ?> /><label for="s1"><?php echo _AT('protected'); ?></label> 
14
15                         <input type="radio" name="access" value="2" id="s2" <?php if ($_GET['access'] == 2) { echo 'checked="checked"'; } ?> /><label for="s2"><?php echo _AT('private'); ?></label>
16
17                         <input type="radio" name="access" value="" id="s" <?php if ($_GET['access'] == '') { echo 'checked="checked"'; } ?> /><label for="s"><?php echo _AT('all'); ?></label>
18                 </div>
19
20                 <div class="row">
21                         <label for="search"><?php echo _AT('search'); ?> (<?php echo _AT('title').', '._AT('description'); ?>)</label><br />
22                         <input type="text" name="search" id="search" size="20" value="<?php echo htmlspecialchars($_GET['search']); ?>" />
23                 </div>
24
25                 <div class="row buttons">
26                         <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>" />
27                         <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" />
28                 </div>
29         </div>
30 </form>
31
32 <?php print_paginator($this->page, $this->num_results, $this->page_string . SEP . $this->order .'='. $col, $this->results_per_page); ?>
33
34 <form name="form" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
35
36 <table class="data" summary="List of courses by title, instructor, access, category, creation date, enrollment, and alumni." rules="cols">
37 <colgroup>
38         <?php if ($col == 'title'): ?>
39                 <col />
40                 <col class="sort" />
41                 <col span="6" />
42         <?php elseif($col == 'login'): ?>
43                 <col span="2" />
44                 <col class="sort" />
45                 <col span="5" />
46         <?php elseif($col == 'access'): ?>
47                 <col span="3" />
48                 <col class="sort" />
49                 <col span="4" />
50         <?php elseif($col == 'created_date'): ?>
51                 <col span="4" />
52                 <col class="sort" />
53                 <col span="3" />
54         <?php elseif($col == 'cat_name'): ?>
55                 <col span="5" />
56                 <col class="sort" />
57                 <col span="2" />
58         <?php endif; ?>
59 </colgroup>
60 <thead>
61 <tr>
62         <th scope="col">&nbsp;</th>
63         <th scope="col"><a href="mods/_core/courses/admin/courses.php?<?php echo $this->orders[$this->order]; ?>=title<?php echo $page_string; ?>"><?php echo _AT('title');               ?></a></th>
64         <th scope="col"><a href="mods/_core/courses/admin/courses.php?<?php echo $this->orders[$this->order]; ?>=login<?php echo $page_string; ?>"><?php echo _AT('Instructor');          ?></a></th>
65         <th scope="col"><a href="mods/_core/courses/admin/courses.php?<?php echo $this->orders[$this->order]; ?>=access<?php echo $page_string; ?>"><?php echo _AT('access');             ?></a></th>
66         <th scope="col"><a href="mods/_core/courses/admin/courses.php?<?php echo $this->orders[$this->order]; ?>=created_date<?php echo $page_string; ?>"><?php echo _AT('created_date'); ?></a></th>
67         <th scope="col"><a href="mods/_core/courses/admin/courses.php?<?php echo $this->orders[$this->order]; ?>=cat_name<?php echo $page_string; ?>"><?php echo _AT('category'); ?></a></th>
68         <th scope="col"><?php echo _AT('enrolled'); ?></th>
69         <th scope="col"><?php echo _AT('alumni'); ?></th>
70 </tr>
71 </thead>
72 <tfoot>
73 <tr>
74         <td colspan="8"><input type="submit" name="view" value="<?php echo _AT('view'); ?>" /> 
75                                         <input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> 
76                                         <input type="submit" name="backups" value="<?php echo _AT('backups'); ?>" /> 
77                                         <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" /></td>
78 </tr>
79 </tfoot>
80 <tbody>
81 <?php if ($this->num_rows): ?>
82         <?php while ($row = mysql_fetch_assoc($this->result)): ?>
83                 <tr onkeydown="document.form['m<?php echo $row['course_id']; ?>'].checked = true; rowselect(this);" onmousedown="document.form['m<?php echo $row['course_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['course_id']; ?>">
84                         <td><input type="radio" name="id" value="<?php echo $row['course_id']; ?>" id="m<?php echo $row['course_id']; ?>" /></td>
85                         <td><label for="m<?php echo $row['course_id']; ?>"><?php echo AT_print($row['title'], 'courses.title'); ?></label></td>
86                         <td><?php echo AT_print($row['login'],'members.login'); ?></td>
87                         <td><?php echo _AT($row['access']); ?></td>
88                         <td><?php echo AT_date($startend_date_long_format, $row['created_date'], AT_DATE_UNIX_TIMESTAMP); ?></td>
89                         <td><?php echo ($row['cat_name'] ? $row['cat_name'] : '-')?></td>
90                         <td><?php echo ($this->enrolled[$row['course_id']]['y'] ? $this->enrolled[$row['course_id']]['y'] : 0); ?></td>
91                         <td><?php echo ($this->enrolled[$row['course_id']]['a'] ? $this->enrolled[$row['course_id']]['a'] : 0); ?></td>
92                 </tr>
93         <?php endwhile; ?>
94 <?php else: ?>
95         <tr>
96                 <td colspan="8"><?php echo _AT('none_found'); ?></td>
97         </tr>
98 <?php endif; ?>
99 </tbody>
100 </table>
101 </form>