<?php
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\widgets\LinkPager;
?>
<div class="row">
<div class="col-md-12">
<h1 class="text-info">
<?php echo $job->title;?>
<?php if(isset(Yii::$app->user->identity->id) && (Yii::$app->user->identity->id == $job->user_id)):?>
<a href="/yii2_job_website/web/index.php?r=jobs/edit&id=<?php echo $job->id;?>" class="btn btn-warning pull-right" style="margin:5px;">Modifier</a>
<a href="/yii2_job_website/web/index.php?r=jobs/delete&id=<?php echo $job->id;?>" class="btn btn-danger pull-right" style="margin:5px;">Supprimer</a>
<?php endif;?>
</h1>
</div>
</div>
<hr>
<div class="row">
    <div class="col-md-6 col-md-offset-3">
    <ul class="list-group">
        <li class="list-group-item">
            <span class="label label-primary">
            Catégorie:
            <?php
                echo  $job->category->name;
            ?>
            </span>
        </li>
        <li class="list-group-item"> <span class="label label-success"><?php echo "Ville : ".$job->city;?></span> <span class="label label-danger pull-right"><?php echo "Type : ".$job->type;?></span></li>
     </ul>
    <h4>Déscription:</h4>
    <hr>
    <div class="well">
        <?php echo $job->description;?>
    </div>
        <ul class="list-group">
            <li class="list-group-item">
                <span class="label label-primary">
                Ajoutée le:
                <?php
                    echo  Yii::$app->formatter->asDatetime($job->created_at);
                ?>
                </span>
            </li>
            <li class="list-group-item">
                <strong><span class="text-inverse">Compétences:</span></strong>
                <?php
                    echo $job->competences;
                ?>
            </li>
            <li class="list-group-item">
                <strong><span class="text-inverse">Salaire:</span></strong>
                <?php
                    echo $job->salary;
                ?>
            </li>
            <li class="list-group-item">
                <strong><span class="text-inverse">Téléphone:</span></strong>
                <?php
                    echo $job->contact_phone;
                ?>
            </li>
            <li class="list-group-item">
                <strong><span class="text-inverse">Email:</span></strong>
                <?php
                    echo $job->contact_email;
                ?>
            </li>
        </ul>
    </div>
</div>
