]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/navbar.tmpl
add Discussion link
[SourceForge/phpwiki.git] / themes / default / templates / navbar.tmpl
1 <?php // -*-php-*-
2     rcs_id('$Id: navbar.tmpl,v 1.35 2005-02-02 19:01:40 rurban Exp $');
3
4     $s = $WikiTheme->getButtonSeparator();
5 ?>
6 <!-- The top navigation/search bar -->
7 <form action="<?= WikiURL(
8 _("TitleSearch"))?>" target="_top"
9       method="get" accept-charset="<?=CHARSET?>">
10 <div id="navbuttons">
11 <?php if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
12 <?= Button(array('action'=>$dbh->isWikiPage('Talk:'.$page->getName()) ? 'browse' : 'create', 
13                  'template'=>_("TemplateTalk")),
14            _("Discussion"), 'Talk:'.$page->getName()) ?>
15 <?=$s?><?php } ?><?= WikiLink(_("RecentChanges"), "button") ?><?=$s?>
16 <?= WikiLink(_("FindPage"), "button") ?>
17 <?=HTML::raw('&nbsp;')?><input type="hidden" name="auto_redirect" value="1" />
18 <?php if (! USE_PATH_INFO) { ?>
19 <input type="hidden" name="pagename" value="<?=
20 _("TitleSearch")?>" />
21 <?php } ?>
22 <input type="hidden" name="nocache" value="1" />
23 <input type="text"  name="s" size="12" maxlength="256"
24        title='<?=
25 _("Quick Search")?>'
26        onmouseover="window.status='<?=
27 _("Quick Search")?>'; return true;"
28        onmouseout="window.status=''; return true;" />
29 <?php if (!empty($revision)) { ?>
30 <?=$s?><?= $WikiTheme->makeLinkButton($revision,_("LikePages"),_("LikePages")) ?><?=$s?><?= $WikiTheme->makeLinkButton($revision,_("BackLinks"),_("BackLinks")) ?><?php
31   $links = $page->getPageLinks();
32   if ($links->count() > 1) { ?><?=$s?><?= $WikiTheme->makeLinkButton($revision,_("RelatedChanges"),_("RelatedChanges")) ?><?php } ?>
33 <?php } ?>
34 <?php if (!empty($user) && $user->isSignedIn()) { ?>
35 <?=$s?><?= 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 <?=$s?><?= WikiLink($UserCalPageTodayTitle, "button", _("Today")) ?>
47 <?php } ?>
48 <?php } ?>
49 <?php if (!empty($user) && $user->isAdmin()) { ?>
50 <?=$s?><?= 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 } ?>