@ -5,19 +5,28 @@
< nav aria-label = "Table action buttons" >
< nav aria-label = "Table action buttons" >
@sr(Table actions)
@sr(Table actions)
{{-- Disabled until implemented --}}
@if(false)
@if(guest() || user()->ownsTable($table))
@if(guest() || user()->ownsTable($table))
{{-- Passive fork buttons with counter --}}
< a href = "" class = "btn btn-outline-primary py-1 btn-sm" title = "Forks"
< a href = "" class = "btn btn-outline-primary py-1 btn-sm" title = "Forks"
data-toggle="tooltip" data-placement="top">
data-toggle="tooltip" data-placement="top">
{{ $table->forks_count ?: '–' }}
{{ $table->forks_count ?: '–' }}
@icon(fa-code-fork, sr:Forks)
@icon(fa-code-fork, sr:Forks)
< / a >
< / a >
< a href = "#" class = "btn btn-outline-primary py-1 btn-sm"
{{-- Passive favourite buttons with counter --}}
< a href = "" class = "btn btn-outline-primary py-1 btn-sm"
title="Favourites" data-toggle="tooltip" data-placement="top">
title="Favourites" data-toggle="tooltip" data-placement="top">
{{ $table->favourites_count ?: '–' }}
{{ $table->favourites_count ?: '–' }}
@icon(fa-star, sr:Favourites)
@icon(fa-star, sr:Favourites)
< / a >
< / a >
@else
@else
{{-- Active fork button | counter --}}
< div class = "btn-group" role = "group" aria-label = "Fork" >
< div class = "btn-group" role = "group" aria-label = "Fork" >
< a href = "" class = "btn btn-outline-primary py-1 btn-sm btn-square" title = "Fork"
< a href = "" class = "btn btn-outline-primary py-1 btn-sm btn-square" title = "Fork"
data-toggle="tooltip" data-placement="top">
data-toggle="tooltip" data-placement="top">
@ -29,6 +38,7 @@
< / a >
< / a >
< / div >
< / div >
{{-- Active favourite button | counter --}}
< div class = "btn-group" role = "group" aria-label = "Favourite" >
< div class = "btn-group" role = "group" aria-label = "Favourite" >
@if(user()->favouritesTable($table))
@if(user()->favouritesTable($table))
< a href = "" class = "btn btn-outline-primary py-1 btn-sm btn-square" title = "Un-favourite"
< a href = "" class = "btn btn-outline-primary py-1 btn-sm btn-square" title = "Un-favourite"
@ -47,11 +57,22 @@
{{ $table->favourites_count ?: '–' }}
{{ $table->favourites_count ?: '–' }}
< / a >
< / a >
< / div >
< / div >
@endif
@endif
{{-- Comments button with counter --}}
< a href = "" class = "btn btn-outline-primary py-1 btn-sm" title = "Comments"
< a href = "" class = "btn btn-outline-primary py-1 btn-sm" title = "Comments"
data-toggle="tooltip" data-placement="top">
data-toggle="tooltip" data-placement="top">
{{ $table->comments_count ?: '–' }}
{{ $table->comments_count ?: '–' }}
@icon(fa-comment, sr:Comments)
@icon(fa-comment, sr:Comments)
< / a >
< / 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 >
< / nav >