{{-- CityHub - Dashboard (admin) --}}

{{ Lang::get('dashboard.admin_title') }}


@if ($data['status'] == 1) {{-- Admin data retrieved --}} @if (count($data['city_data']) > 0) @foreach ($data['city_data'] as $city)

{{ Lang::get('communalService.reports_by_company') }}

@foreach ( $city['reportStats']['perCompany'] as $company) @endforeach
{{ Lang::get('company.label_company_name') }} {{ Lang::get('communalService.total_report_number')}} {{ Lang::get('communalService.header_action') }}
{{ $company->company }} {{ $company->report_count }}
@if ($city['communalService_status'] == 1)

{{Lang::get('communalService.module_name') }}

{{ Lang::get('communalService.last_5_reports_for', array('name' => $city['city']->name)) }}

@if (count($city['communalService_data']) > 0) @foreach ($city['communalService_data'] as $report) @endforeach @else {{-- CommunalService no reports --}}

{{ Lang::get('dashboard.no_communalservice_reports') }}

@endif @elseif ($city['communalService_status'] == 2) {{-- CommunalService not attached to this city --}}

{{ Lang::get('dashboard.no_communalservice_attached', array('cityname' => $city['city']->name)) }}

@else {{-- CommunalService module data for this city is NOT loaded --}}

{{ Lang::get('dashboard.no_communalservice_data', array('cityname' => $city['city']->name)) }}

@endif
{{-- List subscribers for City --}} @if(count($city['subscribers']) > 0)

{{ Lang::get('dashboard.subscribers') }}

@foreach($city['subscribers'] as $subscriber) @endforeach
{{ Lang::get('touristInformation.header_id') }} {{ Lang::get('user.label_first_name') }} {{ Lang::get('user.label_last_name') }} {{ Lang::get('user.label_email') }} {{ Lang::get('touristInformation.header_action') }}
{{ $subscriber->id }} {{ $subscriber->first_name }} {{ $subscriber->last_name }} {{ $subscriber->email }}  
@endif
{{-- List view statistic for City --}}

{{ Lang::get('dashboard.view_statistic') }}

@foreach($postStatistic as $postByCity) @foreach($postByCity['posts'] as $key=>$post) @if($post['city'] == $city['city']->id ) @endif @endforeach @endforeach
{{ Lang::get('touristInformation.header_id') }} {{ Lang::get('user.label_category') }} {{ Lang::get('user.label_title') }} {{ Lang::get('user.label_created_at') }} {{ Lang::get('user.label_counter') }}
{{ $post['id'] }} Kateg {{ $post['title'] }} {{ $post['created_at'] }} {{ $post['fakeCount'] }}
{{-- List shared categories --}}
@foreach($sharedCategories as $key=>$category) @if($city['city']->name != $key)

{{$key}}

@foreach($category as $cat) @if(in_array($city['city']->id,$cat['sub'])) @else @endif @endforeach @endif @endforeach
@endforeach @else {{-- No cities for this admin --}}
{{ Lang::get('dashboard.no-cities') }}
@endif @elseif ($data['status'] == 2) {{-- No cities associated with user --}}

{{ Lang::get('dashboard.no-admin-cities') }}

@else {{-- Admin data NOT retrieved --}}

{{ Lang::get('dashboard.no-admin-data') }}

@endif