Files
lucent-laravel/front/views/records-editor/header.blade.php
T
2024-10-02 18:58:30 +03:00

64 lines
2.3 KiB
PHP

<div class="tools-header">
<div style="display: flex;align-items: center; gap:10px;">
@if(!$createMode)
<x-lucent::dropdown>
<x-lucent::icon icon="ellipsis"></x-lucent::icon>
<x-slot:items>
<h6 class="dropdown-header">Record Actions</h6>
<a
class="dropdown-item"
href="{{lucent_url("records/new")}}?schema={{$schema->name}}"
>
Create new
</a>
<a
class="dropdown-item"
href="{{lucent_url("records/clone")}}/{{$record->id}}"
>
Clone
</a>
<a
class="dropdown-item"
href="{{lucent_url("records/revisions")}}/{{$record->id}}">Revisions</a
>
</x-slot>
</x-lucent::dropdown>
@endif
@if($record->status !== "trashed")
<x-lucent::switch value="published" :checked="$record->status === 'published'"></x-lucent::switch>
@endif
@if($record->status === "published")
Published
@elseif($record->status === "draft")
Draft
@elseif($record->status === "trashed")
Trashed
@endif
</div>
@if($createMode)
<button
id="record-create-button"
class="button primary btn-spinner"
>
<span
class="spinner-border spinner-border-sm"
role="status"
aria-hidden="true"
></span>
Create
</button>
@else
<button
id="record-save-button"
type="button"
class="button primary ms-2 btn btn-primary btn-spinner"
>
<span
class="spinner-border spinner-border-sm"
role="status"
aria-hidden="true"
></span>
Save
</button>
@endif
</div>