c7af3d24dc242639add3c96cdcfd01ad18f3c1ea
[atutor.git] / docs / themes / simplified-desktop / instructor / faq / index_instructor.tmpl.php
1
2
3 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form">
4 <div class="table-surround">
5 <table class="data" summary="View and edit frequently asked questions for the course">
6 <thead>
7 <tr>
8         <th>&nbsp;</th>
9         <th><?php echo _AT('name'); ?></th>
10 </tr>
11 </thead>
12 <tfoot>
13 <tr>
14         <td colspan="2"><input type="submit" name="edit" value="<?php echo _AT('edit'); ?>" /> 
15                                     <input type="submit" name="delete" value="<?php echo _AT('delete'); ?>" /></td>
16 </tr>
17 </tfoot>
18 <?php if (!empty($this->faq_topics)): ?>
19                 <?php foreach ($this->faq_topics as $topic_id => $row): ?>
20                                         <tr onmousedown="document.form['t<?php echo $row['topic_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['topic_id']; ?>_0">
21                                         <th style="border-top:1pt solid #e0e0e0;"><input type="radio" name="item" id="t<?php echo $row['topic_id']; ?>" value="<?php echo $row['topic_id']; ?>" /></th>
22                                         <th style="border-top:1pt solid #e0e0e0;"><?php echo AT_print($row['name'], 'faqs.topic'); ?></th>
23                                         </tr>
24         
25                         <?php if (!empty($row['entry_rows'])): ?>
26                                 <?php foreach($row['entry_rows'] as $question_row): ?>
27                                 <tr onmousedown="document.form['q<?php echo $question_row['entry_id']; ?>'].checked = true; rowselect(this);" id="r_<?php echo $row['topic_id']; ?>_<?php echo $question_row['entry_id']; ?>">
28                                         <td><input type="radio" name="item" id="q<?php echo $question_row['entry_id']; ?>" value="<?php echo $question_row['entry_id']; ?>q" /></td>
29                                         <td><?php echo AT_print($question_row['question'], 'faqs.question'); ?></td>
30                                 </tr>
31                                 <?php endforeach;?>
32                         
33                         <?php else:?>
34                         <tr>
35                                         <td>&nbsp;</td>
36                                         <td><?php echo _AT('no_questions'); ?></td>
37                                 </tr>
38                         <?php endif;?>
39                 <?php endforeach; ?>
40         <tbody>
41         
42                 
43         </tbody>
44 <?php else: ?>
45         <tr>
46                 <td colspan="2"><strong><?php echo _AT('none_found'); ?></strong></td>
47         </tr>
48 <?php endif; ?>
49 </table>
50 </div>
51 </form>