]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/navbar.tmpl
livesearch.js support, fix calendar init
[SourceForge/phpwiki.git] / themes / default / templates / navbar.tmpl
1 <?php // -*-php-*-
2 rcs_id('$Id: navbar.tmpl,v 1.36 2005-02-03 05:11:41 rurban Exp $');
3 $dbh = $request->getDbh();
4 ?>
5 <!-- The top navigation/search bar -->
6 <form action="<?= WikiURL(
7 _("TitleSearch"))?>" target="_top"
8       method="get" accept-charset="<?=CHARSET?>">
9 <div id="navbuttons">
10 <?php if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
11   <?= WikiLink(new WikiPagename('Talk:'.$page->getName(), $page->getName()), 'button', _("Discussion")) ?>
12 <?=$SEP?><?php } ?><?= WikiLink(_("RecentChanges"), "button") ?>
13 <?=$SEP?><?= WikiLink(_("FindPage"), "button") ?>
14 <?=HTML::raw('&nbsp;')?><input type="hidden" name="auto_redirect" value="1" />
15 <?php if (! USE_PATH_INFO) { ?>
16 <input type="hidden" name="pagename" value="<?=
17 _("TitleSearch")?>" />
18 <?php } ?>
19 <input type="hidden" name="nocache" value="1" />
20 <input type="text"  name="s" size="12" maxlength="256"
21        title='<?=
22 _("Quick Search")?>'
23        onmouseover="window.status='<?=
24 _("Quick Search")?>'; return true;"
25        onmouseout="window.status=''; return true;" />
26 <?php if (!empty($revision)) { ?>
27 <?=$SEP?><?= $WikiTheme->makeLinkButton($revision,_("LikePages"),_("LikePages")) ?><?=$SEP?><?= $WikiTheme->makeLinkButton($revision,_("BackLinks"),_("BackLinks")) ?><?php
28   $links = $page->getPageLinks();
29   if ($links->count() > 1) { ?><?=$SEP?><?= $WikiTheme->makeLinkButton($revision,_("RelatedChanges"),_("RelatedChanges")) ?><?php } ?>
30 <?php } ?>
31 <?php if (!empty($user) && $user->isSignedIn()) { ?>
32 <?=$SEP?><?= WikiLink(_("UserPreferences"), 'button',_("Preferences")) ?>
33 <?php } ?>
34 <?php if (!empty($user)) { ?>
35 <?php
36       /* Today's calendar page for the user, if the Calender subpage is defined. */
37       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR . _("Calendar");
38       $dbi = $request->getDbh();
39       if ($dbi->isWikiPage($UserCalPageTitle)) {
40         $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time());
41         //$UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
42         ?>
43 <?=$SEP?><?= WikiLink($UserCalPageTodayTitle, "button", _("Today")) ?>
44 <?php } ?>
45 <?php } ?>
46 <?php if (!empty($user) && $user->isAdmin()) { ?>
47 <?=$SEP?><?= WikiLink(_("PhpWikiAdministration"), "button", _("Admin")) ?>
48 <?php } ?></div>
49 </form>
50 <?php if (DEBUG & 2) {
51         if (isset($links)) {
52             $s = '';
53             while ($p = $links->next()) { $s .= $p->_pagename.', '; }
54             echo asXML(HTML::strong("PageLinks: "),$s ? HTML::em($s) : HTML::em('<none>'));
55         }
56 } ?>