Files
WitShop/resources/views/admin/email-templates/edit.blade.php
T
marcoandClaude Sonnet 4.6 5dad8b9324
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s
Add email templates, page layouts, and shop themes (template system)
- E-Mail-Templates: DB-gespeicherte HTML-Templates mit {{placeholder}}-System,
  Admin-UI zum Bearbeiten von Betreff und Body, alle 4 Mailables aktualisiert
- Seiten-Layouts: 4 Layouts für CMS-Seiten (Standard, Sidebar, Volle Breite, Landing),
  Layout-Auswahl im Admin-Formular
- Shop-Themes: 5 Farbthemen via CSS-Variablen, Picker in Einstellungen
- Deployment: EmailTemplateSeeder wird automatisch beim Deploy ausgeführt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 22:04:54 +02:00

49 lines
2.2 KiB
PHP

@extends('layouts.admin')
@section('title', 'E-Mail-Template: ' . $template->label)
@section('content')
<div class="flex items-center gap-3 mb-6">
<a href="{{ route('admin.email-templates.index') }}" class="text-gray-400 hover:text-gray-600">← Zurück</a>
<h2 class="text-xl font-bold">{{ $template->label }}</h2>
</div>
@if(session('success'))
<div class="bg-green-100 border border-green-300 text-green-800 px-4 py-3 rounded mb-4">{{ session('success') }}</div>
@endif
<form method="POST" action="{{ route('admin.email-templates.update', $template) }}" class="space-y-5">
@csrf @method('PUT')
<div class="bg-white rounded shadow p-6 space-y-4">
<div>
<label class="block text-sm font-medium mb-1">Betreff</label>
<input type="text" name="subject" value="{{ old('subject', $template->subject) }}"
class="w-full border rounded px-3 py-2 text-sm @error('subject') border-red-500 @enderror">
@error('subject')<p class="text-red-600 text-xs mt-1">{{ $message }}</p>@enderror
</div>
<div>
<label class="block text-sm font-medium mb-1">HTML-Inhalt</label>
<textarea name="body" rows="24"
class="w-full border rounded px-3 py-2 text-sm font-mono @error('body') border-red-500 @enderror">{{ old('body', $template->body) }}</textarea>
@error('body')<p class="text-red-600 text-xs mt-1">{{ $message }}</p>@enderror
</div>
</div>
@if($template->variables)
<div class="bg-blue-50 border border-blue-200 rounded p-4 text-sm">
<p class="font-medium text-blue-800 mb-2">Verfügbare Platzhalter:</p>
<div class="flex flex-wrap gap-2">
@foreach($template->variables as $var)
<code class="bg-blue-100 text-blue-700 px-2 py-0.5 rounded text-xs">{{"{{"}}{{ $var }}{{"}}"}}</code>
@endforeach
</div>
</div>
@endif
<div class="flex gap-3">
<button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded hover:bg-blue-700">Speichern</button>
<a href="{{ route('admin.email-templates.index') }}" class="border px-6 py-2 rounded hover:bg-gray-50 text-sm">Abbrechen</a>
</div>
</form>
@endsection