initial commit
This commit is contained in:
15
resources/views/admin/templates/create.blade.php
Normal file
15
resources/views/admin/templates/create.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'Template anlegen')
|
||||
@section('heading', 'VM-Template anlegen')
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.templates.store') }}" class="hexahost-card max-w-lg space-y-4 p-6">
|
||||
@csrf
|
||||
<input name="slug" placeholder="slug" required class="hexahost-input w-full px-3 py-2">
|
||||
<input name="name" placeholder="Anzeigename" required class="hexahost-input w-full px-3 py-2">
|
||||
<input name="proxmox_template_vmid" type="number" placeholder="Proxmox Template VMID" required class="hexahost-input w-full px-3 py-2">
|
||||
<input name="os_family" placeholder="OS (optional)" class="hexahost-input w-full px-3 py-2">
|
||||
<label class="flex items-center gap-2 text-sm"><input type="checkbox" name="is_active" value="1" checked> Aktiv</label>
|
||||
<button class="hexahost-btn-primary px-4 py-2">Speichern</button>
|
||||
</form>
|
||||
@endsection
|
||||
15
resources/views/admin/templates/edit.blade.php
Normal file
15
resources/views/admin/templates/edit.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'Template bearbeiten')
|
||||
@section('heading', 'Template bearbeiten')
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.templates.update', $template) }}" class="hexahost-card max-w-lg space-y-4 p-6">
|
||||
@csrf @method('PUT')
|
||||
<input name="slug" value="{{ $template->slug }}" required class="hexahost-input w-full px-3 py-2">
|
||||
<input name="name" value="{{ $template->name }}" required class="hexahost-input w-full px-3 py-2">
|
||||
<input name="proxmox_template_vmid" type="number" value="{{ $template->proxmox_template_vmid }}" required class="hexahost-input w-full px-3 py-2">
|
||||
<input name="os_family" value="{{ $template->os_family }}" class="hexahost-input w-full px-3 py-2">
|
||||
<label class="flex items-center gap-2 text-sm"><input type="checkbox" name="is_active" value="1" {{ $template->is_active ? 'checked' : '' }}> Aktiv</label>
|
||||
<button class="hexahost-btn-primary px-4 py-2">Aktualisieren</button>
|
||||
</form>
|
||||
@endsection
|
||||
25
resources/views/admin/templates/index.blade.php
Normal file
25
resources/views/admin/templates/index.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'VM-Templates')
|
||||
@section('heading', 'VM-Templates')
|
||||
|
||||
@section('content')
|
||||
<a href="{{ route('admin.templates.create') }}" class="hexahost-btn-primary mb-4 inline-block px-4 py-2 text-sm">Neues Template</a>
|
||||
<div class="hexahost-card overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="border-b border-white/10 text-left opacity-70"><tr><th class="p-3">Name</th><th>Slug</th><th>VMID</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
@foreach($templates as $t)
|
||||
<tr class="border-b border-white/5">
|
||||
<td class="p-3">{{ $t->name }}</td>
|
||||
<td class="font-mono">{{ $t->slug }}</td>
|
||||
<td>{{ $t->proxmox_template_vmid }}</td>
|
||||
<td class="p-3 text-right">
|
||||
<a href="{{ route('admin.templates.edit', $t) }}" class="text-cyan-400 hover:underline">Bearbeiten</a>
|
||||
<form method="POST" action="{{ route('admin.templates.destroy', $t) }}" class="inline">@csrf @method('DELETE')<button class="ml-2 text-red-400">Löschen</button></form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user