From 93b0d3af13b3e24ac03375f29cc8e3fda18fb99f Mon Sep 17 00:00:00 2001 From: manavo Date: Mon, 24 Nov 2014 17:37:49 +0000 Subject: [PATCH] Only show components section if we have some --- app/controllers/HomeController.php | 2 +- app/views/index.blade.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index b09daa15d..f325c063a 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -6,6 +6,6 @@ * @return View */ public function showIndex() { - return View::make('index'); + return View::make('index', ['components' => Component::all()]); } } diff --git a/app/views/index.blade.php b/app/views/index.blade.php index 0e12f0ac2..85ab1be30 100644 --- a/app/views/index.blade.php +++ b/app/views/index.blade.php @@ -7,9 +7,10 @@

You're logged in. This will be a link to the Dashboard.

@endif + @if(count($components) > 0) + @endif @for($i=0; $i <= 7; $i++) @include('incident', array('i', $i))