diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-02-10 11:40:07 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-02-10 11:40:07 +0000 |
commit | 834b3aedb86bf5a7f76e01646201c495a9da8faf (patch) | |
tree | 6f5d653373335e2ef3a066b3d0c1530cbde58e72 /search.inc.php | |
parent | f39821d848d9b788d5591fdd33dfddcc2fb9a652 (diff) | |
download | semanticscuttle-834b3aedb86bf5a7f76e01646201c495a9da8faf.tar.gz semanticscuttle-834b3aedb86bf5a7f76e01646201c495a9da8faf.tar.bz2 |
Minor fix: translations, improve watchlist, improve search behaviour...
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@266 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'search.inc.php')
-rw-r--r-- | search.inc.php | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/search.inc.php b/search.inc.php index d3ebe4c..523e2d5 100644 --- a/search.inc.php +++ b/search.inc.php @@ -4,6 +4,8 @@ /* Managing all possible inputs */ $select_watchlist = isset($select_watchlist)?$select_watchlist:''; $select_all = isset($select_all)?$select_all:''; + +$selected = ' selected="selected"'; ?> @@ -17,34 +19,34 @@ $select_all = isset($select_all)?$select_all:''; } if ($userservice->isLoggedOn() || isset($user)) { ?> - <td><?php echo T_('Search' /* Search ... for */); ?></td> + + <td><input type="text" name="terms" size="30" value="<?php $terms=!isset($terms)?T_('Search...'):$terms; echo filter($terms); ?>" onfocus="if (this.value == '<?php echo T_('Search...') ?>') this.value = '';" onblur="if (this.value == '') this.value = '<?php echo T_('Search...') ?>';"/></td> + <td><?php echo T_('in') ?></td> <td> - <select name="range"> + <select name="range"> <?php - if (!in_array($range, array($currentUsername, 'all', 'watchlist'))) { + if ($range == 'user' && $user!=$currentUsername) { ?> - <option value="<?php echo $user ?>"<?php //echo $selectUser; ?>><?php echo T_("this user's bookmarks"); ?></option> + <option value="<?php echo $user ?>"><?php echo T_("this user's bookmarks"); ?></option> <?php } if ($userservice->isLoggedOn()) { ?> - <option value="<?php echo $currentUsername; ?>"<?php //echo $selectMy; ?>><?php echo T_('my bookmarks'); ?></option> - <option value="watchlist"<?php echo $select_watchlist; ?>><?php echo T_('my watchlist'); ?></option> + <option value="<?php echo $currentUsername; ?>"><?php echo T_('my bookmarks'); ?></option> + <option value="watchlist" <?php echo ($range == 'watchlist')?$selected:''?> ><?php echo T_('my watchlist'); ?></option> <?php } ?> - <option value="all"<?php echo $select_all; ?>><?php echo T_('all bookmarks'); ?></option> + <option value="all" <?php echo ($range == 'all' || $range == '')?$selected:'' ?> ><?php echo T_('all bookmarks'); ?></option> </select> - </td> - <td><?php echo T_('for' /* Search ... for */); ?></td> + </td> <?php } else { ?> <td><input type="hidden" name="range" value="all" /></td> <?php } - ?> - <td><input type="text" name="terms" size="30" value="<?php $terms=!isset($terms)?'':$terms; echo filter($terms); ?>" /></td> + ?> <td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td> </tr> </table> |