index.blade.php 5 KB
Newer Older
1 2 3 4 5
@extends('layouts.subPages')

@section('title', $title )

@section('content')
6 7
<div id="settings">
    <div class="card-light">
Dominik Hebeler's avatar
Dominik Hebeler committed
8 9
        <h2>@lang('settings.header.1') ({{ $fokusName }})</h2>
        <p>@lang('settings.text.1', ["fokusName" => $fokusName])</p>
Dominik Hebeler's avatar
Dominik Hebeler committed
10
    </div>
11 12
    <div class="card-light">
        <h2>@lang('settings.hint.header')</h2>
13
        <p>@lang('settings.hint.text', ["link" => LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('showAllSettings', ['url' => url()->full()])) ])</p>
14
    </div>
15
    <div class="card-light">
Dominik Hebeler's avatar
Dominik Hebeler committed
16 17
        <h2>@lang('settings.header.2')</h2>
        <p>@lang('settings.text.2')</p>
18 19 20 21 22 23 24 25 26 27 28 29 30
        <p></p>
        <div class="sumas enabled-engines">
            @foreach($sumas as $suma => $sumaInfo)
            @if(! $sumaInfo["filtered"] && $sumaInfo["enabled"])
                <div class="suma">
                    <form action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('disableEngine')) }}" method="post">
                        <input type="hidden" name="suma" value="{{ $suma }}">
                        <input type="hidden" name="fokus" value="{{ $fokus }}">
                        <input type="hidden" name="url" value="{{ $url }}">
                        <button type="submit">{{ $sumaInfo["display-name"] }}</button>
                    </form>
                </div>
            @endif
Dominik Hebeler's avatar
Dominik Hebeler committed
31 32
            @endforeach
        </div>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
        <div class="sumas disabled-engines">
            @foreach($sumas as $suma => $sumaInfo)
            @if( !$sumaInfo["filtered"] && !$sumaInfo["enabled"])
                <div class="suma">
                    <form action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('enableEngine')) }}" method="post">
                        <input type="hidden" name="suma" value="{{ $suma }}">
                        <input type="hidden" name="fokus" value="{{ $fokus }}">
                        <input type="hidden" name="url" value="{{ $url }}">
                        <button type="submit">{{ $sumaInfo["display-name"] }}</button>
                    </form>
                </div>
            @endif
            @endforeach
        </div>
        @if($filteredSumas)
Dominik Hebeler's avatar
Dominik Hebeler committed
48
        <h4>@lang('settings.disabledByFilter')</h4>
49 50 51 52 53 54 55 56 57 58 59 60
        <div class="sumas filtered-engines">
            @foreach($sumas as $suma => $sumaInfo)
            @if($sumaInfo["filtered"])
                <div class="suma">
                    {{ $sumaInfo["display-name"] }}
                </div>
            @endif
            @endforeach
        </div>
        @endif
    </div>
    <div class="card-light">
Dominik Hebeler's avatar
Dominik Hebeler committed
61 62
        <h2>@lang('settings.header.3')</h2>
        <p>@lang('settings.text.3')</p>
63
        <form id="filter-form" action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('enableFilter')) }}" method="post" class="form">
Dominik Hebeler's avatar
Dominik Hebeler committed
64
            <input type="hidden" name="fokus" value="{{ $fokus }}">
65 66 67
            <input type="hidden" name="url" value="{{ $url }}">
            <div id="filter-options">
                @foreach($filter as $name => $filterInfo)
68
                @if(empty($filterInfo->hidden) || $filterInfo->hidden === false)
69 70 71
                <div class="form-group">
                    <label for="{{ $filterInfo->{"get-parameter"} }}">@lang($filterInfo->name)</label>
                    <select name="{{ $filterInfo->{"get-parameter"} }}" id="{{ $filterInfo->{"get-parameter"} }}" class="form-control">
Dominik Hebeler's avatar
Dominik Hebeler committed
72
                        <option value="" @if(Cookie::get($fokus . "_setting_" . $filterInfo->{"get-parameter"}) === null)disabled selected @endif>@lang('metaGer.filter.noFilter')</option>
73 74 75 76 77 78 79
                        @foreach($filterInfo->values as $key => $value)
                        @if(!empty($key))
                        <option value="{{ $key }}" {{ Cookie::get($fokus . "_setting_" . $filterInfo->{"get-parameter"}) === $key ? "disabled selected" : "" }}>@lang($value)</option>
                        @endif
                        @endforeach
                    </select>
                </div>
80
                @endif
81 82
                @endforeach
            </div>
Dominik Hebeler's avatar
Dominik Hebeler committed
83
            <button type="submit" class="btn btn-default">@lang('settings.save')</button>
Dominik Hebeler's avatar
Dominik Hebeler committed
84
        </form>
85

Dominik Hebeler's avatar
Dominik Hebeler committed
86
    </div>
87 88 89 90 91 92
    <div class="card-light" id="actions">
        @if($settingActive)
        <div id="reset">
            <form action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('deleteSettings', ["fokus" => $fokus, "url" => $url])) }}" method="post">
                <input type="hidden" name="url" value="{{ $url }}">
                <input type="hidden" name="fokus" value="{{ $fokus }}">
Dominik Hebeler's avatar
Dominik Hebeler committed
93
                <button type="submit" class="btn btn-sm btn-danger">@lang('settings.reset')</button>
94 95 96 97
            </form>
        </div>
        @endif
        <div id="back">
Dominik Hebeler's avatar
Dominik Hebeler committed
98
            <a href="{{ $url }}" class="btn btn-sm btn-default">@lang('settings.back')</a>
99
        </div>
Dominik Hebeler's avatar
Dominik Hebeler committed
100
    </div>
101

102 103
    <script src="{{ mix('js/scriptSettings.js') }}"></script>
</div>
104
@endsection