<div class="scoreboard">
    <div data-control="toolbar">
        <div class="scoreboard-item control-chart" data-control="chart-pie">
            <ul>
                <li data-color="#95b753"><?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.new_count')) ?> <span><?= $this->getRecordsStats('new_count'); ?></span></li>
                <li data-color="#d1d1d1"><?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.read_count')) ?> <span><?= $this->getRecordsStats('read_count'); ?></span></li>
            </ul>
        </div>

        <div class="scoreboard-item title-value">
            <h4><?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.new_count')) ?></h4>
            <p><?= $this->getRecordsStats('new_count'); ?></p>
            <p class="description"><?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.new_description')) ?></p>
        </div>


        <div class="scoreboard-item title-value">
            <h4><?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.latest_record')) ?></h4>
            <p class="oc-icon-user"><?= $this->getRecordsStats('latest_message_name'); ?></p>
            <p class="description"><?= $this->getRecordsStats('latest_message_date'); ?></p>
        </div>

    </div>
</div>


    <div data-control="toolbar">
      <?php if ($this->user->hasAccess('janvince.smallcontactform.delete_messages')): ?>
        <button
            class="btn btn-default oc-icon-trash-o"
            disabled="disabled"
            onclick="$(this).data('request-data', {
                checked: $('.control-list').listWidget('getChecked')
            })"
            data-request="onDelete"
            data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
            data-trigger-action="enable"
            data-trigger=".control-list input[type=checkbox]"
            data-trigger-condition="checked"
            data-request-success="$(this).prop('disabled', true)"
            data-stripe-load-indicator>
            <?= e(trans('backend::lang.list.delete_selected')) ?>
        </button>
      <?php endif ?>

      <button
          class="btn btn-default oc-icon-check-square"
          disabled="disabled"
          onclick="$(this).data('request-data', {
              checked: $('.control-list').listWidget('getChecked')
          })"
          data-request="onMarkRead"
          data-request-confirm="<?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.mark_read_confirm')) ?>"
          data-trigger-action="enable"
          data-trigger=".control-list input[type=checkbox]"
          data-trigger-condition="checked"
          data-request-success="$(this).prop('disabled', true)"
          data-stripe-load-indicator>
          <?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.mark_read')) ?>
      </button>

      <a href="<?= Backend::url('system/settings/update/janvince/smallcontactform/settings'); ?>" class="btn btn-info oc-icon-cogs"><?= e(trans('janvince.smallcontactform::lang.controller.scoreboard.settings_btn')) ?></a>

      <?php if ($this->user->hasAccess('janvince.smallcontactform.export_messages')): ?>
        <a
            href="<?= Backend::url('janvince/smallcontactform/messages/export/') ?>"
            class="btn btn-default oc-icon-download">
            <?= e(trans('janvince.smallcontactform::lang.controllers.messages.export')) ?>
        </a>
      <?php endif ?>

    </div>
