<?php

include 'tabs_info.php';

if (isset($tab) && array_key_exists($tab, $tabsInfo)) {
	$tabsInfo[$tab][2] = 'active';
}

?>
<div class="row">
	<div class="col-xs-12">
		<div class="box box-danger" style="height: 85vh; margin-bottom: 0;">
			<div class="box-body" style="height: 100%;" id="KartyPracyPracownikow">
				<!-- TAB NAVIGATION -->
				<ul class="nav nav-tabs" role="tablist">
					<?php if($allow_tabs['moje'] !== false): ?>
						<li class="<?=$tabsInfo['moje'][2]?>">
							<a href="#<?=$tabsInfo['moje'][1]?>" role="tab" data-toggle="tab" data-value="moje">Moje</a>
						</li>
					<?php endif; ?>
					<?php if($allow_tabs['pracownikow'] !== false && empty($_nrewid)): ?>
						<li class="<?=$tabsInfo['pracownikow'][2]?>">
							<a href="#<?=$tabsInfo['pracownikow'][1]?>" role="tab" data-toggle="tab" data-value="pracownikow">Moich Pracowników</a>
						</li>
					<?php endif; ?>
				</ul>

				<!-- TAB CONTENT -->
				<div class="tab-content" style="height: 100%">
					<?php if($allow_tabs['moje'] !== false): ?>
						<div role="tabpanel" class="tab-pane <?=$tabsInfo['moje'][2]?>" id="<?=$tabsInfo['moje'][1]?>" style="height: 100%">
							<?php include 'panel.php'; ?>
						</div>
					<?php endif; ?>
					<?php if($allow_tabs['pracownikow'] !== false && empty($_nrewid)): ?>
						<div role="tabpanel" class="tab-pane <?=$tabsInfo['pracownikow'][2]?>" id="<?=$tabsInfo['pracownikow'][1]?>" style="height: 100%">
							<?php include 'panel.php'; ?>
						</div>
					<?php endif; ?>
				</div>
			</div>
		</div>
	</div>
</div>
<script>

	$('.page-name:first-of-type').html('Karty Pracy');

	var kartypracy_tab_active = {
		id: '<?=$tabsInfo[$tab][1]?>',
		name: '<?=$tabsInfo[$tab][0]?>',
		nrewid: '<?=($_nrewid?:'')?>'
	};
	datepickerInit();
</script>
<script type="text/javascript" src="<?php echo $local_url; ?>js/kartypracy.js"></script>
