Only show the export button in the dashboard when more than one entry exists for the given model

This commit is contained in:
Kevin MacMartin 2018-01-21 19:48:30 -05:00
parent f489d3724f
commit 5c2ad8cccb
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
@extends('dashboard.core') @extends('dashboard.core')
@section('dashboard-heading') @section('dashboard-heading')
@if($export) @if($export && count($rows) > 0)
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a> <a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
@endif @endif

View file

@ -1,7 +1,9 @@
@extends('dashboard.core') @extends('dashboard.core')
@section('dashboard-heading') @section('dashboard-heading')
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a> @if(count($rows) > 0)
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
@endif
@endsection @endsection
@section('dashboard-body') @section('dashboard-body')