@extends('global.app') @section('title', trans('communication.title.emails')) @section('page_stylesheets') @endsection @section('profile_bar')
@if ($recipient->profile_image_filename === 'default-profile.jpg')
{{ strtoupper($recipient->first_name[0] . $recipient->last_name[0]) }}
@else {{ $recipient->first_name . ' ' . $recipient->last_name }} @endif

{{ $recipient->first_name . ' ' . $recipient->last_name }}

@if ($recipient->status) {{ trans('communication.status.active', array( 'role' => studly_case($recipient->role), )) }} @else {{ trans('communication.status.inactive', array( 'role' => studly_case($recipient->role), )) }} @endif
@if(in_array($user->role, array('super', 'admin')) && in_array($recipient->role, array('broker', 'client', 'staff'))) {{ trans('communication.button.profile') }} @endif
{{ trans('communication.label.email') }}

{{ $recipient->email }}

{{ trans('communication.label.phone') }}

{{ $recipient->phone or '(---) ---- --- --' }}

{{ trans('communication.label.birthday') }}

{{ is_null($recipient->birthday) ? '---------- --, ----' : date('jS F Y', strtotime($recipient->birthday)) }}

{{ trans('communication.label.address') }}

{{ $recipient->address or '. . .' }}

@endsection @section('content') @parent
@include('global.status')

{{ trans('communication.table.title.emails', array( 'name' => $recipient->first_name )) }}

@forelse ($emails as $email) @empty @endforelse
{{ trans('communication.table.header.from') }} {{ trans('communication.table.header.subject') }} {{ trans('communication.table.header.date') }} {{ trans('communication.table.header.actions') }}
{{ $email->sender->id === $user->id ? 'You': $email->sender->first_name }} {{ $email->subject }} {{ date('F d, Y', strtotime($email->created_at)) }} {{ trans('communication.table.data.action.read') }}
{{ csrf_field() }} {{ method_field('DELETE') }}
{{ trans('communication.table.message.empty') }}
@endsection @section('modals') @foreach($emails as $email) @endforeach @endsection @section('page_scripts') @endsection