Commit 21bd43fe authored by Dominik Hebeler's avatar Dominik Hebeler

Do not show disabled search engines

parent 4f9b49dc
......@@ -81,6 +81,10 @@ class SettingsController extends Controller
$sumas = [];
foreach ($sumasFoki as $suma) {
if ((!empty($langFile->sumas->{$suma}->disabled) && $langFile->sumas->{$suma}->disabled) ||
(!empty($langFile->sumas->{$suma}->{"auto-disabled"}) && $langFile->sumas->{$suma}->{"auto-disabled"})) {
continue;
}
$sumas[$suma]["display-name"] = $langFile->sumas->{$suma}->{"display-name"};
$sumas[$suma]["filtered"] = false;
if (Cookie::get($fokus . "_engine_" . $suma) === "off") {
......
......@@ -18,6 +18,7 @@ return [
"back" => "Zurück zur letzten Seite",
// Translations from the settings overview
'noSettings' => "Aktuell sind keine Einstellungen gesetzt!",
'allSettings.header' => "Auf :root gesetzte Einstellungen",
'allSettings.text' => "Hier finden Sie eine Übersicht aller von Ihnen gesetzten Einstellungen und Cookies. Sie können einzelne Einträge löschen, oder alle entfernen. Bedenken Sie, dass die zugehörigen Einstellungen dann nicht mehr verwendet werden.",
......
......@@ -18,6 +18,7 @@ return [
"back" => "Back to the last page",
// Translations from the settings overview
'noSettings' => "Currently no settings are set!",
'allSettings.header' => "Settings on :root",
'allSettings.text' => "Here you will find an overview of all settings and cookies you have set. You can delete individual entries or remove them all. Keep in mind that the associated settings will no longer be used.",
......
......@@ -7,7 +7,7 @@
<div class="card-light">
<h2>@lang('settings.allSettings.header', ["root" => Request::root()])</h2>
<p>@lang('settings.allSettings.text')</p>
@if(sizeof(Cookie::get()) > 0)
<div class="table-responsive">
<table class="table table-striped">
<thead>
......@@ -47,13 +47,17 @@
@endforeach
</tbody>
</table>
@else
<p id="no-settings">@lang('settings.noSettings')</p>
@endif
<div id="actions">
<a href="{{ $url }}" class="btn btn-sm btn-default">@lang('settings.back')</a>
@if(sizeof(Cookie::get()) > 0)
<form action="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('removeAllSettings'))}}" method="post">
<input type="hidden" name="url" value="{{ url()->full() }}">
<button type="submit" class="btn btn-sm btn-danger">@lang('settings.reset')</button>
</form>
@endif
</div>
</div>
</div>
......@@ -68,5 +72,8 @@
#actions > a, #actions > form {
margin-left: 8px;
}
#no-settings {
text-align: center;
}
</style>
@endsection
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment