Plans: add publish toggle action and UI
This commit is contained in:
@@ -274,6 +274,16 @@
|
||||
</select>
|
||||
<noscript><button type="submit" class="btn btn-secondary btn-sm">更新状态</button></noscript>
|
||||
</form>
|
||||
|
||||
<form method="post" action="/admin/plans/{{ $plan->id }}/set-published" class="mt-6 actions gap-10">
|
||||
@csrf
|
||||
@php $isPublished = (bool) $plan->published_at; @endphp
|
||||
<select name="published" onchange="this.form.submit()" class="w-140">
|
||||
<option value="1" @selected($isPublished)>已发布</option>
|
||||
<option value="0" @selected(!$isPublished)>未发布</option>
|
||||
</select>
|
||||
<noscript><button type="submit" class="btn btn-secondary btn-sm">更新发布状态</button></noscript>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
|
||||
Reference in New Issue
Block a user