datatable.directory codebase
https://datatable.directory/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
3.0 KiB
91 lines
3.0 KiB
7 years ago
|
{{--
|
||
|
args: $table
|
||
|
--}}
|
||
|
|
||
7 years ago
|
@php
|
||
|
/** @var \App\Models\Table $table */
|
||
|
@endphp
|
||
|
|
||
7 years ago
|
<nav aria-label="Table action buttons">
|
||
|
@sr(Table actions)
|
||
|
|
||
7 years ago
|
@if(guest() || !user()->confirmed || user()->ownsTable($table))
|
||
7 years ago
|
{{-- Guest, unconfirmed, or a table owner --}}
|
||
7 years ago
|
|
||
|
{{-- Passive fork buttons with counter --}}
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Forks)>
|
||
7 years ago
|
@icon(fa-code-fork, sr:Forks)
|
||
|
{{ $table->forks_count ?: '–' }}
|
||
7 years ago
|
</a>
|
||
|
|
||
7 years ago
|
{{-- Passive favourite buttons with counter --}}
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Favourites)>
|
||
7 years ago
|
@icon(fa-star, sr:Favourites)
|
||
|
{{ $table->favourites_count ?: '–' }}
|
||
7 years ago
|
</a>
|
||
7 years ago
|
|
||
7 years ago
|
@else
|
||
7 years ago
|
{{-- Logged in and does not own the table --}}
|
||
7 years ago
|
|
||
|
{{-- Active fork button | counter --}}
|
||
7 years ago
|
<div class="btn-group" role="group" aria-label="Fork">
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" @tooltip(Fork)>
|
||
7 years ago
|
@icon(fa-code-fork, sr:Fork)
|
||
|
</a>
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Fork Count)>
|
||
7 years ago
|
{{ $table->forks_count ?: '–' }}
|
||
|
</a>
|
||
|
</div>
|
||
|
|
||
7 years ago
|
{{-- Active favourite button | counter --}}
|
||
7 years ago
|
<div class="btn-group" role="group" aria-label="Favourite">
|
||
|
@if(user()->favouritesTable($table))
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" @tooltip(Un-favourite)>
|
||
7 years ago
|
@icon(fa-star, sr:Un-favourite)
|
||
|
</a>
|
||
|
@else
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm btn-square" @tooltip(Favourite)>
|
||
7 years ago
|
@icon(fa-star-o, sr:Favourite)
|
||
|
</a>
|
||
|
@endif
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Favourite Count)>
|
||
7 years ago
|
{{ $table->favourites_count ?: '–' }}
|
||
|
</a>
|
||
|
</div>
|
||
7 years ago
|
|
||
7 years ago
|
@endif
|
||
|
|
||
7 years ago
|
{{-- Comments button with counter --}}
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Comments)>
|
||
7 years ago
|
@icon(fa-comment, sr:Comments)
|
||
|
{{ $table->comments_count ?: '–' }}
|
||
7 years ago
|
</a>
|
||
7 years ago
|
|
||
7 years ago
|
{{-- Active proposals button | counter --}}
|
||
|
<div class="btn-group" role="group" aria-label="Fork">
|
||
6 years ago
|
<a href="" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Change Proposals)>
|
||
7 years ago
|
@icon(fa-inbox fa-pr, sr:Change Proposals){{ $table->proposals_count ?: '–' }}
|
||
|
</a>
|
||
7 years ago
|
@auth
|
||
|
@if(user()->ownsTable($table))
|
||
|
{{-- Table owner logged in --}}
|
||
6 years ago
|
<a href="{{ $table->draftRoute }}" class="btn btn-outline-primary py-1 btn-sm btn-square" @tooltip(Draft Change)>
|
||
7 years ago
|
@icon(fa-pencil, sr:Draft Change)
|
||
|
</a>
|
||
|
@else
|
||
|
{{-- Not a table owner --}}
|
||
6 years ago
|
<a href="{{ $table->draftRoute }}" class="btn btn-outline-primary py-1 btn-sm btn-square" @tooltip(Propose Change)>
|
||
7 years ago
|
@icon(fa-pencil, sr:Propose Change)
|
||
|
</a>
|
||
|
@endif
|
||
|
@endauth
|
||
7 years ago
|
</div>
|
||
|
|
||
7 years ago
|
@if(authed() && user()->ownsTable($table))
|
||
|
{{-- Table opts menu for table owner --}}
|
||
6 years ago
|
<a href="{{ $table->settingsRoute }}" class="btn btn-outline-primary py-1 btn-sm" @tooltip(Table Options)>
|
||
7 years ago
|
@icon(fa-wrench, sr:Table Options)
|
||
|
</a>
|
||
6 years ago
|
@endif
|
||
7 years ago
|
</nav>
|