]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/navbar.tmpl
New "Today" button if the user has a Calender Page defined. weblog-style.
[SourceForge/phpwiki.git] / themes / default / templates / navbar.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: navbar.tmpl,v 1.10 2002-08-17 17:03:11 rurban Exp $ -->
3 <?php
4
5 $s = $Theme->getButtonSeparator();
6
7 ?>
8 <!-- The top navigation/search bar -->
9 <form action="<?= WikiURL(_("TitleSearch"))?>"
10       method="get" accept-charset="<?=CHARSET?>">
11   <div id="navbuttons">
12    <?= WikiLink(_("RecentChanges"), "button") ?>
13    <?=$s?><?= WikiLink(_("FindPage"), "button") ?>
14    <?=$s?><input type="hidden" name="auto_redirect" value="1" />
15       <input type="text"  name="s" size="12" maxlength="256"
16              title='<?=_("Quick Search")?>'
17              onmouseover="window.status='<?=_("Quick Search")?>'; return true;"
18              onmouseout="window.status=''; return true;" />
19     <?php if (!empty($revision)) { ?>
20      <?=$s?><?= Button(_("LikePages")) ?>
21      <?=$s?><?= Button(_("BackLinks")) ?>
22     <?php } ?>
23     <?php if (!empty($user) && $user->isAdmin()) { ?>
24      <?=$s?><?= WikiLink(_("PhpWikiAdministration"), "button") ?>
25     <?php } ?>
26     <?php if (!empty($user)) { ?>
27     <?php
28       /* Today's calendar page for the user, if the Calender subpage is defined. */
29       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR . _("Calendar");
30       $dbi = $request->getDbh();
31       if ($dbi->isWikiPage($UserCalPageTitle)) {
32         $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time());
33         $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
34         ?>
35      <?=$s?><?= WikiLink($UserCalPageTodayUrl, "button", _("Today")) ?>
36       <?php } ?>
37     <?php } ?>
38   </div>
39 </form>