From a1d302701a545cd3efbcbc091215d24b1d42fa7d Mon Sep 17 00:00:00 2001 From: 1day2die Date: Thu, 11 May 2023 11:06:30 +0200 Subject: [PATCH] Collapseable extension settings --- .../views/admin/settings/index.blade.php | 298 ++++++++++-------- 1 file changed, 175 insertions(+), 123 deletions(-) diff --git a/themes/default/views/admin/settings/index.blade.php b/themes/default/views/admin/settings/index.blade.php index f3438dd2..3c396a8c 100644 --- a/themes/default/views/admin/settings/index.blade.php +++ b/themes/default/views/admin/settings/index.blade.php @@ -12,7 +12,8 @@ @@ -24,7 +25,9 @@

{{ __('The installer is not locked!') }}

{{ __('please create a file called "install.lock" in your dashboard Root directory. Otherwise no settings will be loaded!') }}

- + + + @endif @@ -56,21 +59,54 @@ @foreach ($settings as $category => $options) - @canany(["settings.".strtolower($category).".read","settings.".strtolower($category).".write"]) - - @endcanany + @if(!str_contains($options['settings_class'],"Extension")) + @canany(["settings.".strtolower($category).".read","settings.".strtolower($category).".write"]) + + @endcanany + @endif @endforeach + + +

+
+
+ @@ -85,32 +121,41 @@ @csrf @method('POST')
-
- {{__("FavIcon")}} -
- -
- -
-
- {{__("Icon")}} - ... + {{__("FavIcon")}}
- +
+ +
+ {{__("Icon")}} + ... +
+ +
+
{{__("Login-page Logo")}} - ... + ...
-
@@ -121,104 +166,110 @@ @foreach ($settings as $category => $options) @canany(["settings.".strtolower($category).".read","settings.".strtolower($category).".write"]) -
+
-
- @csrf - @method('POST') - - + + @csrf + @method('POST') + + - @foreach ($options as $key => $value) - @if ($key == 'category_icon' || $key == 'settings_class') - @continue - @endif -
-
- -
+ @foreach ($options as $key => $value) + @if ($key == 'category_icon' || $key == 'settings_class') + @continue + @endif +
+
+ +
-
-
- @if ($value['description']) - - @else - - @endif +
+
+ @if ($value['description']) + + @else + + @endif -
- @switch($value) - @case($value['type'] == 'string') - - @break +
+ @switch($value) + @case($value['type'] == 'string') + + @break - @case($value['type'] == 'boolean') - - @break + @case($value['type'] == 'boolean') + + @break - @case($value['type'] == 'number') - - @break + @case($value['type'] == 'number') + + @break - @case($value['type'] == 'select') - - @foreach ($value['options'] as $option=>$display) - - @endforeach - - @break + @foreach ($value['options'] as $option=>$display) + + @endforeach + + @break - @case($value['type'] == 'multiselect') - - @break + @case($value['type'] == 'multiselect') + + @break - @case($value['type'] == 'textarea') - - @break + @case($value['type'] == 'textarea') + + @break - @default - @endswitch - @error($key) + @default + @endswitch + @error($key)
{{ $message }}
- @enderror + @enderror +
+ +
-
-
-
- @endforeach + @endforeach - -
-
- - +
+
+ + +
-
- -
+ +
@endcanany @endforeach @@ -261,9 +314,8 @@
-
- + @@ -277,7 +329,7 @@ $('.nav-item a[href="' + tabPaneHash + '"]').tab('show'); } - $('.nav-pills a').click(function(e) { + $('.nav-pills a').click(function (e) { $(this).tab('show'); const scrollmem = $('body').scrollTop(); window.location.hash = this.hash;