summaryrefslogtreecommitdiff
path: root/data/templates/default/search.menu.php
diff options
context:
space:
mode:
authorMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:38:07 -0400
committerMark Pemberton <mpemberton5@gmail.com>2011-06-04 00:38:07 -0400
commitb628e63e015bc3b2eadc712feaa6c4d05cf75bbd (patch)
treeebdcec5c8133a3b6f86d06dc3f6fb3de46609f04 /data/templates/default/search.menu.php
parent84e603aa91a303a1419962ff3ff6086710a7b1a9 (diff)
parent4c8a53c5bc632302aaf8978e711eb53a03166db5 (diff)
downloadsemanticscuttle-b628e63e015bc3b2eadc712feaa6c4d05cf75bbd.tar.gz
semanticscuttle-b628e63e015bc3b2eadc712feaa6c4d05cf75bbd.tar.bz2
Merge branch 'master' into privatekey2
Conflicts: data/templates/default/bookmarks.tpl.php
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>