filter.blade.php 3.19 KB
Newer Older
1 2
	<div id="options">
		<div id="toggle-box">
3
			<div id="settings">
4
				<a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('settings', ["fokus" => $metager->getFokus(), "url" => $metager->generateSearchLink($metager->getFokus())])) }}" @if(!empty($metager) && $metager->isFramed())target="_top" @endif>
5
					<i class="fas fa-cogs"></i>
Dominik Hebeler's avatar
Dominik Hebeler committed
6
					@if($metager->getSavedSettingCount() > 0) <span class="badge badge-primary"></span>{{ $metager->getSavedSettingCount() }}@endif
7 8 9
					@lang('metaGer.settings')&hellip;
				</a>
			</div>
10 11 12
			<div id="filter-toggle">
				@if(sizeof($metager->getAvailableParameterFilter()) > 0)
				<div class="option-toggle">
Aria Givi's avatar
Aria Givi committed
13
					<label class="navigation-element" for="options-toggle" tabindex="0">
14 15 16 17 18 19
						<i class="fas fa-filter"></i> Filter&hellip;
					</label>
				</div>
				@endif
				@if($metager->getManualParameterFilterSet())
				<div id="options-reset">
20
					<a href="{{$metager->generateSearchLink($metager->getFokus())}}" @if(!empty($metager) && $metager->isFramed())target="_top" @endif><nobr>{{ trans('metaGer.filter.reset') }}</nobr></a>
21 22
				</div>
				@endif
23 24 25
			</div>
			@if($metager->getTotalResultCount() > 0)
			<div id="result-count">
26
				<nobr>~ {{$metager->getTotalResultCount()}}</nobr> {{ trans('metaGer.results') }}
27 28 29
			</div>
			@endif
		</div>
30
		@if(sizeof($metager->getAvailableParameterFilter()) > 0)
31 32 33 34 35
		<input type="checkbox" id="options-toggle" @if(sizeof($metager->getParameterFilter()) > 0)checked @endif />
		<div class="scrollbox">
			<div id="options-box">
				<div id="options-items">
				@foreach($metager->getAvailableParameterFilter() as $filterName => $filter)
36
					@if(empty($filter->hidden) || $filter->hidden === false)
37
					<div class="option-selector">
38 39 40 41 42 43 44 45 46
						<div>
							<label for="{{$filterName}}">
								@lang($filter->name)
							</label>
						@if($filter->{'get-parameter'} === "f")
							<label for="custom-date" title="@lang('metaGer.filter.customdatetitle')">
								<i class="fas fa-cogs"></i>
							</label>
						</div>
47
							<input id="custom-date" type="checkbox" form="searchForm" @if(Request::input('fc', "off") === "on")checked @endif name="fc" onchange="if(!this.checked){this.form.submit()}"/>
48 49 50 51
						@else
						</div>
						@endif
						<select name="{{$filter->{'get-parameter'} }}" class="custom-select custom-select-sm" form="searchForm" onchange="this.form.submit()">
52
						@foreach($filter->values as $value => $text)
53
						@if($value === "nofilter" && Cookie::get($metager->getFokus() . "_setting_" . $filter->{"get-parameter"}) !== null)
54
						<option value="off" @if(empty($filter->value) || $filter->value === "off")selected @endif>{{trans($text)}}</option>
55 56
						@elseif($value === "nofilter")
						<option value="" @if(!empty($filter->value) && $filter->value === $value)selected @endif>{{trans($text)}}</option>
57 58 59
						@else
						<option value="{{$value}}" @if(!empty($filter->value) && $filter->value === $value)selected @endif>{{trans($text)}}</option>
						@endif
60 61
						@endforeach
					</select>
62 63 64
					@if(!empty($filter->htmlbelow))
						@include($filter->htmlbelow)
					@endif
65
					</div>
66
					@endif
67 68 69 70 71 72 73
				@endforeach
				</div>

			</div>
			<div class="scrollfade-right"></div>
		</div>
	@endif
74
	</div>