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.
 
 
 
 
 
 
datatable.directory/resources/views/table/_action-buttons.blade.php

78 lines
2.5 KiB

{{--
args: $table
--}}
<nav aria-label="Table action buttons">
@sr(Table actions)
{{-- Disabled until implemented --}}
@if(false)
@if(guest() || user()->ownsTable($table))
{{-- Passive fork buttons with counter --}}
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Forks"
data-toggle="tooltip" data-placement="top">
{{ $table->forks_count ?: '–' }}&nbsp;
@icon(fa-code-fork, sr:Forks)
</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">
{{ $table->favourites_count ?: '–' }}&nbsp;
@icon(fa-star, sr:Favourites)
</a>
@else
{{-- 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">
{{ $table->comments_count ?: '–' }}&nbsp;
@icon(fa-comment, sr:Comments)
</a>
@endif
@if(user() && user()->ownsTable($table))
<a href="" 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>