@extends('layouts.app')
@section('title', __('nav.backups'))
@section('content')
<div class="d-flex justify-content-between mb-3"><h1 class="h4">{{ __('nav.backups') }}</h1>
@can('backups.create')<form method="post" action="{{ route('system.backups.store') }}">@csrf<button class="btn btn-success">{{ __('messages.create_backup') }}</button></form>@endcan</div>
<div class="card"><table class="table mb-0"><thead><tr><th>{{ __('messages.filename') }}</th><th>{{ __('messages.size') }}</th><th>{{ __('messages.date') }}</th><th></th></tr></thead>
<tbody>@forelse($backups as $b)
<tr><td>{{ $b->filename }}</td><td>{{ number_format($b->size/1024,1) }} KB</td><td>{{ $b->created_at }}</td>
<td><a href="{{ route('system.backups.download',$b) }}">{{ __('messages.download') }}</a>
@can('backups.delete')<form class="d-inline" method="post" action="{{ route('system.backups.destroy',$b) }}">@csrf @method('DELETE')<button class="btn btn-link">{{ __('messages.delete') }}</button></form>@endcan
</td></tr>
@empty<tr><td colspan="4">{{ __('messages.no_results') }}</td></tr>@endforelse</tbody></table>
<div class="card-body">{{ $backups->links() }}</div></div>
@endsection
