<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Poly - Settings</title>
		
	<link href="template/default/assets/css/bootstrap.min.css" rel="stylesheet">
	<link href="template/default/assets/css/datepicker3.css" rel="stylesheet">
	<link href="template/default/assets/css/styles.css" rel="stylesheet">
		
	<!--Icons-->
	<script src="template/default/assets/js/lumino.glyphs.js"></script>
		
	<!--[if lt IE 9]>
	<script src="template/default/assets/js/html5shiv.js"></script>
	<script src="template/default/assets/js/respond.min.js"></script>
	<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
	<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="#"><span>Poly</span>Dashboard</a>
			<ul class="user-menu">
				<li class="dropdown pull-right">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown"><svg class="glyph stroked male-user"><use xlink:href="#stroked-male-user"></use></svg> {{ user }} <span class="caret"></span></a>
				<ul class="dropdown-menu" role="menu">
				<li><a href="settings.php"><svg class="glyph stroked gear"><use xlink:href="#stroked-gear"></use></svg> Settings</a></li>
				<li><a href="logout.php"><svg class="glyph stroked cancel"><use xlink:href="#stroked-cancel"></use></svg> Log Out</a></li>
				</ul></li>
			</ul>
		</div>							
	</div><!-- /.container-fluid -->
</nav>
		
<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
	<ul class="nav menu">
		<li><a href="index.php"><svg class="glyph stroked home"><use xlink:href="#stroked-home"></use></svg> Dashboard</a></li>
		<li><a href="posts.php"><svg class="glyph stroked app window with content"><use xlink:href="#stroked-app-window-with-content"></use></svg> All Posts</a></li>
		<li><a href="new-post.php"><svg class="glyph stroked pencil"><use xlink:href="#stroked-pencil"></use></svg> Add New</a></li>
		<li><a href="categories.php"><svg class="glyph stroked folder"><use xlink:href="#stroked-folder"></use></svg> Categories</a></li>
		<li><a href="comments.php"><svg class="glyph stroked empty-message"><use xlink:href="#stroked-empty-message"></use></svg> Comments</a></li>
		<li><a href="users.php"><svg class="glyph stroked male user"><use xlink:href="#stroked-male-user"></use></svg> Users</a></li>
		<li class="active"><a href="settings.php"><svg class="glyph stroked gear"><use xlink:href="#stroked-gear"></use></svg> Settings</a></li>
		<li><a href="logout.php"><svg class="glyph stroked cancel"><use xlink:href="#stroked-cancel"></use></svg> Log Out</a></li>
		<li role="presentation" class="divider"></li>
	</ul>

</div><!--/.sidebar-->
		
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">			
	<div class="row">
		<ol class="breadcrumb">
			<li><a href="index.php"><svg class="glyph stroked home"><use xlink:href="#stroked-home"></use></svg></a></li>
			<li class="active">Settings</li>
		</ol>
	</div><!--/.row-->
		
	{% if message == true %}
	<h1 class="snm">{{ message }}</h1>
	{% endif %}

	<div class="row">
		<div class="col-lg-12">
		<div class="panel panel-default">
		<div class="panel-heading">Settings</div>
		<div class="panel-body">
		<div class="col-md-12">
		<form role="form"  enctype="multipart/form-data"  action="settings.php"  method="post">
							
		<div class="form-group">
		<label>Site Address (URL)</label>
		<input type="text" name="url" value="{{ site.url }}" id="url"  class="form-control" placeholder="Site Address (URL)" required="required"/>
		</div>
		
		<div class="form-group">
		<label>Site Title</label>
		<input type="text" name="title" value="{{ site.title }}" id="title"  class="form-control" placeholder="Site Title" required="required"/>
		</div>
		
		<div class="form-group">
		<label>Site Description</label>
		<input type="text" name="description" value="{{ site.description }}" id="description"  class="form-control" placeholder="Site Description" required="required" />
		</div>	
		
		<div class="form-group">
		<label>Site Keywords</label>
		<input type="text" name="keywords" value="{{ site.keywords }}" id="keywords"  class="form-control" placeholder="Site Keywords, Separated By A Comma!" />
		</div>
		
		<div class="form-group">
		<label>Logo</label>
		<input type="file"  name="logo"  id="logo"   class="form-control" />
		<img src="../uploads/{{ site.logo }}"/>
		</div>	
					
		<div class="form-group">
		<label>Copyright Text</label>
		<input type="text" name="copyright" value="{{ site.copyright }}" id="copyright" class="form-control" placeholder="Copyright Text" required="required" />
		</div>
		
		<div class="form-group">
		<label>Email Address</label>
		<input type="text" name="email" value="{{ site.email }}" id="email" class="form-control" placeholder="Email Address" required="required" />
		</div>	
		
		<div class="form-group">
		<label>Phone</label>
		<input type="text" name="phone" value="{{ site.phone }}" id="phone" class="form-control" placeholder="Contact Phone Number" />
		</div>	
		
		<div class="form-group">
		<label>Country</label>
		<input type="text" name="country" value="{{ site.country }}" id="country" class="form-control" placeholder="Country" />
		</div>					
		
		<div class="form-group">
		<label>City</label>
		<input type="text" name="city" value="{{ site.city }}" id="city" class="form-control" placeholder="City" />
		</div>
		
		<div class="form-group">
		<label>Address</label>
		<input type="text" name="address" value="{{ site.address }}" id="address" class="form-control" placeholder="Address" />
		</div>
		
		<div class="form-group">
		<label>Contact Name</label>
		<input type="text" name="name" value="{{ site.name }}" id="name" class="form-control" placeholder="Contact Name" />
		</div>	
		
		<div class="form-group">
		<label>Template:</label>
		<select name="template" style="width:100%">
		{% for template in templates %}
		{%   if (template == '.') or (template == '..') %}
 		{% else %}
		<option value="{{ template }}" {% if template == site.template %}selected{% endif %}>{{ template }}</option>
		{% endif %}
		{% endfor %}
	    	</select>
		</div>


		<div class="form-group">
		<label>Permalink Settings:</label>
		<select name="permalink_structure" style="width:100%">
		<option value="0" {% if site.permalink_structure == '0' %}selected{% endif %}>Numeric</option>
		<option value="1" {% if site.permalink_structure == '1' %}selected{% endif %}>Post Name</option>
	    	</select>
		</div>

													
		<button type="submit" name="submit" value="Save" class="btn btn-paleutism pull-right">Save</button>
		</div>
		
		</form>
		</div>
		</div>
		</div><!-- /.col-->
		</div><!-- /.row -->
		
	</div><!--/.main-->

	<script src="template/default/assets/js/jquery-1.11.1.min.js"></script>
	<script src="template/default/assets/js/bootstrap.min.js"></script>
	<script src="template/default/assets/js/chart.min.js"></script>
	<script src="template/default/assets/js/chart-data.js"></script>
	<script src="template/default/assets/js/easypiechart.js"></script>
	<script src="template/default/assets/js/easypiechart-data.js"></script>
	<script src="template/default/assets/js/bootstrap-datepicker.js"></script>
	<script>
		$('#calendar').datepicker({
		});

		!function ($) {
		    $(document).on("click","ul.nav li.parent > a > span.icon", function(){          
		        $(this).find('em:first').toggleClass("glyphicon-minus");      
		    }); 
		    $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);

		$(window).on('resize', function () {
		  if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
		})
		$(window).on('resize', function () {
		  if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
		})
	</script>	
</body>
</html>