allSettings.blade.php 3.42 KB
Newer Older
1 2 3 4 5 6 7
@extends('layouts.subPages')

@section('title', $title )

@section('content')
<div id="all-settings">
    <div class="card-light">
8 9
        <h2>@lang('settings.allSettings.header', ["root" => Request::root()])</h2>
        <p>@lang('settings.allSettings.text')</p>
10
        @if(sizeof(Cookie::get()) > 0)
11 12 13 14 15
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>Cookie</th>
16 17
                        <th>@lang('settings.meaning')</th>
                        <th>@lang('settings.actions')</th>
18 19 20 21 22 23 24 25
                    </tr>
                </thead>
                <tbody>
                    @foreach(Cookie::get() as $key => $value)
                    <tr>
                        <td>{{ $key . "=" . $value }}</td>
                        <td>
                        @if(strpos($key, "_engine_") !== FALSE)
26
                        @lang('settings.engineDisabled', ["engine" => $sumaFile->sumas->{substr($key, strrpos($key, "_")+1)}->{"display-name"}, "focus" => trans('index.foki.' . substr($key, 0, strpos($key, "_")))])
27 28 29
                        @elseif(strpos($key, "_setting_") !== FALSE)
                            @foreach($sumaFile->filter->{"parameter-filter"} as $filterName => $filter)
                                @if($filter->{"get-parameter"} === substr($key, strrpos($key, "_")+1))
30
                                @lang($filter->name)=@lang($filter->values->$value) @lang('settings.inFocus') @lang('index.foki.' . substr($key, 0, strpos($key, "_")))
31 32 33
                                @endif
                            @endforeach
                        @elseif($key === "key")
34
                        @lang('settings.key')
35 36
                        @endif
                        </td>
37 38 39 40
                        <td>
                            <form action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('removeOneSetting')) }}" method="post">
                                <input type="hidden" name="key" value="{{ $key }}">
                                <input type="hidden" name="url" value="{{ url()->full() }}">
41
                                <button type="submit" title="@lang('settings.removeCookie')">
42 43 44 45
                                    <i class="fas fa-trash-alt"></i>
                                </button>
                            </form>
                        </td>
46 47 48 49
                    </tr>
                    @endforeach
                </tbody>
            </table>
50 51 52
            @else
            <p id="no-settings">@lang('settings.noSettings')</p>
            @endif
53
            <div id="actions">
54
                <a href="{{ $url }}" class="btn btn-sm btn-default">@lang('settings.back')</a>
55
                @if(sizeof(Cookie::get()) > 0)
56 57
                <form action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('removeAllSettings'))}}" method="post">
                    <input type="hidden" name="url" value="{{ url()->full() }}">
58
                    <button type="submit" class="btn btn-sm btn-danger">@lang('settings.reset')</button>
59
                </form>
60
                @endif
61
            </div>
62 63 64
        </div>
    </div>
</div>
65 66 67 68 69 70 71 72 73 74
<style>
#actions {
    display: flex;
    margin-left: -8px;
    align-items: center;
    justify-content: center;
}
#actions > a, #actions > form {
    margin-left: 8px;
}
75 76 77
#no-settings {
    text-align: center;
}
78
</style>
79
@endsection