]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Sidebar/templates/navbar.tmpl
add ENABLE_DISCUSSION_LINK dependency (to turn it off for 1.3.11)
[SourceForge/phpwiki.git] / themes / Sidebar / templates / navbar.tmpl
1 <?php // -*-php-*-
2     rcs_id('$Id: navbar.tmpl,v 1.10 2005-04-06 06:41:05 rurban Exp $');
3     $split = $WikiTheme->_autosplitWikiWords;
4     $WikiTheme->setAutosplitWikiWords(true);
5 ?>
6 <!-- The top navigation/search bar -->
7 <form action="<?= WikiURL(_("TitleSearch"))?>" target="_top"
8       method="get" accept-charset="<?=$charset?>" style="display:inline">
9 <div id="navbuttons">
10 <!-- &middot; ?= WikiLink(_("RecentChanges"), "button") ? -->
11 <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="text"  name="s" size="12" maxlength="256"
16              title='<?=_("Quick Search")?>'
17              onmouseover="window.status='<?=_("Quick Search")?>'; return true;"
18              onmouseout="window.status=''; return true;" /><? 
19 // remove the class from the href AND img for the annoying box
20 $button = Button(_("TitleSearch"));
21 $button->setAttr('class', false);
22 if (isset($button->_content[0])) $button->_content[0]->setAttr('class', false);
23 echo $button->asXml();
24 ?><?=$SEP?><?= WikiLink(_("FindPage"), "button",_("Full Search")) ?>
25 <?php 
26 if (ENABLE_DISCUSSION_LINK) { // This requires Talk: map to end in "/Discussion"
27   if (!string_ends_with($page->getName(), _("Discussion"))) { ?>
28     <?=$SEP?><?= WikiLink(new WikiPagename('Talk:'.$page->getName(), $page->getName()), 
29                'button', _("Discussion")) ?>
30   <?php } else { ?>
31     <?=$SEP?><?= Button(array(),_("Article"),$page->getName()) ?>
32   <?php } ?>
33 <?php } ?>
34 <?php if (!empty($revision)) { ?>
35 <?=$SEP?><?=Button(_("BackLinks")) ?>
36 <?php } ?>
37 <?php if (!empty($user) && $user->isAdmin()) { ?>
38 <?=$SEP?><?= WikiLink(_("PhpWikiAdministration"), "button", _("Admin")) ?>
39 <?php }
40 $WikiTheme->setAutosplitWikiWords($split); ?></div>
41 </form>