<commit_before><div>
    <h1><?= trans('boomcms::settings.draft-status.heading') ?></h1>
    <p><?= trans('boomcms::settings.draft-status.intro') ?></p>

    <?php if ($version->isDraft() && !$version->isPendingApproval()): ?>
        <p><?= trans('boomcms::settings.draft-status.draft') ?></p>
        
        <?php if (!$auth->loggedIn('publish_page', $page)): ?>
            <?= $button('thumbs-up', 'request-approval', ['class' => 'b-button-withtext b-page-request-approval']) ?>
        <?php endif ?>
    <?php elseif ($version->isPendingApproval()): ?>
        <p><?= trans('boomcms::settings.draft-status.pending') ?></p>
    <?php elseif ($version->isEmbargoed()): ?>
        <p>
            <?= trans('boomcms::settings.draft-status.embargoed', [
                'date' => $version->getEmbargoedUntil()->format('l d F Y'),
                'time' => $version->getEmbargoedUntil()->format('H:i'),
            ]) ?>
        </p>
    <?php elseif ($version->isPublished()): ?>
        <p><?= trans('boomcms::settings.draft-status.published') ?></p>
    <?php endif ?>
        
    <p>
        <?= trans('boomcms::settings.draft-status.latest', [
            'name'  => $version->getEditedBy()->getName(),
            'email' => $version->getEditedBy()->getEmail(),
            'date'  => $version->getEditedTime()->format('l d F Y'),
            'time'  => $version->getEditedTime()->format('H:i'),
        ]) ?>
    </p>
    
    <?php if (!$version->isPublished()): ?>
        <p>
            <?= trans('boomcms::settings.draft-status.last-published', [
                'date' => $page->getLastPublishedTime()->format('l d F Y'),
                'time' => $page->getLastPublishedTime()->format('H:i'),
            ]) ?>
        </p>
        
        <?php if ($auth->loggedIn('publish_page', $page)): ?>
            <?= $button('check', 'publish', ['class' => 'b-button-withtext b-page-publish']) ?>
            
            <?php if ($version->isEmbargoed()): ?>
                <?= $button('clock-o', 'embargo-change', ['class' => 'b-button-withtext b-page-embargo']) ?>
            <?php else: ?>
                <?= $button('clock-o', 'embargo', ['class' => 'b-button-withtext b-page-embargo']) ?>
            <?php endif ?>

            <?= $button('undo', 'page-revert', ['class' => 'b-button-withtext b-page-revert']) ?>
        <?php endif ?>
    <?php endif ?>
        
    <?php if (!$version->isPublished() || !$page->isVisible()): ?>
        <div>
            <?= $button('', 'preview', [
                'class'    => 'b-button-textonly b-page-preview',
                'data-url' => (string) $page->url(),
            ]) ?><commit_msg>Fixed bug in page draft status when version has no edited by property (e.g. after install)<commit_after><div>
    <h1><?= trans('boomcms::settings.draft-status.heading') ?></h1>
    <p><?= trans('boomcms::settings.draft-status.intro') ?></p>

    <?php if ($version->isDraft() && !$version->isPendingApproval()): ?>
        <p><?= trans('boomcms::settings.draft-status.draft') ?></p>
        
        <?php if (!$auth->loggedIn('publish_page', $page)): ?>
            <?= $button('thumbs-up', 'request-approval', ['class' => 'b-button-withtext b-page-request-approval']) ?>
        <?php endif ?>
    <?php elseif ($version->isPendingApproval()): ?>
        <p><?= trans('boomcms::settings.draft-status.pending') ?></p>
    <?php elseif ($version->isEmbargoed()): ?>
        <p>
            <?= trans('boomcms::settings.draft-status.embargoed', [
                'date' => $version->getEmbargoedUntil()->format('l d F Y'),
                'time' => $version->getEmbargoedUntil()->format('H:i'),
            ]) ?>
        </p>
    <?php elseif ($version->isPublished()): ?>
        <p><?= trans('boomcms::settings.draft-status.published') ?></p>
    <?php endif ?>

    <?php if ($editedBy = $version->getEditedBy()): ?>
        <p>
            <?= trans('boomcms::settings.draft-status.latest', [
                'name'  => $editedBy->getName(),
                'email' => $editedBy->getEmail(),
                'date'  => $version->getEditedTime()->format('l d F Y'),
                'time'  => $version->getEditedTime()->format('H:i'),
            ]) ?>
        </p>
    <?php endif ?>
    
    <?php if (!$version->isPublished()): ?>
        <p>
            <?= trans('boomcms::settings.draft-status.last-published', [
                'date' => $page->getLastPublishedTime()->format('l d F Y'),
                'time' => $page->getLastPublishedTime()->format('H:i'),
            ]) ?>
        </p>
        
        <?php if ($auth->loggedIn('publish_page', $page)): ?>
            <?= $button('check', 'publish', ['class' => 'b-button-withtext b-page-publish']) ?>
            
            <?php if ($version->isEmbargoed()): ?>
                <?= $button('clock-o', 'embargo-change', ['class' => 'b-button-withtext b-page-embargo']) ?>
            <?php else: ?>
                <?= $button('clock-o', 'embargo', ['class' => 'b-button-withtext b-page-embargo']) ?>
            <?php endif ?>

            <?= $button('undo', 'page-revert', ['class' => 'b-button-withtext b-page-revert']) ?>
        <?php endif ?>
    <?php endif ?>
        
    <?php if (!$version->isPublished() || !$page->isVisible()): ?>
        <div>
            <?= $button('', 'preview', [
                'class'    => 'b-button-textonly b-page-preview',
                'data-url' => (string) $page->url(),
            ]) ?>
{'fraction_non_alphanumeric': 0.23430349624748306, 'fraction_numerical': 0.0007321984257733846, 'mean_word_length': 2.2216981132075473, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 184, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7582627', 'n_tokens_mistral': 1755, 'n_tokens_neox': 1720, 'n_words': 275}