]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/navbar.tmpl
display RelatedChanges only if >= 2 links
[SourceForge/phpwiki.git] / themes / default / templates / navbar.tmpl
1 <?php // -*-php-*-
2     rcs_id('$Id: navbar.tmpl,v 1.28 2004-05-17 16:56:49 rurban Exp $');
3
4     $s = $Theme->getButtonSeparator();
5 ?>
6 <!-- The top navigation/search bar -->
7 <form action="<?= WikiURL(_("TitleSearch"))?>" target="_top"
8       method="get" accept-charset="<?=CHARSET?>">
9 <div id="navbuttons">
10 <?= WikiLink(_("RecentChanges"), "button") ?><?=$s?><?= WikiLink(_("FindPage"), "button") ?>
11 <?=HTML::raw('&nbsp;')?><input type="hidden" name="auto_redirect" value="1" />
12 <?php if (! USE_PATH_INFO) { ?>
13 <input type="hidden" name="pagename" value="<?=_("TitleSearch")?>" />
14 <?php } ?>
15 <input type="hidden" name="nocache" value="purge" />
16 <input type="text"  name="s" size="12" maxlength="256"
17        title='<?=_("Quick Search")?>'
18        onmouseover="window.status='<?=_("Quick Search")?>'; return true;"
19        onmouseout="window.status=''; return true;" />
20 <?php if (!empty($revision)) { ?>
21 <?=$s?><?= $Theme->makeLinkButton($revision,_("LikePages"),_("LikePages")) ?><?=$s?><?= $Theme->makeLinkButton($revision,_("BackLinks"),_("BackLinks")) ?><?php
22   $links = $page->getLinks();
23   if ($links->count() > 1) { ?><?=$s?><?= $Theme->makeLinkButton($revision,_("RelatedChanges"),_("RelatedChanges")) ?><?php } ?>
24 <?php } ?>
25 <?php if (!empty($user) && $user->isSignedIn()) { ?>
26 <?=$s?><?= WikiLink(_("UserPreferences"),'button',_("Preferences")) ?>
27 <?php } ?>
28 <?php if (!empty($user)) { ?>
29 <?php
30       /* Today's calendar page for the user, if the Calender subpage is defined. */
31       $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR . _("Calendar");
32       $dbi = $request->getDbh();
33       if ($dbi->isWikiPage($UserCalPageTitle)) {
34         $UserCalPageTodayTitle = $UserCalPageTitle . SUBPAGE_SEPARATOR . strftime("%Y-%m-%d", time());
35         $UserCalPageTodayUrl = WikiURL($UserCalPageTodayTitle);
36         ?>
37 <?=$s?><?= WikiLink($UserCalPageTodayUrl, "button", _("Today")) ?>
38 <?php } ?>
39 <?php } ?>
40 <?php if (!empty($user) && $user->isAdmin()) { ?>
41 <?=$s?><?= WikiLink(_("PhpWikiAdministration"), "button", _("Admin")) ?>
42 <?php } ?></div>
43 </form>