<?php echo $this->render('admin/header.phtml'); ?>


<script type="text/javascript" language="javascript">

	$(document).ready(function () {
		
	});

</script>

<div class="container">		

<?php echo $this->render('admin/menu.phtml'); ?>


<script type="text/javascript" language="javascript">

	$(document).ready(function () {	

		$('#formAddCategory').validate({
			errorClass: "formError",
			errorElement: "div",
			rules: {
				color_schema_name: {
					required: true
				}
			},
			messages: {
				color_schema_name: {
					required: "<?php echo @Lib_Lang::translate(admin_colorschema_required); ?>"
				}
			}
		});	
	
	
	});

</script>

	
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6">
			<h3><?php echo @Lib_Lang::translate(admin_colorschema_edit_top); ?></h3>
		</div>
		<div class="col-xs-6 col-sm-6 col-md-6 text-right">
			<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschema'), 'default', true); ?>" class="btn btn-default btn-sm"><i class='fa fa-th'></i> <?php echo @Lib_Lang::translate(admin_colorschema_menu_list); ?></a>
		</div>
	</div>


		
	<form id="formAddCategory" method="post" class="form-horizontal">
	
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right formLabelMarginTop"><?php echo @Lib_Lang::translate(admin_colorschema_name); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><input maxlength="100" name="color_schema_name" class="form-control" value="<?php echo$this->rowColorSchema['color_schema_name']; ?>" /></div>
	</div>
	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right formLabelMarginTop"><?php echo @Lib_Lang::translate(admin_colorschema_type); ?></div>
		<div class="col-xs-12 col-sm-8 col-md-8 formLabelMarginTop">
		
			<?php 
					if($this->rowColorSchema['color_schema_type'] == 0){
						echo @Lib_Lang::translate(admin_colorschema_type0);
					}
					if($this->rowColorSchema['color_schema_type'] == 1){
						echo @Lib_Lang::translate(admin_colorschema_type1); 
					}	
					if($this->rowColorSchema['color_schema_type'] == 2){
						echo @Lib_Lang::translate(admin_colorschema_type2); 
					}	
					if($this->rowColorSchema['color_schema_type'] == 3){
						echo @Lib_Lang::translate(admin_colorschema_type3); 
					}	
					if($this->rowColorSchema['color_schema_type'] == 4){
						echo @Lib_Lang::translate(admin_colorschema_type4); 
					}				
			?>
		
		</div>
	</div>

	

	
	<div class="row">
		<div class="col-xs-12 col-sm-4 col-md-4 text-right"></div>
		<div class="col-xs-12 col-sm-8 col-md-8"><input name="admin_editcolorschema" class="btn btn-info form-control" type="submit" value="<?php echo @Lib_Lang::translate(admin_colorschema_edit_button); ?>" /></div>
	</div>
	
	</form>	
	

	<hr />
		
<script type="text/javascript" language="javascript">

	$(document).ready(function () {
		$(".remove").click(function(){
		
			var link = $(this).attr('link');
			var name = $(this).attr('name');
			alertify.set({ buttonFocus: "none", labels: {ok: "<?php echo @Lib_Lang::translate(admin_confirm_accept); ?>", cancel: "<?php echo @Lib_Lang::translate(admin_confirm_cancel); ?>"}});
			alertify.confirm("<?php echo @Lib_Lang::translate(admin_confirm_remove_element); ?> "+name+"?", function (e) {
				if (e) {
					window.location.href = link;
				} else {
					return false;
				}
			});
		
		});
	});

</script>













	
	<?php if( $this->rowColorSchema['color_schema_type'] == 0 ){ ?>

	
	<!-- body - korpus -->
	
	
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6">
			<h3><?php echo @Lib_Lang::translate(admin_colorschema_editbody_top); ?></h3>
		</div>
		<div class="col-xs-6 col-sm-6 col-md-6 text-right">
			<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditaddcolor', 'id' => $this->rowColorSchema['color_schema_id']), 'default', true); ?>" class="btn btn-default btn-sm"><i class='fa fa-plus'></i> <?php echo @Lib_Lang::translate(admin_colorschema_addcolor); ?></a>
		</div>
	</div>
	
	

	<div class="row">
	<?php if( count($this->dataCSP) > 0 ){ ?>
	<?php foreach ($this->dataCSP as $key => $val): ?>
		<div class="col-xs-3 col-sm-3 col-md-3 text-center">
			<div style="margin:5px;padding:5px;border:1px solid #aaa;height: 220px;">
			<?php if( $val['color_schema_product_body_image'] ){ ?>
				<img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/body/<?php echo$val['color_schema_product_body_image']; ?>_h100.jpeg" style="border:1px solid #ccc;" />
			<?php }else{ ?>
			
			<?php } ?>
			<br />
			<?php echo$val['color_schema_product_body_name'];?>
			<br />
				<div class="btn-group">
					<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaediteditcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_body_id']), 'default', true); ?>" class="btn btn-primary btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_category_list_editbutton); ?></a>
					<a name="<?php echo $this->escape($val['color_schema_product_body_name']) ?>" link="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditremovecolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_body_id']), 'default', true); ?>" class="btn btn-danger btn-xs remove"><i class='fa fa-remove'></i> <?php echo @Lib_Lang::translate(admin_category_list_delbutton); ?></a>
				</div>
					<br />
					<?php if( $val['color_schema_product_body_default'] == 1 ){ ?>
						<?php echo @Lib_Lang::translate(admin_element_default); ?>
					<?php }else{ ?>
						<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditdefaultcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_body_id']), 'default', true); ?>" class="btn btn-info btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_element_defaultset); ?></a>
					<?php } ?>
			</div>
		</div> 
	<?php endforeach; ?>
	<?php }else{ ?>
	<center><?php echo @Lib_Lang::translate(admin_element_list_0); ?></center>
	<?php } ?>
	

	</div>	
	
	<!-- body - korpus - koniec -->	
	
	<?php } ?>
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	<?php if( $this->rowColorSchema['color_schema_type'] == 1 ){ ?>
	
	<!-- front - korpus -->
	
	
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6">
			<h3><?php echo @Lib_Lang::translate(admin_colorschema_editfront_top); ?></h3>
		</div>
		<div class="col-xs-6 col-sm-6 col-md-6 text-right">
			<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditaddcolor', 'id' => $this->rowColorSchema['color_schema_id']), 'default', true); ?>" class="btn btn-default btn-sm"><i class='fa fa-plus'></i> <?php echo @Lib_Lang::translate(admin_colorschema_addcolor); ?></a>
		</div>
	</div>

	
	<div class="row">
	<?php if( count($this->dataCSP) > 0 ){ ?>
	<?php foreach ($this->dataCSP as $key => $val): ?>
		<div class="col-xs-3 col-sm-3 col-md-3 text-center">
			<div style="margin:5px;padding:5px;border:1px solid #aaa;">
			<?php if( $val['color_schema_product_front_image'] ){ ?>
				<img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/front/<?php echo$val['color_schema_product_front_image']; ?>_h100.jpeg" style="border:1px solid #ccc;" />
			<?php }else{ ?>
			
			<?php } ?>
			<br />
			<?php echo$val['color_schema_product_front_name'];?>
			<br />
				<div class="btn-group">
					<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaediteditcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_front_id']), 'default', true); ?>" class="btn btn-primary btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_category_list_editbutton); ?></a>
					<a name="<?php echo $this->escape($val['color_schema_product_front_name']) ?>" link="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditremovecolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_front_id']), 'default', true); ?>" class="btn btn-danger btn-xs remove"><i class='fa fa-remove'></i> <?php echo @Lib_Lang::translate(admin_category_list_delbutton); ?></a>
				</div>
					<br />
					<?php if( $val['color_schema_product_front_default'] == 1 ){ ?>
						<?php echo @Lib_Lang::translate(admin_element_default); ?>
					<?php }else{ ?>
						<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditdefaultcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_front_id']), 'default', true); ?>" class="btn btn-info btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_element_defaultset); ?></a>
					<?php } ?>
			</div>
		</div> 
	<?php endforeach; ?>
	<?php }else{ ?>
	<center><?php echo @Lib_Lang::translate(admin_element_list_0); ?></center>
	<?php } ?>
	</div>	
	
	<!-- front - korpus - koniec -->
	
	<?php } ?>
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	<?php if( $this->rowColorSchema['color_schema_type'] == 2 ){ ?>
	
	<!-- type - korpus -->
	
	
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6">
			<h3><?php echo @Lib_Lang::translate(admin_colorschema_edittype_top); ?></h3>
		</div>
		<div class="col-xs-6 col-sm-6 col-md-6 text-right">
			<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditaddcolor', 'id' => $this->rowColorSchema['color_schema_id']), 'default', true); ?>" class="btn btn-default btn-sm"><i class='fa fa-plus'></i> <?php echo @Lib_Lang::translate(admin_colorschema_addcolor); ?></a>
		</div>
	</div>

	
	<div class="row">
	<?php if( count($this->dataCSP) > 0 ){ ?>
	<?php foreach ($this->dataCSP as $key => $val): ?>
		<div class="col-xs-3 col-sm-3 col-md-3 text-center">
			<div style="margin:5px;padding:5px;border:1px solid #aaa;">
			<?php if( $val['color_schema_product_type_image'] ){ ?>
				<img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/type/<?php echo$val['color_schema_product_type_image']; ?>_h100.jpeg" style="border:1px solid #ccc;" />
			<?php }else{ ?>
			
			<?php } ?>
			<br />
			<?php echo$val['color_schema_product_type_name'];?>
			<br />
				<div class="btn-group">
					<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaediteditcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_type_id']), 'default', true); ?>" class="btn btn-primary btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_category_list_editbutton); ?></a>
					<a name="<?php echo $this->escape($val['color_schema_product_type_name']) ?>" link="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditremovecolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_type_id']), 'default', true); ?>" class="btn btn-danger btn-xs remove"><i class='fa fa-remove'></i> <?php echo @Lib_Lang::translate(admin_category_list_delbutton); ?></a>
				</div>
					<br />
					<?php if( $val['color_schema_product_type_default'] == 1 ){ ?>
						<?php echo @Lib_Lang::translate(admin_element_default); ?>
					<?php }else{ ?>
						<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditdefaultcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_type_id']), 'default', true); ?>" class="btn btn-info btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_element_defaultset); ?></a>
					<?php } ?>
			</div>
		</div> 
	<?php endforeach; ?>
	<?php }else{ ?>
	<center><?php echo @Lib_Lang::translate(admin_element_list_0); ?></center>
	<?php } ?>
	</div>	
	
	<!-- type - korpus - koniec -->
	
	<?php } ?>
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	<?php if( $this->rowColorSchema['color_schema_type'] == 3 ){ ?>
	
	<!-- handles - korpus -->
	
	
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6">
			<h3><?php echo @Lib_Lang::translate(admin_colorschema_edithandles_top); ?></h3>
		</div>
		<div class="col-xs-6 col-sm-6 col-md-6 text-right">
			<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditaddcolor', 'id' => $this->rowColorSchema['color_schema_id']), 'default', true); ?>" class="btn btn-default btn-sm"><i class='fa fa-plus'></i> <?php echo @Lib_Lang::translate(admin_colorschema_addcolor); ?></a>
		</div>
	</div>

	
	<div class="row">
	<?php if( count($this->dataCSP) > 0 ){ ?>
	<?php foreach ($this->dataCSP as $key => $val): ?>
		<div class="col-xs-3 col-sm-3 col-md-3 text-center">
			<div style="margin:5px;padding:5px;border:1px solid #aaa;">
			<?php if( $val['color_schema_product_handles_image'] ){ ?>
				<img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/handles/<?php echo$val['color_schema_product_handles_image']; ?>_h100.jpeg" style="border:1px solid #ccc;" />
			<?php }else{ ?>
			
			<?php } ?>
			<br />
			<?php echo$val['color_schema_product_handles_name'];?>
			<br />
				<div class="btn-group">
					<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaediteditcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_handles_id']), 'default', true); ?>" class="btn btn-primary btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_category_list_editbutton); ?></a>
					<a name="<?php echo $this->escape($val['color_schema_product_handles_name']) ?>" link="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditremovecolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_handles_id']), 'default', true); ?>" class="btn btn-danger btn-xs remove"><i class='fa fa-remove'></i> <?php echo @Lib_Lang::translate(admin_category_list_delbutton); ?></a>
				</div>
					<br />
					<?php if( $val['color_schema_product_handles_default'] == 1 ){ ?>
						<?php echo @Lib_Lang::translate(admin_element_default); ?>
					<?php }else{ ?>
						<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditdefaultcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_handles_id']), 'default', true); ?>" class="btn btn-info btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_element_defaultset); ?></a>
					<?php } ?>
			</div>
		</div> 
	<?php endforeach; ?>
	<?php }else{ ?>
	<center><?php echo @Lib_Lang::translate(admin_element_list_0); ?></center>
	<?php } ?>
	</div>	
	
	<!-- handles - korpus - koniec -->
	
	<?php } ?>
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	<?php if( $this->rowColorSchema['color_schema_type'] == 4 ){ ?>
	
	<!-- accessories - korpus -->
	
	
	<div class="row">
		<div class="col-xs-6 col-sm-6 col-md-6">
			<h3><?php echo @Lib_Lang::translate(admin_colorschema_editaccessories_top); ?></h3>
		</div>
		<div class="col-xs-6 col-sm-6 col-md-6 text-right">
			<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditaddcolor', 'id' => $this->rowColorSchema['color_schema_id']), 'default', true); ?>" class="btn btn-default btn-sm"><i class='fa fa-plus'></i> <?php echo @Lib_Lang::translate(admin_colorschema_addcolor); ?></a>
		</div>
	</div>

	
	<div class="row">
	<?php if( count($this->dataCSP) > 0 ){ ?>
	<?php foreach ($this->dataCSP as $key => $val): ?>
		<div class="col-xs-3 col-sm-3 col-md-3 text-center">
			<div style="margin:5px;padding:5px;border:1px solid #aaa;">
			<?php if( $val['color_schema_product_accessories_image'] ){ ?>
				<img src="<?php echo $this->escape($this->baseUrl); ?>/public/uploads/accessories/<?php echo$val['color_schema_product_accessories_image']; ?>_h100.jpeg" style="border:1px solid #ccc;" />
			<?php }else{ ?>
			
			<?php } ?>
			<br />
			<?php echo$val['color_schema_product_accessories_name'];?>
			<br />
				<div class="btn-group">
					<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaediteditcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_accessories_id']), 'default', true); ?>" class="btn btn-primary btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_category_list_editbutton); ?></a>
					<a name="<?php echo $this->escape($val['color_schema_product_accessories_name']) ?>" link="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditremovecolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_accessories_id']), 'default', true); ?>" class="btn btn-danger btn-xs remove"><i class='fa fa-remove'></i> <?php echo @Lib_Lang::translate(admin_category_list_delbutton); ?></a>
				</div>
					<br />
					<?php if( $val['color_schema_product_accessories_default'] == 1 ){ ?>
						<?php echo @Lib_Lang::translate(admin_element_default); ?>
					<?php }else{ ?>
						<a href="<?php echo @$this->url(array('controller' => 'admin', 'action' => 'colorschemaeditdefaultcolor', 'id' => $val['color_schema_id'], 'idp' => $val['color_schema_product_accessories_id']), 'default', true); ?>" class="btn btn-info btn-xs"><i class='fa fa-edit'></i> <?php echo @Lib_Lang::translate(admin_element_defaultset); ?></a>
					<?php } ?>
			</div>
		</div> 
	<?php endforeach; ?>
	<?php }else{ ?>
	<center><?php echo @Lib_Lang::translate(admin_element_list_0); ?></center>
	<?php } ?>
	</div>	
	
	<!-- accessories - korpus - koniec -->
	
	<?php } ?>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
</div>

<?php echo $this->render('admin/footer.phtml'); ?>