mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
66c8809799
Built controller actions and initual UI. Still needs JS logic for shortcut input handling.
12 lines
576 B
PHP
12 lines
576 B
PHP
@php
|
|
$isFavourite = $entity->isFavourite();
|
|
@endphp
|
|
<form action="{{ url('/favourites/' . ($isFavourite ? 'remove' : 'add')) }}" method="POST">
|
|
{{ csrf_field() }}
|
|
<input type="hidden" name="type" value="{{ get_class($entity) }}">
|
|
<input type="hidden" name="id" value="{{ $entity->id }}">
|
|
<button type="submit" data-shortcut="favourite" class="icon-list-item text-primary">
|
|
<span>@icon($isFavourite ? 'star' : 'star-outline')</span>
|
|
<span>{{ $isFavourite ? trans('common.unfavourite') : trans('common.favourite') }}</span>
|
|
</button>
|
|
</form> |