<div data-control="toolbar">
    <?php if ($this->user->hasAccess('dynamedia.posts.manage_tags')): ?>
        <a
            href="<?= Backend::url('dynamedia/posts/tags/create') ?>"
            class="btn btn-primary oc-icon-plus">
            <?= e(trans('dynamedia.posts::lang.tags.buttons.new')) ?>
        </a>

        <button
                class="btn btn-success oc-icon-check-circle"
                disabled="disabled"
                onclick="$(this).data('request-data', { checked: $('.control-list').listWidget('getChecked') })"
                data-request="onApprove"
                data-request-confirm="<?= e(trans('dynamedia.posts::lang.tags.messages.approve_selected_confirm')) ?>"
                data-trigger-action="enable"
                data-trigger=".control-list input[type=checkbox]"
                data-trigger-condition="checked"
                data-request-success="$(this).prop('disabled', 'disabled')"
                data-stripe-load-indicator>
            <?= e(trans('dynamedia.posts::lang.tags.buttons.approve')) ?>
        </button>

        <button
            class="btn btn-danger 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', 'disabled')"
            data-stripe-load-indicator>
            <?= e(trans('backend::lang.list.delete_selected')) ?>
        </button>

    <?php endif ?>
</div>
