move code up one directory
[atutor.git] / themes / simplified-desktop / users / browse.tmpl.php
1 <?php require(AT_INCLUDE_PATH.'header.inc.php'); ?>
2 <?php if ($this->mobile_device_type == IPAD_DEVICE): ?><!--  smartphone theme only -->
3 <div class="column-login">
4 <div class="input-form">
5
6
7
8 <div id="hide-show-container" >
9         <h3><a id="results-hide-show-link" class="content-expand" href="javascript:void(0);" role="search"  aria-live="assertive"       tabindex="1" ><?php echo $this->num_results; echo " courses found."?></a></h3>
10 </div>
11 <div id="results-display">
12
13 <fieldset class="group_form"><legend class="group_form"><?php echo "Filter by:"; ?></legend>
14                 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
15                                 <div class="row">
16                                         
17                                         <fieldset><legend><?php echo _AT('access'); ?></legend>
18                                         <input type="radio" name="access" value="private" id="s1" <?php if ($_GET['access'] == 'private') { echo 'checked="checked"'; } ?> /><label for="s1"><?php echo _AT('private'); ?></label> 
19         
20                                         <input type="radio" name="access" value="protected" id="s2" <?php if ($_GET['access'] == 'protected') { echo 'checked="checked"'; } ?> /><label for="s2"><?php echo _AT('protected'); ?></label>
21
22                                         <input type="radio" name="access" value="public" id="s3" <?php if ($_GET['access'] == 'public') { echo 'checked="checked"'; } ?> /><label for="s3"><?php echo _AT('public'); ?></label>
23
24                                         <input type="radio" name="access" value="" id="s" <?php if ($_GET['access'] == '') { echo 'checked="checked"'; } ?> /><label for="s"><?php echo _AT('all'); ?></label>
25                                         </fieldset>
26                                 </div>
27
28                         <?php if ($this->has_categories): ?>
29                                 <div class="row">
30                                         <label for="category"><?php echo _AT('category'); ?></label><br/>
31                                         <select name="category" id="category">
32                                                 <option value="-1">- - - <?php echo _AT('cats_all'); ?> - - -</option>
33                                                 <option value="0" <?php if ($_GET['category'] == 0) { echo 'selected="selected"'; } ?>>- - - <?php echo _AT('cats_uncategorized'); ?> - - -</option>
34                                                 <?php echo $this->categories_select; ?>
35                                         </select>
36                                 </div>
37                         <?php endif; ?>
38
39                         <div class="row">
40                                 <label for="search"><?php echo _AT('search'); ?> (<?php echo _AT('title').', '._AT('description'); ?>)</label><br />
41
42                                 <input type="text" name="search" id="search" size="30" value="<?php echo htmlspecialchars($_GET['search']); ?>" />
43                                 <br/>
44                                 
45                                 <fieldset><legend><?php echo _AT('search_match'); ?>:</legend>
46                                 <input type="radio" name="include" value="all" id="match_all" <?php echo $this->checked_include_all; ?> /><label for="match_all"><?php echo _AT('search_all_words'); ?></label> 
47                                 <input type="radio" name="include" value="one" id="match_one" <?php echo $this->checked_include_one; ?> /><label for="match_one"><?php echo _AT('search_any_word'); ?></label>
48                                 </fieldset>
49                         </div>
50
51                         <div class="row buttons">
52                                 <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>"/>
53                                 <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>"/>
54                         </div>
55                 
56                 </form>
57
58 </fieldset>
59 </div>
60 </div>
61 </div>
62 <div>
63 <?php if (is_array($this->courses_rows)){ ?>
64         <?php foreach ($this->courses_rows as $row){ ?>
65             <?php  $counter++; ?>
66                 <ul class="fl-list-menu fl-list-thumbnails">
67                  <li>
68                                 <h3 class="browse-courses"><a href="<?php echo url_rewrite('bounce.php?course='.$row['course_id'], true); ?>"><?php echo htmlentities($row['title'], ENT_QUOTES, 'UTF-8'); ?></a></h3>      
69                      
70                       <?php if ($row['description']): ?>
71                                 <span class="fl-link-summary" title="<?php echo htmlentities($row['description']);?>"><?php echo substr(nl2br(htmlentities($row['description'], ENT_QUOTES, 'UTF-8')),0,150); 
72                                 if(strlen($row['description']) > 150){
73                                 echo "...";
74                                 }
75                                 ?>&nbsp;</span>
76                         <?php else: ?>
77                                 <span class="fl-link-summary" title="<?php echo htmlentities($row['description']);?>">&nbsp;</span>
78                         <?php endif; ?>
79                 
80                 </li>
81         
82         </ul>         
83         <?php } // end foreach ?>
84 <?php } // end if ?>
85 </div>
86 <?php endif; ?>
87 <?php if ($this->mobile_device_type != IPAD_DEVICE): ?><!--  smartphone theme only -->
88 <div class="column-login">
89 <div class="input-form">
90 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('filter'); ?></legend>
91         <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
92                 
93                         <div class="row">
94                                 <h3><?php echo _AT('results_found', $this->num_results); ?></h3>
95                         </div>
96                         <div class="row">
97                                 <?php echo _AT('access'); ?><br />
98                                 <input type="radio" name="access" value="private" id="s1" <?php if ($_GET['access'] == 'private') { echo 'checked="checked"'; } ?> /><label for="s1"><?php echo _AT('private'); ?></label> 
99
100                                 <input type="radio" name="access" value="protected" id="s2" <?php if ($_GET['access'] == 'protected') { echo 'checked="checked"'; } ?> /><label for="s2"><?php echo _AT('protected'); ?></label>
101
102                                 <input type="radio" name="access" value="public" id="s3" <?php if ($_GET['access'] == 'public') { echo 'checked="checked"'; } ?> /><label for="s3"><?php echo _AT('public'); ?></label>
103
104                                 <input type="radio" name="access" value="" id="s" <?php if ($_GET['access'] == '') { echo 'checked="checked"'; } ?> /><label for="s"><?php echo _AT('all'); ?></label>
105                         </div>
106
107                 <?php if ($this->has_categories): ?>
108                         <div class="row">
109                                 <label for="category"><?php echo _AT('category'); ?></label><br/>
110                                 <select name="category" id="category">
111                                         <option value="-1">- - - <?php echo _AT('cats_all'); ?> - - -</option>
112                                         <option value="0" <?php if ($_GET['category'] == 0) { echo 'selected="selected"'; } ?>>- - - <?php echo _AT('cats_uncategorized'); ?> - - -</option>
113                                         <?php echo $this->categories_select; ?>
114                                 </select>
115                         </div>
116                 <?php endif; ?>
117
118                         <div class="row">
119                                 <label for="search"><?php echo _AT('search'); ?> (<?php echo _AT('title').', '._AT('description'); ?>)</label><br />
120
121                                 <input type="text" name="search" id="search" size="30" value="<?php echo htmlspecialchars($_GET['search']); ?>" />
122                                 <br/>
123                                 <?php echo _AT('search_match'); ?>:
124                                 <input type="radio" name="include" value="all" id="match_all" <?php echo $this->checked_include_all; ?> /><label for="match_all"><?php echo _AT('search_all_words'); ?></label> 
125                                 <input type="radio" name="include" value="one" id="match_one" <?php echo $this->checked_include_one; ?> /><label for="match_one"><?php echo _AT('search_any_word'); ?></label>
126                         </div>
127
128                         <div class="row buttons">
129                                 <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>"/>
130                                 <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>"/>
131                         </div>
132                 
133         </form>
134 </fieldset>
135 </div>
136 </div>
137 <div>
138 <?php if (is_array($this->courses_rows)){ ?>
139         <?php foreach ($this->courses_rows as $row){ ?>
140             <?php  $counter++; ?>
141                 <ul class="fl-list-menu fl-list-thumbnails">
142                  <li>
143                                 <h3 class="browse-courses"><a href="<?php echo url_rewrite('bounce.php?course='.$row['course_id'], true); ?>"><?php echo htmlentities($row['title'], ENT_QUOTES, 'UTF-8'); ?></a></h3>      
144                      
145                       <?php if ($row['description']): ?>
146                                 <span class="fl-link-summary" title="<?php echo htmlentities($row['description']);?>"><?php echo substr(nl2br(htmlentities($row['description'], ENT_QUOTES, 'UTF-8')),0,150); 
147                                 if(strlen($row['description']) > 150){
148                                 echo "...";
149                                 }
150                                 ?>&nbsp;</span>
151                         <?php else: ?>
152                                 <span class="fl-link-summary" title="<?php echo htmlentities($row['description']);?>">&nbsp;</span>
153                         <?php endif; ?>
154                 
155                 </li>
156         
157         </ul>         
158         <?php } // end foreach ?>
159 <?php } // end if ?>
160 </div>
161
162 <?php endif; ?>
163 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>