<?php $__env->startSection('content'); ?>
<div class="content-wrapper">
	<section class="content-header">
		<h1>
		<?php echo e(trans('general.perfil')); ?>

		</h1>
	</section>

	<section class="content">
		<a class="btn btn-app btn-flat bg-green" href="<?php echo e(asset('/users/'.$user->id.'/edit')); ?>"><i class="fa fa-edit"></i> <?php echo e(trans('general.edit')); ?></a>
		<a class="btn btn-app btn-flat bg-green" href="<?php echo e(asset('/users/'.$user->id.'/documents/create')); ?>"><i class="fa fa-file"></i> <?php echo e(trans('general.documentos')); ?></a>
		<div class="row">
			<div class="col-md-3">
				<div class="box box-success">
					<div class="box-body box-profile">
						<img class="profile-user-img img-responsive img-circle" src="<?php echo e(asset('/dist/img/users/'.$user->profile_picture)); ?>" alt="User profile picture">
						<h3 class="profile-username text-center"><?php echo e($user->first_name.' '.$user->last_name); ?></h3>
						
						<p class="small text-center no-margin"><span class="text-muted"><?php echo e(trans('general.usuario')); ?> ID:</span> <?php echo e($user->id); ?></p>
					</div>
					<div class="box-footer">
						<div class="row">
							<!--<div class="col-sm-4 border-right">
								<div class="description-block">
								<h5 class="description-header">8/11</h5>
								<span class="description-text small">Attendance</span>
								</div>
							</div>-->
							<div class="col-sm-6 border-right">
								<div class="description-block">
								<h5 class="description-header"><?php echo e($user->documents->count()); ?></h5>
								<span class="description-text small"><?php echo e(trans('general.documentos')); ?></span>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="box box-success">
					<div class="box-header">
						<h3 class="box-title"><?php echo e(trans('general.usuario')); ?> </h3>
					</div>
					<div class="box-body no-padding">
						<table class="table">
							<tbody>
							<tr>
								<td style="width: 10px" class="text-center"><i class="fa fa-user"></i></td>
								<td><strong><?php echo e(trans('general.user')); ?></strong></td>
								<td><?php echo e($user->username); ?></td>
							</tr>
							<tr>
								<td style="width: 10px" class="text-center"><i class="fa fa-ship"></i></td>
								<td><strong><?php echo e(trans('general.nauticaltitle')); ?></strong></td>
								<td><?php echo e($user->nauticaltitle); ?></td>
							</tr>
							<tr>
								<td style="width: 10px" class="text-center"><i class="fa fa-calendar"></i></td>
								<td><strong><?php echo e(trans('general.nauticaltitleexpedicion')); ?></strong></td>
								<td><?php echo e($user->nauticaltitleexpedicion); ?></td>
							</tr>
							<tr>
								<td style="width: 10px" class="text-center"><i class="fa fa-calendar"></i></td>
								<td><strong><?php echo e(trans('general.nauticaltitleexpiration')); ?></strong></td>
								<td><?php echo e($user->nauticaltitleexpiration); ?></td>
							</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
			<div class="col-md-9">
				<div class="row">
					<div class="col-md-6">
						<div class="box box-success">
							<div class="box-header">
								<h3 class="box-title"><?php echo e(trans('general.usuario')); ?> <?php echo e(trans('general.detalle')); ?> </h3>
							</div>
							<div class="box-body no-padding">
								<table class="table">
									<tbody>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-envelope-o"></i></td>
										<td><strong>Email</strong></td>
										<td><?php echo e($user->email); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-phone"></i></td>
										<td><strong><?php echo e(trans('general.telefono')); ?></strong></td>
										<td><?php echo e($user->telephone); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-mobile-phone"></i></td>
										<td><strong><?php echo e(trans('general.movil')); ?></strong></td>
										<td><?php echo e($user->cellphone); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-map-marker"></i></td>
										<td><strong><?php echo e(trans('general.direccion')); ?></strong></td>
										<td><?php echo e($user->local_address); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-user-secret"></i></td>
										<td><strong><?php echo e(trans('general.cif')); ?></strong></td>
										<td><?php echo e($user->cif); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-birthday-cake"></i></td>
										<td><strong><?php echo e(trans('general.birthday')); ?></strong></td>
										<td><?php echo e($user->birthday); ?></td>
									</tr>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-genderless"></i></td>
										<td><strong><?php echo e(trans('general.usuariogenero')); ?></strong></td>
										<td><?php echo e($user->gender_text()); ?></td>
									</tr>

									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-6">
						<div class="box box-success">
							<div class="box-header">
								<h3 class="box-title"><?php echo e(trans('general.documentos')); ?></h3>
							</div>
							<div class="box-body no-padding">
								<table class="table">
									<tbody>
									<?php foreach($user->documents as $document): ?>
									<tr>
										<td style="width: 10px" class="text-center"><i class="fa fa-file"></i></td>
										<td><strong><?php echo e($document->document_type ? $document->document_type->document_type : ''); ?></strong></td>
										<td><a href="<?php echo e(asset('documents/'.$document->id)); ?>" title="Edit" class="btn btn-default btn-flat btn-sm"><i class="fa fa-download"></i> <?php echo e(trans('general.descarga')); ?></a></td>
									</tr>
									<?php endforeach; ?>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make(Auth::check() && Auth::user()->role->layout == 1 ? 'layouts.admin' : 'layouts.employee', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>