{{-- args: $table --}} @php /** @var \App\Models\Table $table */ @endphp <nav aria-label="Table action buttons"> @sr(Table actions) {{-- Disabled until implemented --}} @if(guest() || !user()->confirmed || user()->ownsTable($table)) {{-- Guest, unconfirmed, or a table owner --}} {{-- Passive fork buttons with counter --}} <a href="" class="btn btn-outline-primary py-1 btn-sm" title="Forks" data-toggle="tooltip" data-placement="top"> @icon(fa-code-fork, sr:Forks) {{ $table->forks_count ?: '–' }} </a> {{-- Passive favourite buttons with counter --}} <a href="" class="btn btn-outline-primary py-1 btn-sm" title="Favourites" data-toggle="tooltip" data-placement="top"> @icon(fa-star, sr:Favourites) {{ $table->favourites_count ?: '–' }} </a> @else {{-- Logged in and does not own the table --}} {{-- Active fork button | counter --}} <div class="btn-group" role="group" aria-label="Fork"> <a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" title="Fork" data-toggle="tooltip" data-placement="top"> @icon(fa-code-fork, sr:Fork) </a> <a href="" class="btn btn-outline-primary py-1 btn-sm" title="Fork Count" data-toggle="tooltip" data-placement="top"> {{ $table->forks_count ?: '–' }} </a> </div> {{-- Active favourite button | counter --}} <div class="btn-group" role="group" aria-label="Favourite"> @if(user()->favouritesTable($table)) <a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" title="Un-favourite" data-toggle="tooltip" data-placement="top"> @icon(fa-star, sr:Un-favourite) </a> @else <a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" title="Favourite" data-toggle="tooltip" data-placement="top"> @icon(fa-star-o, sr:Favourite) </a> @endif <a href="" class="btn btn-outline-primary py-1 btn-sm" title="Favourite Count" data-toggle="tooltip" data-placement="top"> {{ $table->favourites_count ?: '–' }} </a> </div> @endif {{-- Comments button with counter --}} <a href="" class="btn btn-outline-primary py-1 btn-sm" title="Comments" data-toggle="tooltip" data-placement="top"> @icon(fa-comment, sr:Comments) {{ $table->comments_count ?: '–' }} </a> {{-- Active proposals button | counter --}} <div class="btn-group" role="group" aria-label="Fork"> <a href="" class="btn btn-outline-primary py-1 btn-sm" title="Change Proposals" data-toggle="tooltip" data-placement="top"> @icon(fa-inbox fa-pr, sr:Change Proposals){{ $table->proposals_count ?: '–' }} </a> @auth @if(user()->ownsTable($table)) {{-- Table owner logged in --}} <a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" title="Draft Change" data-toggle="tooltip" data-placement="top"> @icon(fa-pencil, sr:Draft Change) </a> @else {{-- Not a table owner --}} <a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" title="Propose Change" data-toggle="tooltip" data-placement="top"> @icon(fa-pencil, sr:Propose Change) </a> @endif @endauth </div> @if(authed() && user()->ownsTable($table)) {{-- Table opts menu for table owner --}} <a href="{{ $table->settingsRoute }}" class="btn btn-outline-primary py-1 btn-sm" title="Table Options" data-toggle="tooltip" data-placement="top"> @icon(fa-wrench, sr:Table Options) </a> @endif </nav>