new: make all forms have a cancel/save button on the top also

This commit is contained in:
Valentin Lab
2025-12-13 21:17:07 +01:00
parent f92e175731
commit 7887e2d532
3 changed files with 41 additions and 8 deletions

View File

@@ -112,3 +112,17 @@ body {
.bg-darker { .bg-darker {
background-color: rgba(0,0,0,0.05)!important; background-color: rgba(0,0,0,0.05)!important;
} }
/* Header action buttons aligned with page title */
.content-header .form-buttons {
margin-left: 12px;
}
.content-header .form-buttons .btn {
height: 32px;
display: inline-flex;
align-items: center;
padding-top: 4px;
padding-bottom: 4px;
line-height: 1.1;
}

View File

@@ -1,7 +1,23 @@
@php
$cancelUrl = $cancel_url ?? $cancelUrl ?? null;
@endphp
@push('header-actions')
<div class="form-buttons d-flex align-items-center ml-3">
@include('components.form.buttons.button-cancel', [
'class' => 'btn-sm mr-2',
'url' => $cancelUrl,
])
@include('components.form.buttons.button-save', [
'class' => 'btn-sm',
])
</div>
@endpush
<div class="row pt-0 pb-3"> <div class="row pt-0 pb-3">
<div class="col-12"> <div class="col-12">
<div class="text-right form-buttons"> <div class="text-right form-buttons">
@include('components.form.buttons.button-cancel') @include('components.form.buttons.button-cancel', ['url' => $cancelUrl])
@include('components.form.buttons.button-save') @include('components.form.buttons.button-save')
</div> </div>
</div> </div>

View File

@@ -1,13 +1,16 @@
<div class="content-header pt-2 pb-1"> <div class="content-header pt-2 pb-1">
<div class="container-fluid"> <div class="container-fluid">
<div class="row mb-2 align-items-end"> <div class="row mb-2 align-items-center">
<div class="col-sm-6"> <div class="col-sm-6">
<h1 class="m-0 text-dark"> <div class="d-flex align-items-center flex-wrap">
<h1 class="m-0 text-dark d-flex align-items-center">
{{ $title ?? null}} {{ $title ?? null}}
@isset($subtitle) @isset($subtitle)
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small> <small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
@endisset @endisset
</h1> </h1>
@stack('header-actions')
</div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<ol class="breadcrumb float-sm-right text-sm"> <ol class="breadcrumb float-sm-right text-sm">