]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/navbar.tmpl
remove redundant wrong templates, fix IE errors by removing printf, improve Sidebar...
[SourceForge/phpwiki.git] / themes / default / templates / navbar.tmpl
1 <?php // -*-php-*-
2   rcs_id('$Id: navbar.tmpl,v 1.38 2005-02-04 13:25:08 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 // this requires the Talk: map to end in "/Discussion"
10 if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
11   <?= WikiLink(new WikiPagename('Talk:'.$page->getName(), $page->getName()), 
12                'button', _("Discussion")) ?>
13 <?=$SEP?><?php } ?><?= WikiLink(_("RecentChanges"), "button") ?>
14 <?=$SEP?><?= WikiLink(_("FindPage"), "button") ?>
15 <?=HTML::raw('&nbsp;')?><input type="hidden" name="auto_redirect" value="1" />
16 <?php if (! USE_PATH_INFO) { ?>
17 <input type="hidden" name="pagename" value="<?=
18 _("TitleSearch")?>" />
19 <?php } ?>
20 <input type="hidden" name="nocache" value="1" />
21 <input type="text"  name="s" size="12" maxlength="256"
22        title='<?=
23 _("Quick Search")?>'
24        onmouseover="window.status='<?=
25 _("Quick Search")?>'; return true;"
26        onmouseout="window.status=''; return true;" />
27 <?php if (!empty($revision)) { ?>
28 <?=$SEP?><?= $WikiTheme->makeLinkButton($revision,_("LikePages"),_("LikePages")) 
29 ?><?=$SEP?><?= $WikiTheme->makeLinkButton($revision,_("BackLinks"),_("BackLinks")) 
30 ?><?php
31   $links = $page->getPageLinks();
32   if ($links->count() > 1) { ?><?=$SEP?><?= $WikiTheme->makeLinkButton($revision,_("RelatedChanges"),_("RelatedChanges")) ?><?php } ?>
33 <?php } ?>
34 <?php if (!empty($user) && $user->isSignedIn()) { ?>
35 <?=$SEP?><?= WikiLink(_("UserPreferences"), 'button',_("Preferences")) ?>
36 <?php } ?>
37 <?php if (!empty($user)) { ?>
38 <?php
39       /* Today's calendar page for the user, if the Calender subpage is defined. */
40       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR . _("Calendar");
41       $dbi = $request->getDbh();
42       if ($dbi->isWikiPage($UserCalPageTitle)) {
43         $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time());
44         //$UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
45         ?>
46 <?=$SEP?><?= WikiLink($UserCalPageTodayTitle, "button", _("Today")) ?>
47 <?php } ?>
48 <?php } ?>
49 <?php if (!empty($user) && $user->isAdmin()) { ?>
50 <?=$SEP?><?= WikiLink(_("PhpWikiAdministration"), "button", _("Admin")) ?>
51 <?php } ?></div>
52 </form>
53 <?php if (DEBUG & 2) {
54         if (isset($links)) {
55             $s = '';
56             while ($p = $links->next()) { $s .= $p->_pagename.', '; }
57             echo asXML(HTML::strong("PageLinks: "),$s ? HTML::em($s) : HTML::em('<none>'));
58         }
59 } ?>