<commit_before><?php Block::put('breadcrumb') ?>
    <ul>
        <li><a href="<?= Backend::url('octommerce/octommerce/orders') ?>">Orders</a></li>
        <li><?= e($this->pageTitle) ?></li>
    </ul>
<?php Block::endPut() ?>

<?php if (!$this->fatalError): ?>

    <div class="scoreboard">
        <div data-control="toolbar" data-disposable="">
            <div class="scoreboard-item title-value">
                <h4>Order #</h4>
                <p><?= $order->order_no ?></p>
                <p class="description"><?= $order->created_at ?></p>
            </div>
            <div class="scoreboard-item title-value">
                <h4>User</h4>
                <p class="oc-icon-user"><?= $order->name ?></p>
                <p class="description"><a href="mailto: <?= $order->email ?>"><?= $order->email ?></a> | <?= $order->phone ?></p>
            </div>
            <div class="scoreboard-item title-value">
                <h4>Total</h4>
                <p><small>IDR</small> <?= number_format($order->total) ?></p>
                <?php if($order->discount > 0): ?>
                <p class="description">Disc: <?= number_format($order->discount) ?></p>
                <?php endif ?>
            </div>
            <div class="scoreboard-item title-value">
                <h4>Status</h4>
                <?php
                switch($order->status) {
                    case 'quote':
                        $status_icon = 'oc-icon-question';
                        break;
                    case 'pending':
                        $status_icon = 'oc-icon-clock-o';
                        break;
                    case 'half-paid':
                    case 'paid':
                        $status_icon = 'oc-icon-check';
                        break;
                    case 'cancelled':
                    case 'failed':
                    case 'expired':
                        $status_icon = 'oc-icon-times';
                        break;
                }
                ?>
                <p><?= $order->status ? $order->status->name : '' ?></p>
                <p class="description"><?= $order->status_updated_at ?></p>
            </div>
        </div>
    </div>

	<div class="control-toolbar">
        <div class="toolbar-item toolbar-primary">
            <div data-control="toolbar">
                <div class="loading-indicator-container">
                    <a
                        href="javascript:;"
                        data-control="popup"
                        data-handler="onLoadChangeStatusForm"
                        class="btn btn-primary oc-icon-check">
                        Update Status...
                    </a>
                    <div class="dropdown dropdown-fixed">
                        <button
                            type="button"
                            class="btn btn-default oc-icon-users"
                            data-toggle="dropdown">
                            Update to...
                        </button>
                        <ul class="dropdown-menu" data-dropdown-title="Assign selected to...">
                            <li><a href="#" tabindex="-1" class="oc-icon-user">Sally</a></li>
                            <li><a href="#" tabindex="-1" class="oc-icon-user">Steve</a></li>
                            <li><a href="#" tabindex="-1" class="oc-icon-user">Justin</a></li>
                        </ul>
                    </div>
                    <div class="btn-group">
                        <a
                            href="<?= $order->pdf ? $order->pdf->getPath() : '#' ?>"
                            class="btn btn-default oc-icon-file"
                            target="_blank">
                            Download PDF
                        </a>
                        <a
                            href="<?= $order->order_label ? $order->order_label->getPath() : '#' ?>"
                            class="btn btn-default"
                            target="_blank">
                            Print Shipping Label
                        </a>
                        <!-- <a
                            href="<?= Backend::url('responsiv/pay/invoices/preview/' . $order->invoices->last()->id) ?>"
                            class="btn btn-default">
                            Invoice
                        </a> -->
                    </div>
                    <a
                        href="#"
                        data-request="onSendEmailToCustomer"
                        data-load-indicator="Sending email to <?= $order->email ?>..."<commit_msg>Enhance order detail toolbar<commit_after><?php Block::put('breadcrumb') ?>
    <ul>
        <li><a href="<?= Backend::url('octommerce/octommerce/orders') ?>">Orders</a></li>
        <li><?= e($this->pageTitle) ?></li>
    </ul>
<?php Block::endPut() ?>

<?php if (!$this->fatalError): ?>

    <div class="scoreboard">
        <div data-control="toolbar" data-disposable="">
            <div class="scoreboard-item title-value">
                <h4>Order #</h4>
                <p><?= $order->order_no ?></p>
                <p class="description"><?= $order->created_at ?></p>
            </div>
            <div class="scoreboard-item title-value">
                <h4>User</h4>
                <p class="oc-icon-user"><?= $order->name ?></p>
                <p class="description"><a href="mailto: <?= $order->email ?>"><?= $order->email ?></a> | <?= $order->phone ?></p>
            </div>
            <div class="scoreboard-item title-value">
                <h4>Total</h4>
                <p><small>IDR</small> <?= number_format($order->total) ?></p>
                <?php if($order->discount > 0): ?>
                <p class="description">Disc: <?= number_format($order->discount) ?></p>
                <?php endif ?>
            </div>
            <div class="scoreboard-item title-value">
                <h4>Status</h4>
                <?php
                switch($order->status) {
                    case 'quote':
                        $status_icon = 'oc-icon-question';
                        break;
                    case 'pending':
                        $status_icon = 'oc-icon-clock-o';
                        break;
                    case 'half-paid':
                    case 'paid':
                        $status_icon = 'oc-icon-check';
                        break;
                    case 'cancelled':
                    case 'failed':
                    case 'expired':
                        $status_icon = 'oc-icon-times';
                        break;
                }
                ?>
                <p><?= $order->status ? $order->status->name : '' ?></p>
                <p class="description"><?= $order->status_updated_at ?></p>
            </div>
        </div>
    </div>

	<div class="control-toolbar">
        <div class="toolbar-item toolbar-primary">
            <div data-control="toolbar">
                <div class="loading-indicator-container">
                    <a
                        href="javascript:;"
                        data-control="popup"
                        data-handler="onLoadChangeStatusForm"
                        class="btn btn-primary oc-icon-check">
                        Update Status to...
                    </a>
                    <div class="btn-group">
                        <a
                            href="<?= $order->pdf ? $order->pdf->getPath() : '#' ?>"
                            class="btn btn-default oc-icon-file"
                            target="_blank">
                            Download PDF
                        </a>
                        <a
                            href="<?= $order->order_label ? $order->order_label->getPath() : '#' ?>"
                            class="btn btn-default"
                            target="_blank">
                            Print Shipping Label
                        </a>
                        <!-- <a
                            href="<?= Backend::url('responsiv/pay/invoices/preview/' . $order->invoices->last()->id) ?>"
                            class="btn btn-default">
                            Invoice
                        </a> -->
                    </div>
                    <a
                        href="#"
                        data-request="onSendEmailToCustomer"
                        data-load-indicator="Sending email to <?= $order->email ?>..."
{'fraction_non_alphanumeric': 0.15784499054820417, 'fraction_numerical': 0.00248109640831758, 'mean_word_length': 1.0476536042573779, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 245, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '219490', 'n_tokens_mistral': 2193, 'n_tokens_neox': 2103, 'n_words': 375}