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