diff --git a/app/Http/Controllers/TenantController.php b/app/Http/Controllers/TenantController.php index 00a0536..bd71edd 100644 --- a/app/Http/Controllers/TenantController.php +++ b/app/Http/Controllers/TenantController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers; use App\Models\Image; use App\Models\Tenant; +use App\Models\Theme; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; @@ -32,7 +33,8 @@ class TenantController extends BaseController $tenant = new Tenant(); $tenant->name = $validated["name"]; $tenant->url = $validated["url"]; - $tenant->template = "default"; + $tenant->template = "kuvia-blog"; + $tenant->gallery_default_theme = "kuvia-gallery"; $tenant->owner = Auth::user()->id; $tenant->saveOrFail(); @@ -113,4 +115,12 @@ class TenantController extends BaseController return \redirect("/s/watermark"); } + + public function tenantThemeView() { + $themes = Theme::query() + ->where("status", "=", "public") + ->where("typ", "=", "tenant") + ->get(); + return view("tenant.theme", ["themes" => $themes]); + } } diff --git a/resources/views/gallery/index.blade.php b/resources/views/gallery/index.blade.php index 7a344c9..47f9248 100644 --- a/resources/views/gallery/index.blade.php +++ b/resources/views/gallery/index.blade.php @@ -38,6 +38,7 @@ Upload Images Bilder Bearbeiten + Anschauen diff --git a/resources/views/layout/template.blade.php b/resources/views/layout/template.blade.php index 87e272a..ba97da8 100644 --- a/resources/views/layout/template.blade.php +++ b/resources/views/layout/template.blade.php @@ -26,6 +26,7 @@
diff --git a/resources/views/tenant/theme.blade.php b/resources/views/tenant/theme.blade.php new file mode 100644 index 0000000..132c099 --- /dev/null +++ b/resources/views/tenant/theme.blade.php @@ -0,0 +1,21 @@ +@extends('layout/template') + +@section('content') +Name | +Vorschau | +Action | +
---|---|---|
{{ $theme->name }} | +Vorschau | +Auswählen | +