@extends('layouts.frontend') @section('title', trans('messages.dashboard')) @section('page_script') @endsection @section('content')

{!! trans('messages.frontend_dashboard_hello', ['name' => Auth::user()->customer->displayName()]) !!}

{!! trans('messages.frontend_dashboard_welcome') !!}

{{ trans("messages.used_quota") }}

{{ trans('messages.dashboard.credit.wording') }}

{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->getSendingQuotaUsage()) }}/{{ (Auth::user()->customer->getSendingQuota() == -1) ? '∞' : \Acelle\Library\Tool::format_number(Auth::user()->customer->getSendingQuota()) }}    {{ Auth::user()->customer->displaySendingQuotaUsage() }}
{{ trans('messages.sending_quota') }}
{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->listsCount()) }}/{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->maxLists()) }}    {{ Auth::user()->customer->displayListsUsage() }}
{{ trans('messages.list') }}
{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->campaignsCount()) }}/{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->maxCampaigns()) }}    {{ Auth::user()->customer->displayCampaignsUsage() }}
{{ trans('messages.campaign') }}
{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->readCache('SubscriberCount', 0)) }}/{{ \Acelle\Library\Tool::format_number(Auth::user()->customer->maxSubscribers()) }}    {{ Auth::user()->customer->displaySubscribersUsage() }}
{{ trans('messages.subscriber') }}

{{ trans('messages.recently_sent_campaigns') }}

@if (Auth::user()->customer->sentCampaigns()->count() == 0)
{{ trans('messages.no_sent_campaigns') }}
@else
@include('helpers.form_control', [ 'type' => 'select', 'class' => 'dashboard-campaign-select', 'name' => 'campaign_id', 'label' => '', 'value' => '', 'options' => Acelle\Model\Campaign::getSelectOptions(Auth::user()->customer, "done"), ])
@endif

{{ trans('messages.list_growth') }}

@if (Auth::user()->customer->lists()->count() == 0)
{{ trans('messages.no_saved_lists') }}
@else
@include('helpers.form_control', [ 'type' => 'select', 'class' => 'dashboard-list-select', 'name' => 'list_id', 'label' => '', 'value' => '', 'include_blank' => trans('messages.all'), 'options' => Auth::user()->customer->readCache('MailListSelectOptions', []), ])
@endif

{{ trans('messages.top_5') }}

    @forelse (Acelle\Model\Campaign::topOpens(5, Auth::user()->customer)->get() as $num => $item)
  • {{ $num+1 }}
    {{ $item->name }}

    {!! $item->displayRecipients() !!}

    {{ number_with_delimiter($item->aggregate) }}
    {{ trans('messages.opens') }}

    {{ number_with_delimiter($item->readCache('UniqOpenCount')) }}
    {{ trans('messages.uniq_opens') }}

    {{ (null !== $item->lastOpen()) ? Acelle\Library\Tool::formatDateTime($item->lastOpen()->created_at) : "" }}
    {{ trans('messages.last_open') }}

  • @empty
  • {{ trans('messages.empty_record_message') }}
  • @endforelse
    @forelse (Acelle\Model\Campaign::topClicks(5, Auth::user()->customer)->get() as $num => $item)
  • {{ $num+1 }}
    {{ $item->name }}

    {!! $item->displayRecipients() !!}

    {{ $item->aggregate }}
    {{ trans('messages.clicks') }}

    {{ $item->urlCount() }}
    {{ trans('messages.urls') }}

    {{ (null !== $item->lastClick()) ? Acelle\Library\Tool::formatDateTime($item->lastClick()->created_at) : "" }}
    {{ trans('messages.last_clicked') }}

  • @empty
  • {{ trans('messages.empty_record_message') }}
  • @endforelse
    @forelse (Acelle\Model\Campaign::topLinks(5, Auth::user()->customer)->get() as $num => $item)
  • {{ $num+1 }}
    {{ $item->url }}

    {{ $item->campaigns()->count() }} {{ trans('messages.campaigns') }}

    {{ $item->aggregate }}
    {{ trans('messages.clicks') }}

    {{ (null !== $item->lastClick(Auth::user()->customer)) ? Acelle\Library\Tool::formatDateTime($item->lastClick(Auth::user()->customer)->created_at) : "" }}
    {{ trans('messages.last_clicked') }}

  • @empty
  • {{ trans('messages.empty_record_message') }}
  • @endforelse

{{ trans('messages.activity_log') }}

@if (Auth::user()->customer->logs()->count() == 0)
{{ trans('messages.no_activity_logs') }}
@else
@foreach (Auth::user()->customer->logs()->take(20)->get() as $log)
{{ $log->customer->displayName() }}
{{ Tool::dateTime($log->created_at)->diffForHumans() }}
{!! $log->message() !!}
@endforeach
@endif

@endsection