Show incident template counts in the sidebar

This commit is contained in:
James Brooks
2016-03-16 09:27:44 +00:00
parent 51bbcc2a7d
commit 97ba43a898
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -13,6 +13,7 @@ namespace CachetHQ\Cachet\Composers;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\IncidentTemplate;
use CachetHQ\Cachet\Models\Subscriber;
use Illuminate\Contracts\View\View;
@@ -28,6 +29,7 @@ class DashboardComposer
public function compose(View $view)
{
$view->withIncidentCount(Incident::notScheduled()->count());
$view->withIncidentTemplateCount(IncidentTemplate::count());
$view->withComponentCount(Component::all()->count());
$view->withSubscriberCount(Subscriber::isVerified()->count());
}
@@ -33,6 +33,7 @@
<a href="{{ route('dashboard.templates.index') }}">
<i class="ion ion-ios-paper-outline"></i>
<span>{{ trans('dashboard.incidents.incident-templates') }}</span>
<span class="label label-info">{{ $incident_template_count }}</span>
</a>
</li>
<li {!! set_active('dashboard/components*') !!}>