<? global $lang;?>
<div>
  <div class="mini-buttons" id="buttons">
    <a href="/panel-kandydata/profil" class="btn">
      <?= $lang['moj-profil'];?>
    </a>
    <a href="#" class="btn active">
      <?= $lang['wyslane-aplikacje'];?>
    </a>
    <a href="/panel-kandydata/obserwowane-oferty" class="btn">
      <?= $lang['obserwowane-oferty-pracy'];?>
    </a>
    <a href="/panel-kandydata/ustawienia-konta" class="btn">
      <?= $lang['ustawienia-konta'];?>
    </a>
  </div>
  <div class="mini-box fluid">
    <div class="title">
      <?= ucfirst( $lang['wyslane-aplikacje'] );?>
    </div>
  </div>
  <? if ( is_array( $this -> answers ) and count( $this -> answers ) ):?>
    <? foreach ( $this -> answers as $answer ):?>
      <div class="answer <? if ( !$answer['displayed'] ):?>nondisplayed<? else:?>displayed<? endif?>">
        <div class="row">
          <div class="col-12">
            <div class="img logo">
              <? if ( file_exists( \front\factory\GlobelusFirms::logo_url( $answer['user_id'] ) ) ):?>
                <img src="/logo/<?= $answer['user_id'];?>/<?= \S::get_token();?>">
              <? else:?>
                <img src="/images/no-logo.jpg">
              <? endif;?>
            </div>
            <div class="content">
              <div class="title">
                <a href="/oferta/<?= $answer['id'];?>/<?= \S::seo( $answer['title'], true );?>/" class="name" target="_blank"><?= $answer['title'];?></a> <span class="date-add"><?= date( 'Y-m-d H:i', strtotime( $answer['date_add'] ) );?></span>
              </div>
              <div class="text">
                <?= nl2br( $answer['text'] );?>
              </div>
            </div>
          </div>
        </div>
      </div>
    <? endforeach;?>
  <? else:?>
    <div class="alert alert-danger mt20"><?= $lang['panel-kandydata-brak-aplikacji'];?></div>
  <? endif;?>
</div>