<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;

$app = Factory::getApplication();

$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;

$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));

$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));

$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));

$htag    = $this->params->get('show_page_heading') ? 'h2' : 'h1';

$additionalFields = array();
foreach($this->category->jcfields as $field) {
	$additionalFields[$field->name] = $field->value;
}
?>
<div class="com-content-category-blog blog blog-jobs" itemscope itemtype="https://schema.org/Blog">
	<div class="container">
		<div class="page-header tac page-sect sect-pb-xs-3 sect-pb-md-5">
			<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
		</div>
		<div class="row">
			<div class="col-12 col-md-6 col-xl-5">
				<? if (isset($additionalFields['img-jobs']) and !empty($additionalFields['img-jobs'])) :?>
					<div class="img-jobs"><?php echo $additionalFields['img-jobs']; ?></div>
				<?php endif;?>
			</div>
			<div class="col-12 col-md-6 col-xl-7">
				<?php if (!empty($this->intro_items)) : ?>
					<div class="com-content-category-blog__items blog-items <?php echo $blogClass; ?>">
					<?php foreach ($this->intro_items as $key => &$item) : ?>
						<div class="jobs_item"
							itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
								<?php
								$this->item = & $item;
								echo $this->loadTemplate('item');
								?>
						</div>
					<?php endforeach; ?>
					</div>
				<?php endif; ?>
				<div class="d-flex align-items-center justify-content-center page-sect sect-pt-xs-3 sect-pt-md-5">
					<a href="javascript:void;" class="sf2-callBtn" data-formid="simpleForm2_115"><?php echo Text::sprintf('COM_CONTENT_ANKETA'); ?></a>
				</div>
			</div>
		</div>
	</div>
</div>