

<?php $__env->startSection('title', trans('user.views.index.title')); ?>

<?php $__env->startSection('content'); ?>
<div class="tp-dashboard-head"><!-- page header -->
  <div class="container">
    <div class="row">
      <div class="col-md-12 profile-header">
        <div class="profile-pic col-md-2">
          <?php if($user->logo != null): ?>

          <img src="<?php echo e($user->logo_thumb); ?>" alt="" class="img-circle">
          <?php else: ?>
          <img src="<?php echo e(asset('images/couple-profile.jpg')); ?>" alt="" class="img-circle">
          <?php endif; ?>
        </div>
        <div class="profile-info col-md-9">
          <h1 class="profile-title"><?php echo e($user->name); ?><small>#</small></h1>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- /.page header -->
<div class="tp-dashboard-nav">
  <div class="container">
    <div class="row">
      <div class="col-md-12 dashboard-nav">
          <?php echo $__env->make('vendor._partials.navigation', ['_active_navigation' => 'profile'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      </div>
    </div>
  </div>
</div>
<!-- /.page header -->
<div class="tp-dashboard-nav">
  <div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="page-header">
                <h1><?php echo e($job->title); ?></h1>
            </div>

            <div class="row">
                <div class="col-lg-12">
                    <p class="text-center">
                        <a href="<?php echo e(route('user.job.edit')); ?>" class="btn btn-default"><?php echo e(trans('user.views.job.edit')); ?></a>
                        <?php if($job->active): ?>
                            <a href="<?php echo e(route('job.show', [$job->id, $job->slug])); ?>" class="btn btn-info"><i class="glyphicon glyphicon-link"></i></a>
                        <?php endif; ?>
                        <?php if(config('payment.enabled')): ?>
                            <a href="<?php echo e(route('user.job.services', $job->id)); ?>" class="btn btn-warning">Promoveaza</a>
                        <?php endif; ?>
                        <?php if(!$job->filled): ?>
                            <a href="<?php echo e(route('user.job.fill', $job->id)); ?>" class="btn btn-danger confirm-action"><?php echo e(trans('user.views.job.fill')); ?></a>
                            <?php else: ?>
                            <a href="<?php echo e(route('user.job.unfill', $job->id)); ?>" class="btn btn-success confirm-action"><?php echo e(trans('user.views.job.unfill')); ?></a>
                        <?php endif; ?>
                    </p>
                    <hr>
                    <?php if(count($services) > 0): ?>
                        <h4><?php echo e(trans('user.views.job.services.header')); ?></h4>
                        <table class="table table-hover no-margin">
                            <thead>
                            <tr>
                                <th><?php echo e(trans('user.views.job.services.active')); ?></th>
                                <th><?php echo e(trans('user.views.job.services.title')); ?></th>
                                <th><?php echo e(trans('user.views.job.services.type')); ?></th>
                                <th><?php echo e(trans('user.views.job.services.price')); ?></th>
                                <th><?php echo e(trans('user.views.job.services.active_from')); ?></th>
                                <th><?php echo e(trans('user.views.job.services.active_to')); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach($services as $service): ?>
                                <tr>
                                    <td>
                                        <?php if($service->active): ?>
                                            <span class="label label-success"><?php echo e(trans('user.views.job.services.active_yes')); ?></span>
                                        <?php else: ?>
                                            <span class="label label-danger"><?php echo e(trans('user.views.job.services.active_no')); ?></span>
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($service->title); ?></td>
                                    <td><?php echo e(trans('user.views.job.services.type_' . $service->type)); ?></td>
                                    <td>
                                        <?php if(!is_null($service->price)): ?>
                                            <?php echo e(format_balance($service->price)); ?>

                                        <?php else: ?>
                                            <span class="label label-default"><?php echo e(trans('user.views.job.services.price_free')); ?></span>
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($service->active_from); ?></td>
                                    <td><?php echo e($service->active_to); ?></td>
                                </tr>
                            <?php endforeach; ?>
                            </tbody>
                        </table>
                        <hr>
                    <?php endif; ?>
                    <div class="well well-sm">
                        <div class="row">
                            <div class="col-md-6">
                                <dl class="dl-horizontal">
                                    <dt><?php echo e(trans('user.views.job.details.status')); ?></dt>
                                    <dd>
                                        <?php if($job->active): ?>
                                            <span class="label label-success">Activ</span>
                                        <?php else: ?>
                                            <span class="label label-default">Inactiv</span>
                                        <?php endif; ?>
                                        <?php if($job->new): ?>
                                            <span class="label label-warning">Nou</span>
                                        <?php endif; ?>
                                        <?php if($job->featured): ?>
                                            <span class="label label-warning">Promovat</span>
                                        <?php endif; ?>
                                        <?php if($job->filled): ?>
                                            <span class="label label-danger"><?php echo e(trans('user.views.job.details.status_filled')); ?></span>
                                        <?php endif; ?>
                                    </dd>
                                </dl>
                            </div>
                            <div class="col-md-6">
                                <dl class="dl-horizontal">
                                    <dt>Total vizite</dt>
                                    <dd>
                                        <?php echo e((int) app('counter')->get('model.job.'.$job->id.'.opened.total')->getValue()); ?>

                                    </dd>
                                </dl>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-12">
                                <dl class="dl-horizontal">
                                    <dt>Nume Furnizor</dt>
                                    <dd>
                                        <?php if($job->company): ?>
                                            <a href="<?php echo e(route('user.company.edit', $job->company->id)); ?>"><?php echo e($job->company->name); ?></a>
                                        <?php else: ?>
                                            -
                                        <?php endif; ?>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-12">
                                <dl class="dl-horizontal">
                                    <dt>Description</dt>
                                    <dd><?php echo nl2br($job->description); ?></dd>
                                </dl>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-6">
                                <dl class="dl-horizontal">
                                    <dt>Categoria</dt>
                                    <dd>
                                        <?php if(count($job->categories) > 0): ?>
                                            <ul class="list-unstyled">
                                                <?php foreach($job->categories as $jobCategory): ?>
                                                    <li><?php echo e($jobCategory->title); ?></li>
                                                <?php endforeach; ?>
                                            </ul>
                                        <?php else: ?>
                                            -
                                        <?php endif; ?>
                                    </dd>
                                </dl>
                            </div>
                            <div class="col-md-6">
                                <dl class="dl-horizontal">
                                    <dt>Filtre</dt>
                                    <dd></dd>
                                </dl>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-4">
                                <dl class="dl-horizontal">
                                    <dt>Adresa</dt>
                                    <dd>
                                        <?php echo e($job->adress); ?>

                                    </dd>
                                </dl>
                            </div>
							<div class="col-md-4">
                                <dl class="dl-horizontal">
                                    <dt>Judet</dt>
                                    <dd>
                                        <?php echo e($job->country); ?>

                                    </dd>
                                </dl>
                            </div>
							<div class="col-md-4">
                                <dl class="dl-horizontal">
                                    <dt>Localitate</dt>
                                    <dd>
                                        <?php echo e($job->city); ?>

                                    </dd>
                                </dl>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-4">
                                <dl class="dl-horizontal">
                                    <dt>Telefon 1</dt>
                                    <dd>
                                        <?php echo e($job->telephone1); ?>

                                    </dd>
                                </dl>
                            </div>
							<div class="col-md-4">
                                <dl class="dl-horizontal">
                                    <dt>Telefon 2</dt>
                                    <dd>
                                        <?php echo e($job->telephone2); ?>

                                    </dd>
                                </dl>
                            </div>
							<div class="col-md-4">
                                <dl class="dl-horizontal">
                                    <dt>Webpage</dt>
                                    <dd>
                                        <?php echo e($job->webpage); ?>

                                    </dd>
                                </dl>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-12">
								<iframe src="https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d11070.29865397543!2d23.55881525!3d46.0795216!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sro!2sro!4v1478179204181" width="100%" height="350" frameborder="0" style="border:0" allowfullscreen></iframe>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col-md-6">
                                <dl class="dl-horizontal">
                                    <dt>Activ de la</dt>
                                    <dd><?php echo e($job->active_from); ?></dd>
                                </dl>
                            </div>
                            <div class="col-md-6">
                                <dl class="dl-horizontal">
                                    <dt>Activ pana la</dt>
                                    <dd><?php echo e($job->active_to); ?></dd>
                                </dl>
                            </div>
                        </div>
                    </div>
					                    <?php echo Notification::showAll(); ?>

                    <?php if(count($statistics['daily']) > 0): ?>
                        <div class="row">
                            <div class="col-md-10 col-md-offset-1">
                                <canvas id="viewsChart" width="450" height="200"></canvas>
                            </div>
                        </div>
                        <hr>
                    <?php else: ?>
                        <div class="alert alert-info"><?php echo e(trans('user.views.job.no_views')); ?></div>
                        <hr>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
	</div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>