(no commit message)
[atutor.git] / themes / mobile / content.tmpl.php
1 <?php\r
2 /****************************************************************/\r
3 /* ATutor                                                                                                               */\r
4 /****************************************************************/\r
5 /* Copyright (c) 2002-2009                                                                              */\r
6 /* Adaptive Technology Resource Centre / University of Toronto  */\r
7 /* http://atutor.ca                                                                                             */\r
8 /*                                                              */\r
9 /* This program is free software. You can redistribute it and/or*/\r
10 /* modify it under the terms of the GNU General Public License  */\r
11 /* as published by the Free Software Foundation.                                */\r
12 /****************************************************************/\r
13 if (!defined('AT_INCLUDE_PATH')) { exit; } ?>\r
14 \r
15 <?php if ($this->has_text_alternative || $this->has_audio_alternative || $this->has_visual_alternative || $this->has_sign_lang_alternative): ?>\r
16 <div id="alternatives_shortcuts">\r
17 <?php if ($this->has_text_alternative) :?>\r
18   <a href="<?php echo $_SERVER['PHP_SELF'].'?cid='.$this->cid.(($_GET['alternative'] == 3) ? '' : htmlentities_utf8(SEP).'alternative=3'); ?>">\r
19     <img src="<?php echo AT_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 3) ? 'pause.png' : 'text_alternative.png'); ?>" \r
20       alt="<?php echo (($_GET['alternative'] == 3) ? _AT('stop_apply_text_alternatives') : _AT('apply_text_alternatives')); ?>" \r
21       title="<?php echo (($_GET['alternative'] == 3) ? _AT('stop_apply_text_alternatives') : _AT('apply_text_alternatives')); ?>" \r
22       border="0" />\r
23   </a>\r
24 <?php endif; // END OF has text alternative?>\r
25 <?php if ($this->has_audio_alternative) :?>\r
26   <a href="<?php echo $_SERVER['PHP_SELF'].'?cid='.$this->cid.(($_GET['alternative'] == 1) ? '' : htmlentities_utf8(SEP).'alternative=1'); ?>">\r
27     <img src="<?php echo AT_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 1) ? 'pause.png' : 'audio_alternative.png'); ?>" \r
28       alt="<?php echo (($_GET['alternative'] == 1) ? _AT('stop_apply_audio_alternatives') : _AT('apply_audio_alternatives')); ?>" \r
29       title="<?php echo (($_GET['alternative'] == 1) ? _AT('stop_apply_audio_alternatives') : _AT('apply_audio_alternatives')); ?>" \r
30       border="0" />\r
31   </a>\r
32 <?php endif; // END OF has audio alternative?>\r
33 <?php if ($this->has_visual_alternative) :?>\r
34   <a href="<?php echo $_SERVER['PHP_SELF'].'?cid='.$this->cid.(($_GET['alternative'] == 4) ? '' : htmlentities_utf8(SEP).'alternative=4'); ?>">\r
35     <img src="<?php echo AT_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 4) ? 'pause.png' : 'visual_alternative.png'); ?>" \r
36       alt="<?php echo (($_GET['alternative'] == 4) ? _AT('stop_apply_visual_alternatives') : _AT('apply_visual_alternatives')); ?>" \r
37       title="<?php echo (($_GET['alternative'] == 4) ? _AT('stop_apply_visual_alternatives') : _AT('apply_visual_alternatives')); ?>" \r
38       border="0" />\r
39   </a>\r
40 <?php endif; // END OF has visual alternative?>\r
41 <?php if ($this->has_sign_lang_alternative) :?>\r
42   <a href="<?php echo $_SERVER['PHP_SELF'].'?cid='.$this->cid.(($_GET['alternative'] == 2) ? '' : htmlentities_utf8(SEP).'alternative=2'); ?>">\r
43     <img src="<?php echo AT_BASE_HREF; ?>images/<?php echo (($_GET['alternative'] == 2) ? 'pause.png' : 'sign_lang_alternative.png'); ?>" \r
44       alt="<?php echo (($_GET['alternative'] == 2) ? _AT('stop_apply_sign_lang_alternatives') : _AT('apply_sign_lang_alternatives')); ?>" \r
45       title="<?php echo (($_GET['alternative'] == 2) ? _AT('stop_apply_sign_lang_alternatives') : _AT('apply_sign_lang_alternatives')); ?>" \r
46       border="0" />\r
47   </a>\r
48 <?php endif; // END OF has sign language alternative?>\r
49 </div>\r
50 <?php endif; // END OF displaying alternative shortcut icons?>\r
51 \r
52 <?php \r
53 if ($_SESSION["prefs"]["PREF_SHOW_CONTENTS"] && $this->content_table <> "") \r
54         echo $this->content_table;\r
55 ?>\r
56 \r
57 <div id="content-text">\r
58         <?php echo $this->body; ?>\r
59 </div>\r
60 \r
61 <?php if (!empty($this->test_ids)): ?>\r
62 <div id="content-test" class="input-form">\r
63         <ol>\r
64                 <strong><?php echo _AT('tests') . ':' ; ?></strong>\r
65                 <li class="top-tool"><?php echo $this->test_message; ?></li>\r
66                 <ul class="tools">\r
67                 <?php \r
68                         foreach ($this->test_ids as $id => $test_obj){\r
69                                 echo '<li><a href="'.url_rewrite('mods/_standard/tests/test_intro.php?tid='.$test_obj['test_id'], AT_PRETTY_URL_IS_HEADER).'">'.\r
70                                         AT_print($test_obj['title'], 'tests.title').'</a><br /></li>';\r
71                         }\r
72                 ?>\r
73                 </ul>\r
74         </li></ol>\r
75 </div>\r
76 <?php endif; ?>\r
77 \r
78 <?php\r
79 \r
80 if (!empty($this->forum_ids)): ?>\r
81 <div id="content-test" class="input-form">\r
82     <ol>\r
83         <strong><?php echo _AT('forums') . ':' ; ?></strong>\r
84         <li class="top-tool"><?php echo $this->forum_message; ?></li>\r
85             <ul class="tools">\r
86                 <?php\r
87                 foreach ($this->forum_ids as $id => $forum_obj) {\r
88                     echo '<li><a href="'.url_rewrite('mods/_standard/forums/forum/index.php?fid='.$forum_obj['forum_id'], AT_PRETTY_URL_IS_HEADER).'">'.\r
89                         AT_print($forum_obj['title'], 'forums.title').'</a><br /></li>';\r
90                 }\r
91                 ?>\r
92             </ul>\r
93         </li>\r
94     </ol>\r
95 </div>\r
96 <?php endif; ?>\r
97 \r
98 \r
99 <div id="content-info">\r
100         <?php echo $this->content_info; ?>\r
101 \r
102 </div>