diff --git a/app/helpers.php b/app/helpers.php index 87537e7..eb39c42 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -6,6 +6,11 @@ const VALI_EMAIL = 'string|email|max:255'; const VALI_TEXT = 'string|max:4095'; const VALI_LINE = 'string|max:255'; +const FEATURE_FORKS = false; +const FEATURE_FAVES = false; +const FEATURE_TABLE_COMMENTS = false; +const FEATURE_PROPOSALS = false; + // global helpers function authed() { return ! \Auth::guest(); diff --git a/resources/views/profile/_table-list.blade.php b/resources/views/profile/_table-list.blade.php index 3ebeb92..391947c 100644 --- a/resources/views/profile/_table-list.blade.php +++ b/resources/views/profile/_table-list.blade.php @@ -24,24 +24,31 @@ @icon(fa-table fa-pr){!! $showAuthors ? (e($table->owner->handle) . '/') : '' !!}{{ $table->title }} - {{-- - --}}
# | + {{--# | --}} @foreach($columns as $col){{ $col->title }} | @endforeach @@ -20,7 +20,7 @@
---|---|---|
{{$row->_id}} | + {{--{{$row->_id}} | --}} @foreach($columns as $col){{ $row->{$col->name} }} | @endforeach diff --git a/resources/views/table/_view-action-buttons.blade.php b/resources/views/table/_view-action-buttons.blade.php index 84785f7..37d9ed4 100644 --- a/resources/views/table/_view-action-buttons.blade.php +++ b/resources/views/table/_view-action-buttons.blade.php @@ -12,21 +12,26 @@ @if(guest() || !user()->confirmed || user()->ownsTable($table)) {{-- Guest, unconfirmed, or a table owner --}} + @if(FEATURE_FORKS) {{-- Passive fork buttons with counter --}} @icon(fa-code-fork, sr:Forks) {{ $table->forks_count ?: '–' }} + @endif + @if(FEATURE_FAVES) {{-- Passive favourite buttons with counter --}} @icon(fa-star, sr:Favourites) {{ $table->favourites_count ?: '–' }} + @endif @else {{-- Logged in and does not own the table --}} + @if(FEATURE_FORKS) {{-- Active fork button | counter --}} + @endif + @if(FEATURE_FAVES) {{-- Active favourite button | counter --}}