@extends('theme::template')

@section('banner')
  <div class="nbanner" {{ inject('visual')->url('ad', 4) }} data-position-top="80px">
    <img src="{{ inject('ad')->single(4, 5, 'img') }}" alt="{{ inject('ad')->single(4, 5, 'title') }}">
  </div>
@stop

@section('anchor')
<div id="anchor">
	<div class="container-fluid">
		<span class="anchor">
			<a href="{{ url('/') }}">{{ inject('setting')->langs('system', 'home') }}</a> > 
			<a href="{{ url('job') }}">{{ inject('setting')->langs('system', 'jobs') }}</a> > 
			<a href="{{ url("job/{$job->cates->slug}") }}">{{ $job->cates->description->cname }}</a> > 
			<span>{{ $job->description->title or '' }}</span>
		</span>
	</div>
</div>
@stop

@section('left')
<div class="hidden-xs hidden-sm">
	<h3 class="left-title">{{ inject('setting')->langs('system', 'jobs') }}</h3>
	<ul class="cate-list" {{ inject('visual')->url('job-cate') }}>
		@foreach (inject('category')->cate('job') as $value)
			<div class="category">
				<a class="list-title {{ $value->slug == $job->cates->slug ? 'active' : ''}}" href="{{ $value->present()->url('job') }}" title="{{ $value->cname }}">{{ $value->cname }}</a>
				<span class="{{ !$value->children->isEmpty() ? 'arrow-click' : ''}}"></span>
					@if(!$value->children->isEmpty())
					<ul class="map-category-list">
						@foreach ($value->children as $val)
							<li>
								<a class="{{ $val->slug == $job->cates->slug ? 'active' : ''}}" href="{{ $val->present()->url('job') }}">{{ $val->cname }}</a>
							</li>
						@endforeach
					</ul>
				@endif
			</div>
		@endforeach
	</ul>
</div>


<div class="page-wrap-left xymob-menu-click">
    <div class="xymob-left-close-btn"><i class="icon-font icon-close"></i></div>
    <div class="xypg-left">
        <div class="xypg-left-box xypg-left-menu">
            <div class="xypg-left-title">
                <h3>{{ inject('setting')->langs('system', 'jobs') }}</h3>
            </div>
            <div class="xypg-left-con">
                <ul class="xypg-left-nav" {{ inject('visual')->url('job-cate') }}>
					@foreach (inject('category')->cate('job') as $value)
                    <li>
                        <a href="{{ $value->present()->url('job') }}" title="{{ $value->cname }}">{{ $value->cname }}</a>
                        <div class="first-nav-btn"></div>
						@if(!$value->children->isEmpty())
						<ul class="xypg-left-subnav">
							@foreach ($value->children as $val)
							<li><a href="{{ $val->present()->url('job') }}">{{ $val->cname }}</a></li>
							@endforeach
						</ul>
						@endif
                    </li>
					@endforeach
                </ul>
            </div>
        </div>
        
    </div>
</div>

<div class="page-mob-tool">
    <ul>
        <li class="xymob-page-navbtn"><span></span></li>
        <li class="xymob-page-backtop"><i class="icon-font icon-top"></i></li>
    </ul>
</div>

@include('theme::common.left_side')
@stop

@section('right')
<div class="job-detail" {{ inject('visual')->url('job', $job) }}>
	<h1 class="title">{{ inject('setting')->langs('system', 'position') }}：{{ $job->description->title or '' }}</h1>
	<div class="job-head pb-10">
		<span>{{ inject('setting')->langs('system', 'classification') }}：{{ $job->cates->cname }}</span>
		<span>{{ inject('setting')->langs('system', 'browse_times') }}：{{ $job->hits }}</span>
		<span>{{ inject('setting')->langs('system', 'release_date') }}：{{ $job->created_at }}</span>
	</div>

	<div class="light">{{ inject('setting')->langs('system', 'recruitment_number') }}：{{ $job->number }}</div>
	<div class="light">{{ inject('setting')->langs('system', 'work_place') }}：{{ $job->description->city or '' }}</div>

	<div class="light">{{ inject('setting')->langs('system', 'other_requirements') }}：</div>
	<div class="cont">{!! $job->description->content or '' !!}</div>
	<div class="light">{{ inject('setting')->langs('system', 'contact_number') }}：{{ $job->contact }}</div>

	<div class="tags-list-detail">
		<span>{{ inject('setting')->langs('system', 'related_labels') }}：</span>
		@foreach ($tags as $value)
		<a href="{{ url('/tag/'.$value->slug) }}">{{ $value->description->name or $value->name }}</a>
		@endforeach
	</div>
	<ul id="page-next-prev">
		<li>
			<span>{{ inject('setting')->langs('system', 'previous') }}：</span>
			{!! inject('list')->pageNextPrev('job', $job->pid, $job->id, 'prev') !!}
		</li>
		<li>
			<span>{{ inject('setting')->langs('system', 'next') }}：</span>
			{!! inject('list')->pageNextPrev('job', $job->pid, $job->id, 'next') !!}
		</li>
	</ul>
</div>
@include('theme::common.comment', ['model_type' => 'job', 'model_id' => $job->id])
@stop

