diff options
author | 2024-06-11 00:58:31 -0700 | |
---|---|---|
committer | 2024-06-11 14:59:42 -0700 | |
commit | 15a30340e8867dfac3f88460fbd93b581e56f10f (patch) | |
tree | 5f1ec84c8003a229769613d0bd6c7d399ec94be4 /data/templates/pico/search.menu.php | |
parent | b76f3afb27702c990275708c2ea0d432f35c6df1 (diff) | |
download | scuttle-15a30340e8867dfac3f88460fbd93b581e56f10f.tar.gz scuttle-15a30340e8867dfac3f88460fbd93b581e56f10f.zip |
Initial steps towards a pico.css-based theme
Diffstat (limited to 'data/templates/pico/search.menu.php')
-rw-r--r-- | data/templates/pico/search.menu.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/data/templates/pico/search.menu.php b/data/templates/pico/search.menu.php new file mode 100644 index 0000000..e56924a --- /dev/null +++ b/data/templates/pico/search.menu.php @@ -0,0 +1,50 @@ +<?php + + +/* Managing all possible inputs */ +$select_watchlist = isset($select_watchlist) ? $select_watchlist : ''; +$select_all = isset($select_all) ? $select_all : ''; + +$selected = ' selected="selected"'; +if (!isset($range)) { + $range = ''; +} +?> + + +<form role="search" action="<?php echo createURL('search'); ?>" method="post"> + <?php + $currentUser = $currentUsername = null; + if ($userservice->isLoggedOn()) { + $currentUser = $userservice->getCurrentObjectUser(); + $currentUsername = $currentUser->getUsername(); + } + if ($userservice->isLoggedOn() || isset($user)) { + ?> + + <input type="search" name="terms" size="30" value="<?php echo filter($terms); ?>" placeholder="Search"/> + <select name="range"> + <?php + if ($range == 'user' && $user!=$currentUsername) { + ?> + <option value="<?php echo $user ?>"><?php echo T_("this user's bookmarks"); ?></option> + <?php + } + if ($userservice->isLoggedOn()) { + ?> + <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 ($range == 'all' || $range == '')?$selected:'' ?> ><?php echo T_('all bookmarks'); ?></option> + </select> + <?php + } else { + ?> + <input type="hidden" name="range" value="all" /> + <?php + } + ?> + <input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /> +</form> |