]> projects.mako.cc - scuttle/blob - search.inc.php
Revert Thomas Niepraschk's tag autocomplete feature (3 commits)
[scuttle] / search.inc.php
1 <form id="search" action="<?php echo createURL('search'); ?>" method="post">
2     <table>
3     <tr>
4         <?php
5         $logged_on = FALSE;
6         if ($userservice->isLoggedOn()) {
7           $currentUser = $userservice->getCurrentUser();
8           $currentUsername = $currentUser[$userservice->getFieldName('username')];
9           $logged_on = TRUE;
10         }
11         if ($logged_on || isset($user)) {
12         ?>
13         <td><?php echo T_('Search' /* Search ... for */); ?></td>
14         <td>
15             <select name="range">
16                 <?php if (!in_array($range, array($currentUsername, 'all', 'watchlist')) && $user != $currentUsername): ?>
17                 <option value="<?php echo $user ?>"<?php echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option>
18                 <?php
19                 endif;
20                 if ($logged_on) {
21                 ?>
22                 <option value="<?php echo $currentUsername; ?>"<?php echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option>
23                 <option value="watchlist"<?php echo $select_watchlist; ?>><?php echo T_('my watchlist'); ?></option>
24                 <?php
25                 }
26                 ?>
27                 <option value="all"<?php echo $select_all; ?>><?php echo T_('all bookmarks'); ?></option>
28             </select>
29         </td>
30         <td><?php echo T_('for' /* Search ... for */); ?></td>
31         <?php
32         } else {
33         ?>
34         <td><input type="hidden" name="range" value="all" /></td>
35         <?php
36         }
37         ?>
38         <td><input type="text" name="terms" size="50" value="<?php echo filter($terms); ?>" /></td>
39         <td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td>
40     </tr>
41     </table>
42 </form>

Benjamin Mako Hill || Want to submit a patch?