<?php
/**
 * Single job listing.
 *
 * This template can be overridden by copying it to yourtheme/job_manager/content-single-job_listing.php.
 *
 * @see         https://wpjobmanager.com/document/template-overrides/
 * @author      Automattic
 * @package     wp-job-manager
 * @category    Template
 * @since       1.0.0
 * @version     1.28.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

global $post;
?>
<div class="single_job_listing">
	<?php if ( get_option( 'job_manager_hide_expired_content', 1 ) && 'expired' === $post->post_status ) : ?>
		<div class="job-manager-info"><?php _e( 'This listing has expired.', 'campoal' ); ?></div>
	<?php else : ?>
		<div class="ui vertical basic segment">
			<div class="ui grid">
				<div class="four wide mobile two wide tablet two wide computer column">
					<div class="ui tiny circular image">
						<?php the_company_logo(); ?>
					</div>
				</div>
				<div class="twelve wide mobile fourteen wide tablet fourteen wide computer column">
					<h1 class="ui header job-listing-title">
						<div class="content">
							<?php the_title(); ?>
							<div class="sub header">
								<?php the_company_name(); ?>
							</div>
						</div>
					<h1>
				</div>
			</div>
		</div>
		<div class="ui section divider"></div>
		<div class="ui grid">
			<div class="sixteen wide mobile ten wide computer column">
				<div class="job_description">
					<h2 class="ui header">
						<?php esc_html_e('Job Description', 'campoal') ?>
						<div class="sub header">
							<?php the_job_publish_date(); ?>
						</div>
					</h2>
					<div class="ui hidden divider"></div>
					<?php wpjm_the_job_description(); ?>
				</div>
			</div>
			<div class="sixteen wide mobile six wide computer column">
				<?php
					/**
					 * single_job_listing_start hook
					 *
					 * @hooked job_listing_meta_display - 20
					 * @hooked job_listing_company_display - 30
					 */
					do_action( 'single_job_listing_start' );
				?>

				<?php if ( candidates_can_apply() ) : ?>
					<?php get_job_manager_template( 'job-application.php' ); ?>
				<?php endif; ?>
			</div>
		</div>

		<?php
			/**
			 * single_job_listing_end hook
			 */
			do_action( 'single_job_listing_end' );
		?>
	<?php endif; ?>
</div>
<div class="ui hidden section divider"></div>