<div class="row">
	<div class="col-md-5">
		<div class="box box-primary">
			<div class="box-header with-border">
				<h3 class="box-title"><?= !empty(lang('resume_type'))?lang('resume_type'):"Resume Type";?></h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
					<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
				</div>
			</div>
			<!-- /.box-header -->
			<form action="<?= base_url('admin/profile/add_resume_type') ?>" method="post" class="" enctype= "multipart/form-data">
				<div class="box-body" >

					<!-- csrf token -->
					<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">

					<div class="row">
						<div class="form-group col-md-12">
					      	<label for="type_name"><?= !empty(lang('title'))?lang('title'):"title";?></label>
					        <input type="text" name="type_name" id="type_name" class="form-control" placeholder="<?= !empty(lang('title'))?lang('title'):"title";?>" value="<?= !empty($type_data['type_name'])?html_escape($type_data['type_name']):set_value('type_name'); ?>">
					        <span class="error"><?= form_error('type_name'); ?></span>
					    </div>

					    <div class="form-group col-md-12">
					      	<label for="icon"><?= !empty(lang('icon'))?lang('icon'):"icon";?></label>

					      	<div class="iconPickerdiv">
					      		<button class="input-group iconGroup w_100 btn btn-default" data-icon="<?= get_icon(!empty($data['icon'])?$data['icon']:'');?>" role="iconpicker"></span>
					      	</button>

					      </div>
							  	
					        <input type="hidden" name="icon" id="icon" class="form-control icon"  value='<?= !empty($type_data['icon'])?$type_data['icon']:set_value('icon'); ?>'>
					    </div>
					</div>
				    <input type="hidden" name="id" value="<?= isset($type_data['id']) && $type_data['id'] !=0?$type_data['id']:0 ?>">
				</div><!-- /.box-body -->
				<div class="box-footer">
					<?php if(isset($type_data['id']) && html_escape($type_data['id']) !=0){ ?>
						<div class="pull-left">
			          		<a href="<?= base_url('admin/profile/resume'); ?>" class="btn btn-default btn-block btn-flat"><?= !empty(lang('cancel'))?lang('cancel'):"cancel";?></a>
			          	</div>
		          <?php } ?>
		          	<div class="pull-right">
		          		<button type="submit" name="register" class="btn btn-primary btn-block btn-flat"><?= !empty(lang('submit'))?lang('submit'):"submit";?></button>
		          	</div>
				</div>
			</form>
		</div>
		<div class="box box-primary">
			<div class="box-header with-border">
				<h3 class="box-title"><?= get_features_name('resume');?></h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
					<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
				</div>
			</div>
			<!-- /.box-header -->
			<form action="<?= base_url('admin/profile/add_resume') ?>" method="post" class="skill_form" enctype= "multipart/form-data">
				<div class="box-body">

					<!-- csrf token -->
					<input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">

					<div class="row">
						<div class="form-group col-md-12">
					      	<label for="name"><?= !empty(lang('type'))?lang('type'):"type";?></label>
					       	<select name="resume_type" class="form-control" id="" required>
					       		<option value=""><?= !empty(lang('select'))?lang('select'):"select";?></option>
					       		<?php foreach ($resume_type as $value): ?>
					       			<option <?= isset($data['type_id']) && $value['id']==$data['type_id']?"selected":""; ?>  value="<?= html_escape($value['id']);?>"><?= html_escape($value['type_name']);?></option>
					       		<?php endforeach ?>
					       	</select>
					        <span class="error"><?= form_error('resume_type'); ?></span>
					    </div>

					    <div class="form-group col-md-12">
					      	<label for="title"><?= !empty(lang('title'))?lang('title'):"title";?> *</label>
					        <input type="text" name="title" id="title" class="form-control" placeholder="<?= !empty(lang('title'))?lang('title'):"title";?> " value="<?= !empty($data['title'])?html_escape($data['title']):set_value('title'); ?>" required>
					        <span class="error"><?= form_error('title'); ?></span>
					    </div>

					    <div class="form-group col-md-12">
					      	<label for="name"><?= !empty(lang('designation'))?lang('designation'):"designation";?>*</label>
					        <input type="text" name="designation" id="designation" class="form-control" placeholder="<?= !empty(lang('designation'))?lang('designation'):"designation";?>" value="<?= !empty($data['designation'])?html_escape($data['designation']):set_value('designation'); ?>" required>
					        <span class="error"><?= form_error('designation'); ?></span>
					    </div>

					    <div class="col-md-12">
							<label><?= !empty(lang('details'))?lang('details'):"details";?> *</label>
							<textarea name="details" id="" cols="5" rows="5" class="form-control" required><?= !empty($data['details'])?html_escape($data['details']):set_value('details'); ?></textarea>
							<span class="error"><?= form_error('details'); ?></span>
						</div>
					</div>
					<div class="row mt-15">
						<div class="form-group col-md-6">
							<label for="name"><?= !empty(lang('start_year'))?lang('start_year'):"Start Year";?> *</label>
							<div class="input-group date">
			                  <div class="input-group-addon">
			                    <i class="fa fa-calendar"></i>
			                  </div>
			                   <input type="number" name="start_year" id="start_year" class="form-control" placeholder="yyyy" value="<?= !empty($data['start_year'])?html_escape($data['start_year']):set_value('start_year'); ?>" required>
			                </div>
					        <span class="error"><?= form_error('start_year'); ?></span>
					    </div>

					    <div class="form-group col-md-6">
							<label for="name"><?= !empty(lang('end_year'))?lang('end_year'):"End Year";?></label>
							<div class="input-group date">
			                   <input type="number" name="end_year" id="end_year" class="form-control" placeholder="yyyy" value="<?= !empty($data['end_year'])?html_escape($data['end_year']):set_value('end_year'); ?>">
			                   <div class="input-group-addon">
			                    	<i class="fa fa-calendar"></i>
			                  	</div>

			                </div>
			                <p style="font-size: 12px;color: tomato;">* <?= !empty(lang('empty_as_present'))?lang('empty_as_present'):"Empty define as present";?></p>
					        <span class="error"><?= form_error('end_year'); ?></span>
					    </div>
					</div>
				    <input type="hidden" name="id" value="<?= isset($data['id']) && $data['id'] !=0?$data['id']:0 ?>">
				</div><!-- /.box-body -->
				<div class="box-footer">
					<?php if(isset($data['id']) && $data['id'] !=0){ ?>
						<div class="pull-left">
			          		<a href="<?= base_url('admin/profile/resume'); ?>" class="btn btn-default btn-block btn-flat"><?= !empty(lang('cancel'))?lang('cancel'):"cancel";?></a>
			          	</div>
		          <?php } ?>
		          	<div class="pull-right">
		          		<button type="submit" name="register" class="btn btn-primary btn-block btn-flat"><?= !empty(lang('submit'))?lang('submit'):"submit";?></button>
		          	</div>
				</div>
			</form>
		</div>
	</div>
	<div class="col-md-7">
		<div class="box box-info">
			<div class="box-header with-border">
				<h3 class="box-title"><?= !empty(lang('resume_type'))?lang('resume_type'):"Resume Type";?></h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
					<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
				</div>
			</div>
			<!-- /.box-header -->
			<div class="box-body">
				<div class="upcoming_events">
					<div class="table-responsive">
						<table class="table table-bordered">
							<thead>
								<tr>
									<th><?= !empty(lang('sl'))?lang('sl'):"sl";?></th>
									<th><?= !empty(lang('name'))?lang('name'):"name";?></th>
									<th><?= !empty(lang('username'))?lang('username'):"username";?></th>
									<th><?= !empty(lang('icon'))?lang('icon'):"icon";?></th>
									<th><?= !empty(lang('action'))?lang('action'):"action";?></th>
								</tr>
							</thead>
							<tbody>
								<?php $i=1; foreach ($resume_type as $row): ?>
									<tr>
										<td><?= $i;?></td>
										<td><?= html_escape($row['type_name']); ?></td>
										<td><?= html_escape(get_user_info_by_id($row['user_id'])['username']); ?></td>
										<td><div class="serviceImgs"><?= $row['icon'];?></div></td>
										<td><a href="<?= base_url('admin/profile/edit_resume_type/'.html_escape($row['id'])); ?>" class="btn btn-info btn-sm"><i class="fa fa-edit"></i> <?= !empty(lang('edit'))?lang('edit'):"Edit";?></a>
										<a href="<?= base_url('delete-item/'.html_escape($row['id']).'/resume_type'); ?>" class="btn btn-danger btn-sm action_btn" data-msg="<?= !empty(lang('want_to_delete'))?lang('want_to_delete'):'Want to delete?' ;?>"><i class="fa fa-trash"></i> <?= !empty(lang('delete'))?lang('delete'):"Delete";?></a>

										</td>
									</tr>
								<?php $i++; endforeach ?>
							</tbody>
						</table>
					</div>
				</div>	
			</div><!-- /.box-body -->
		</div>
		<div class="box box-info">
			<div class="box-header with-border">
				<h3 class="box-title"><?= get_features_name('resume');?></h3>
				<div class="box-tools pull-right">
					<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
					<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
				</div>
			</div>
			<!-- /.box-header -->
			<div class="box-body">
				<div class="upcoming_events">
					<div class="table-responsive">
						<table class="table table-bordered">
							<thead>
								<tr>
									<th><?= !empty(lang('sl'))?lang('sl'):"sl";?></th>
									<th><?= !empty(lang('type'))?lang('type'):"type";?></th>
									<th><?= !empty(lang('title'))?lang('title'):"title";?></th>
									<th><?= !empty(lang('designation'))?lang('designation'):"designation";?></th>
									<th ><?= !empty(lang('username'))?lang('username'):"username";?></th>
									<th><?= !empty(lang('start_year'))?lang('start_year'):"Start Year";?></th>
									<th><?= !empty(lang('end_year'))?lang('end_year'):"End Year";?></th>
									<th><?= !empty(lang('status'))?lang('status'):"status";?></th>
									<th><?= !empty(lang('action'))?lang('action'):"action";?></th>
								</tr>
							</thead>
							<tbody>
								<?php $i=1; foreach ($resume as $row): ?>
									<tr>
										<td><?= $i;?></td>
										<td><?= html_escape($row['type_name']); ?></td>
										<td><?= html_escape($row['title']); ?></td>
										<td><?= html_escape($row['designation']); ?></td>
										<td><?= html_escape(get_user_info_by_id($row['user_id'])['username']); ?></td>
										<td><?= html_escape($row['start_year']); ?></td>
										<td><?= html_escape($row['end_year'])==0?(!empty(lang('present'))?lang('present'):"present"): html_escape($row['end_year']);?></td>
										<td>
											<a href="javascript:;" data-id="<?= html_escape($row['id']);?>" data-status="<?= html_escape($row['status']);?>" data-table="resume" class="label <?= $row['status']==1?'label-success':'label-danger'?> change_status"> <i class="fa <?= $row['status']==1?'fa-check':'fa-close'?>"></i>&nbsp; <?= $row['status']==1?(!empty(lang('live'))?lang('live'):"Live"): (!empty(lang('hide'))?lang('hide'):"Hide");?></a>
										</td>
										<td><a href="<?= base_url('admin/profile/edit_resume/'.html_escape($row['id'])); ?>" class="btn btn-info btn-sm"><i class="fa fa-edit"></i> <?= !empty(lang('edit'))?lang('edit'):"edit";?></a>
										<a href="<?= base_url('delete-item/'.html_escape($row['id']).'/resume'); ?>" class="btn btn-danger btn-sm action_btn" data-msg="<?= !empty(lang('want_to_delete'))?lang('want_to_delete'):'Want to delete?' ;?>"><i class="fa fa-trash"></i> <?= !empty(lang('delete'))?lang('delete'):"Delete";?></a>
										</td>
										
									</tr>
								<?php $i++; endforeach ?>
							</tbody>
						</table>
					</div>
				</div>	
			</div><!-- /.box-body -->
		</div>
	</div>
</div>
