summaryrefslogtreecommitdiff
path: root/data/templates/default/search.menu.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-05-25 19:43:36 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-05-25 19:43:36 +0200
commit5ba53394fcda4ae9cfa9af52b37fb67517deeb5a (patch)
tree4416be7903a2b339382e9f933284f50797edc239 /data/templates/default/search.menu.php
parent63b0a4b8cb38a8a7c41410900b9dfcc84e6a33a9 (diff)
downloadsemanticscuttle-5ba53394fcda4ae9cfa9af52b37fb67517deeb5a.tar.gz
semanticscuttle-5ba53394fcda4ae9cfa9af52b37fb67517deeb5a.tar.bz2
implement request #1989987: theme support. merge themes branch with --squash
Diffstat (limited to 'data/templates/default/search.menu.php')
-rw-r--r--data/templates/default/search.menu.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/data/templates/default/search.menu.php b/data/templates/default/search.menu.php
new file mode 100644
index 0000000..5a8f027
--- /dev/null
+++ b/data/templates/default/search.menu.php
@@ -0,0 +1,57 @@
+<?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 id="search" action="<?php echo createURL('search'); ?>" method="post">
+ <table>
+ <tr>
+ <?php
+ $currentUser = $currentUsername = null;
+ if ($userservice->isLoggedOn()) {
+ $currentUser = $userservice->getCurrentObjectUser();
+ $currentUsername = $currentUser->getUsername();
+ }
+ if ($userservice->isLoggedOn() || isset($user)) {
+ ?>
+
+ <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">
+ <?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>
+ </td>
+ <?php
+ } else {
+ ?>
+ <td><input type="hidden" name="range" value="all" /></td>
+ <?php
+ }
+ ?>
+ <td><input type="submit" value="<?php echo T_('Search' /* Submit button */); ?>" /></td>
+ </tr>
+ </table>
+</form>