@extends('admin.dashboard') @section('title', 'Microunits') @section('stylesheets') @endsection @section('content')

Dashboard OPALESCE Version 1.0

{!! Breadcrumbs::render('microunits') !!}

Data Table With Microunits

Add Microunit
@foreach ($microunits as $microunit) @if($microunit->author) @elseif($microunit->admin) @else

There are no authors!

@endif {{-- --}} @endforeach
ID Title Created On Author Topic Status Actions Elements Questions
{{$microunit->id}} {{$microunit->title}} {{ date('j M. Y', strtotime($microunit->created_at)) }}{{$microunit->author->name}}{{$microunit->admin->name}} (Admin){{$microunit->author->name}} {{$microunit->author->lastname}} {{$microunit->category->name}} @if ($microunit->approved == 0) {!! Form::model($microunit, ['route' => ['admin.mus.activate', $microunit->id], 'method'=>'PUT', 'id'=>'form-activate','style'=>'display:inline-block']) !!} Activate @include('admin.modals.activatemu') {!! Form::close() !!} @elseif ($microunit->approved == 1)
Activated
@endif
{!! Form::open(['route' => ['admin.microunits.destroy', $microunit->id], 'method' => 'DELETE', 'id'=>'form-delete', 'style'=>'display:inline-block']) !!} @include('admin.modals.deletemu') {!! Form::close() !!} @if($microunit->elementmicrounits->count()) {{$microunit->elementmicrounits->count()}} elements @else Add Element @endif @if($microunit->questions->count()) {{$microunit->questions->count()}} Questions @else Add Question @endif
ID Title Created On Author Topic Status Actions Elements Questions
@endsection @section('javascripts') @endsection