metager3results.blade.php 1.5 KB
Newer Older
1
2
{{-- Show all errors --}}
@if(sizeof($errors) > 0)
3
4
5
	<div class="alert alert-danger">
		<ul>
			@foreach($errors as $error)
6
				<li>{!! $error !!}</li>
7
8
9
10
			@endforeach
		</ul>
	</div>
@endif
11
12
{{-- Show all warnings --}}
@if(sizeof($warnings) > 0)
13
14
15
16
17
18
19
20
	<div class="alert alert-warning">
		<ul>
			@foreach($warnings as $warning)
				<li>{!! $warning !!}</li>
			@endforeach
		</ul>
	</div>
@endif
21
<div id="results">
Karl Hasselbring's avatar
Karl Hasselbring committed
22
	{{-- Show initial products or a
23
	@if($metager->hasProducts())
24
25
		@if( $metager->getFokus() !== "produktsuche" && !$apiAuthorized)
			@include('layouts.products', ['products' => $metager->getProducts()])
Phil Höfer's avatar
Phil Höfer committed
26
		@endif
27
	@else
Dominik Hebeler's avatar
Dominik Hebeler committed
28
		@for($i = 0; $i <= 2; $i++)
29
30
31
			@include('layouts.ad', ['ad' => $metager->popAd()])
		@endfor
	@endif
32
33
	{{-- Show map --}}
	{{-- Create results and ongoing ads --}}
34
	@foreach($metager->getResults() as $result)
35
		@if($result->number % 7 === 0)
36
			@include('layouts.ad', ['ad' => $metager->popAd()])
37
38
39
		@endif
		@include('layouts.result', ['result' => $result])
	@endforeach
40
41
42
43
44
45
46
47
	{{-- Show pagination --}}
	<nav class="mg-pager" aria-label="...">
		<div @if($metager->getPage() === 1) class="disabled" @endif>
			<a @if($metager->getPage() !== 1) href="javascript:history.back()" @endif>{{ trans('results.zurueck') }}</a>
		</div>
		<div @if($metager->nextSearchLink() === "#") class="disabled" @endif>
			<a @if($metager->nextSearchLink() !== "#") href="{{ $metager->nextSearchLink() }}" @endif>{{ trans('results.weiter') }}</a>
		</div>
48
	</nav>
49
</div>
50
@if( $metager->showQuicktips() )
51
52
	<div id="quicktips"></div>
@endif