{{ include('common/header.twig') }}
<div class="page-title">
	<div class="row align-items-center">
		<div class="col-sm-8">
			<h2 class="page-title-text d-inline-block">{{ page_title }}</h2>
			<div class="breadcrumbs d-inline-block">
				<ul>
					<li><a href="{{ common.info.url }}">Dashboard</a></li>
					<li>{{ page_title }}</li>
				</ul>
			</div>
		</div>
		<div class="col-sm-4 text-right">
			<div class="dropdown d-inline-block m-2">
				<a class="btn btn-white btn-sm dropdown-toggle" data-toggle="dropdown"><i class="las la-cloud-download-alt text-primary pr-2"></i> Export</a>
				<ul class="dropdown-menu dropdown-menu-right export-button">
					<li><a href="#" class="pdf"><i class="las la-file-pdf pr-2"></i>PDF</a></li>
					<li><a href="#" class="excel"><i class="las la-file-excel pr-2"></i>Excel</a></li>
					<li><a href="#" class="csv"><i class="las la-file-csv pr-2"></i>CSV</a></li>
					<li><a href="#" class="print"><i class="las la-print pr-2"></i>Print</a></li>
					<li><a href="#" class="copy"><i class="las la-copy pr-2"></i>Copy</a></li>
				</ul>
			</div>
		</div> 
	</div>
</div>
<div class="panel panel-default">
	<div class="panel-body">
		<div class="table-responsive">
			<table class="table table-middle table-bordered table-striped datatable-table">
				<thead>
					<tr>
						<th>#</th>
						<th>User Info</th>
						<th>User Role</th>
						<th>Salary Grade</th>
						<th>Status</th>
						{% if page_view or page_edit or page_add or page_history %}
							<th></th>
						{% endif %}
					</tr>
				</thead>
				<tbody>
					{% for value in result %}
						<tr>
							<td>{{ loop.index }}</td>
							<td>
								<p class="text-primary m-0">{{ value.name }}</p>
								<p class="m-0">{{ value.email }}</p>
							</td>
							<td>{{ value.role }}</td>
							<td>{{ value.grade }}</td>
							<td>
								{% if value.status == '1' %}
									<span class="label label-success">Active</span>
								{% else %}
									<span class="label label-danger">InActive</span>
								{% endif %}
							</td>
							{% if page_view or page_edit or page_add or page_history %}
								<td class="table-action">
									{% if value.salarytemplate_id %}
										{% if page_view or page_edit %}
											<div class="dropdown d-inline-block">
												<a class="text-primary edit dropdown-toggle" data-toggle="dropdown"><i class="las la-ellipsis-h"></i></a>
												<ul class="dropdown-menu dropdown-menu-right export-button">
													{% if page_view %}
														<li><a href="{{ common.info.url_route~'managesalary/view&id='~value.user_id }}"><i class="las la-laptop pr-2"></i>View</a></li>
													{% endif %}
													{% if page_edit %}
														<li><a href="{{ common.info.url_route~'managesalary/edit&id='~value.user_id }}"><i class="las la-edit pr-2"></i>Edit</a></li>
													{% endif %}
													{% if page_history %}
														<li><a href="{{ common.info.url_route~'managesalary/history&id='~value.user_id }}"><i class="las la-history pr-2"></i>Payment History</a></li>
													{% endif %}
												</ul>
											</div>
										{% endif %}
									{% else %}
										<a href="{{ common.info.url_route~'managesalary/add&id='~value.user_id }}" data-toggle="tooltip" title="Add Salary Template"><i class="las la-plus text-primary"></i></a>	
									{% endif %}
								</td>
							{% endif %}
						</tr>
					{% endfor %}
				</tbody>
			</table>
		</div>
	</div>
</div>
{{ include('common/footer.twig') }}