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