1<?php
2/**
3 * Templar - Dokuwiki Template - 09/2012
4 * based on Andreas's Gohr template dokuwiki/main.php
5 *
6 * @link     http://templar.cavalie.ro
7 * @author   Tudor Vaida
8 * @license  GPL 3 (http://www.gnu.org/licenses/gpl.html)
9 */
10
11if (!defined('DOKU_INC')) die();
12
13$customSidebar= 'custom'==$conf['sidebar'];
14$showSidebar = ($ACT=='show') &&  ($customSidebar || page_findnearest($conf['sidebar']));
15?><!DOCTYPE html>
16<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
17<head>
18    <meta charset=utf-8" />
19    <title><?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>]</title>
20    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
21    <?php tpl_metaheaders() ?>
22    <meta name="viewport" content="width=device-width,initial-scale=1" />
23    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
24    <?php tpl_includeFile('meta.html') ?>
25</head>
26
27<body>
28<div id='dokuwiki__top' ></div>
29<!-- == NAVBAR == -->
30<div class="navbar navbar-inverse navbar-fixed-top">
31  <div class="navbar-inner">
32  <div class="container">
33	  <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
34		<span class="icon-bar"></span>
35		<span class="icon-bar"></span>
36		<span class="icon-bar"></span>
37	  </button>
38	<!-- == LOGO/TITLE == -->
39<?php
40	$logo = @tpl_getMediaFile(array(':wiki:logo.png', 'images/logo.png'), false);
41	tpl_link( wl(),
42		'<img src="'.$logo.'" alt="" class="logo"/><span>'.$conf['title'].'</span>',
43		'accesskey="h" title="[H]" class="brand"'
44	);
45	?>
46	<div class="nav-collapse collapse">
47	<ul class="nav">
48		<?php include('tpl_menu.php') ?>
49		<?php if ($conf['useacl']): ?>
50		<li class="dropdown user" id="dokuwiki__usertools">
51			<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php
52			if ($_SERVER['REMOTE_USER']) {
53				tpl_userinfo();
54			} else {
55				echo tpl_getLang('user_tools');
56			}
57			?><b class="caret"></b></a>
58			<ul class="dropdown-menu">
59				<?php /* the optional second parameter of tpl_action() switches between a link and a button,
60						 e.g. a button inside a <li> would be: tpl_action('edit',0,'li') */
61					tpl_action('admin', 1, 'li');
62					tpl_action('profile', 1, 'li');
63					tpl_action('register', 1, 'li'); /* DW versions > 2011-02-20 can use the core function tpl_action('register', 1, 'li') */
64					tpl_action('login', 1, 'li');
65				?>
66			</ul>
67		</li>
68		<form action="'.wl().'" accept-charset="utf-8" class="search navbar-form pull-right" id="dw__search" method="get"><div class="no">
69		<input type="hidden" name="do" value="search" />
70		<?php		    print '<input type="text" ';
71			if($ACT == 'search') print 'value="'.htmlspecialchars($QUERY).'" ';
72			if(!$autocomplete) print 'autocomplete="off" ';
73			print 'id="qsearch__in" accesskey="f" name="id" class="span2" title="[F]" /> ';
74			print '<input type="submit" value="'.$lang['btn_search'].'" class="btn" title="'.$lang['btn_search'].'" />';
75			if($ajax) print '<div id="qsearch__out" class="ajax_qsearch JSpopup"></div>';
76		?>
77		</div></form>
78		<?php endif; ?>
79	</ul><!-- nav -->
80	</div>
81  </div>
82  </div>
83</div>
84<div class='container' id="dokuwiki__site">
85<?php include('tpl_header.php') ?>
86<div class="dokuwiki site mode_<?php echo $ACT; echo $showSidebar?' showSidebar ':' '; ?>">
87	<div class='row'>
88	<?php $tocInsidePage=true;
89	if($showSidebar){ ?>
90	<!-- == ASIDE == -->
91		<?php tpl_flush() ?>
92	<div id="dokuwiki__aside" class='span2'>
93	<div class='sidebar affix-top' data-spy='affix' data-offset-top='40'>
94		<?php
95		$tocPlace=tpl_getConf('toc_place');
96		if('sidebar-up'==$tocPlace || 'sidebar-down'==$tocPlace)
97			$tocInsidePage=false;
98		if($customSidebar) {
99			include 'tpl_sidebar.php';
100		} else {
101			if('sidebar-up'==$tocPlace) {
102				tpl_toc(); ?>
103				<div class='clearfix'></div>
104			<?php } ?>
105			<div class='content sidebar_menu'>
106				<?php
107				if(tpl_getConf('sidebar_head'))
108					tpl_includeFile('tpl_sidebar_head.php');
109				tpl_include_page($conf['sidebar'], 1, 1);
110				if(tpl_getConf('sidebar_foot'))
111					tpl_includeFile('tpl_sidebar_foot.php');
112				?>
113			</div>
114			<?php if('sidebar-down'==$tocPlace) {
115				tpl_toc(); ?>
116				<div class='clearfix'></div>
117			<?php } ?>
118			<div id="dokuwiki__pagetools">
119				<ul class='nav nav-tabs nav-stacked'>
120				<?php
121					tpl_action('edit', 1, 'li');
122					tpl_action('history', 1, 'li');
123					tpl_action('backlink', 1, 'li');
124					tpl_action('subscribe', 1, 'li');
125					tpl_action('revert', 1, 'li');
126					tpl_action('top', 1, 'li');
127				?>
128				</ul>
129			</div>
130		<?php } ?>
131	</div>
132	</div>
133	<?php };//endif ?>
134	<!-- == CONTENT == -->
135	<div id="dokuwiki__content" class="<?php echo $showSidebar?'span10':'span12'; ?>">
136		<?php tpl_flush() /* flush the output buffer */ ?>
137		<?php tpl_includeFile('pageheader.php') ?>
138
139		<div class="page">
140			<?php tpl_content($tocInsidePage?true:false); /* the main content */ ?>
141		</div><!-- page -->
142
143		<?php tpl_flush() ?>
144		<?php tpl_includeFile('pagefooter.php') ?>
145	</div>
146	</div><!-- row -->
147
148	<!-- == FOOTER ==  -->
149	<div class='row'>
150	<div id="dokuwiki__footer" class="span10 <?php echo $showSidebar?'offset2':'';?>">
151		<!-- PAGE ACTIONS -->
152		<hr />
153		<div id="dokuwiki__pagetools">
154			<h3 class="a11y"><?php echo tpl_getLang('page_tools'); ?></h3>
155			<div class='btn-group'>
156				<?php
157					tpl_action('edit', 1, 'span class="btn"');
158					tpl_action('history', 1, 'span class="btn"');
159					tpl_action('backlink', 1, 'span class="btn"');
160					tpl_action('subscribe', 1, 'span class="btn"');
161					tpl_action('revert', 1, 'span class="btn"');
162					tpl_action('top', 1, 'span class="btn"');
163				?>
164			</div>
165		</div>
166		<div class="doc"><?php tpl_pageinfo() /* 'Last modified' etc */ ?></div>
167		<?php tpl_license('button') /* content license, parameters: img=*badge|button|0, imgonly=*0|1, return=*0|1 */ ?>
168		<?php tpl_includeFile('footer.html') ?>
169	</div>
170	</div>
171</div><!-- /site --><div class="no"><?php tpl_indexerWebBug()?></div>
172</div>
173</body>
174</html>
175