<!DOCTYPE html>
<html lang="en">
	<head>
	    <meta charset="utf-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <title><?php echo isset($title)?$title . ' - ' : ''; ?><?php echo Config::get('site.name'); ?></title>
	    <meta name="description" content="">
	    <meta name="author" content="">
	    <?php echo HTML::style('favicon.png', array('rel' => 'shortcut icon')); ?>
	    
	    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
	
	    <?php echo HTML::style('css/bootstrap.css', array('rel'=>'stylesheet', 'type'=>'text/css')); ?>	    
	    <?php echo HTML::style('css/admin.css', array('rel'=>'stylesheet', 'type'=>'text/css')); ?>
	    
	    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
	    <!--[if lt IE 9]>
	    	<?php echo HTML::script('/js/html5shiv.js'); ?>      
	    <![endif]-->
	</head>
	<body>	
		<header id="navbar">
			<div class="navbar navbar-inverse navbar-fixed-top">
				<div class="container">
		        	<div class="navbar-header">
		          		<a class="brand" href="<?php echo URL::to('/'); ?>"><?php echo Config::get('site.name'); ?></a>
		        	</div>
		        	<nav class="navbar-collapse collapse">
		          		<ul class="nav navbar-nav pull-right">
		          		<?php if( Auth::check() ): ?>		          			
		          			<?php if( Auth::user()->group_id == 2): ?>
		          			<li><a href="<?php echo URL::to('admin/neighborhoods'); ?>">Neighborhoods</a></li>	
		          			<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Places <b class="caret"></b></a>
		          				<ul class="dropdown-menu">
		          					<li><a href="<?php echo URL::route('admin.places.index'); ?>">Places</a></li>
		          					<li><a href="<?php echo URL::route('admin.places-eventful.index'); ?>">Eventful</a></li>
              					</ul>
		          			</li>	          			
		          			<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Rentals <b class="caret"></b></a>
		          				<ul class="dropdown-menu">
		          					<li><a href="<?php echo URL::route('admin.rentals.index'); ?>">Listings</a></li>
		          					<li><a href="<?php echo URL::route('admin.rental-brokers.index'); ?>">Brokers</a></li>
		          					<li><a href="<?php echo URL::route('admin.rental-brokerages.index'); ?>">Brokerages</a></li>   
		          					<li><a href="<?php echo URL::route('admin.rental-buildings.index'); ?>">Buildings</a></li>
              					</ul>
		          			</li>	
		          			<li><a href="<?php echo URL::to('admin/events'); ?>">Events</a></li>
		          			<li><a href="<?php echo URL::to('admin/feedbacks'); ?>">Feedbacks</a></li>
		          			<?php endif; ?>		          					          		
		            	<?php endif; ?>
		          		</ul>          
		        	</nav>
		      	</div>
		    </div>
							    
	    </header>
	    
	    <section id="content">
	    	<div class="container">
	    		
	    		<?php if(Session::has('success')): ?><div class="alert alert-success"><?php echo Session::get('success'); ?><a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a></div><?php endif; ?>
	    		<?php if(Session::has('error')): ?><div class="alert alert-error"><?php echo Session::get('error'); ?><a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a></div><?php endif; ?>
	    		
	    		<?php echo $__env->yieldContent('content'); ?>
	    	</div>
	    </section>
    	
    	<footer id="footer">
    		
    	</footer>
    	<script src="//code.jquery.com/jquery.js"></script>
    	<?php echo HTML::script('/js/plugins/bootstrap.min.js'); ?> 
    	<?php echo HTML::script('/js/plugins/wysihtml5-0.3.0.min.js'); ?>
    	<?php echo HTML::script('/js/plugins/bootstrap-wysihtml5.js'); ?>
    	<?php echo HTML::script('/js/plugins/jquery.autocomplete.js'); ?>
    	<?php echo HTML::script('/js/plugins/chosen.jquery.min.js'); ?>
    	<?php echo HTML::script('/js/admin.js'); ?>  
    	<?php echo $__env->yieldContent('scripts'); ?>
	</body>
</html>
