<commit_before><div id="subnav" class="subnav subnav--authoring" ng-class="{'auth-sendto': views.send}" sd-media-query min-width="900">

    <div class="dropdown dropright lock-avatar pull-left" ng-if="item._locked" dropdown>
        <figure class="avatar small avatar-with-info" dropdown-toggle>
            <div class="logged-info"></div>
            <div class="user-image">
                <img sd-user-avatar data-user="item.lock_user">
            </div>
        </figure>

        <div class="dropdown-menu">
            <div class="menu-label" translate>Locked by</div>
            <figure class="avatar large">
                <div class="user-image">
                    <img sd-user-avatar data-user="item.lock_user">
                </div>
            </figure>
            <div class="lock-text">{{ item.lock_user | username }}</div>
            <button class="btn btn-medium pull-left"
                    ng-if="can_unlock()"
                    ng-click="unlock()"
                    ng-disabled="unlockClicked" translate>
                Unlock
            </button>
        </div>
    </div>

    <div class="subnav__authoring-topbar" ng-class="{'has-highlights': item.highlights}">
        <span class="stage" ng-show="stage" ng-if="item._type !== 'legal_archive'"><b>{{deskName}}</b> / {{ stage.name }}</span>
        <span class="stage" ng-show="stage" ng-if="item._type === 'legal_archive'"><b>{{deskName}}</b> / {{ stage }}</span>
        <div ng-if="item.more_coming === true" class="state-label state-in_progress" translate>More coming</div>
        <span ng-if="item.highlights" sd-highlights-title data-item="item"></span>
    </div>

    <div class="subnav__stretch-bar">
      <div class="subnav__button-stack subnav__button-stack--custom-buttons" ng-if="$root.config.features.customAuthoringTopbar" ng-show="_editable && itemActions.save && action === 'edit'">
        <button class="btn btn-custom"
                ng-if="itemActions.send"
                ng-click="sendToNextStage()"
                title="{{ :: 'To Desk' | translate }}">
                <span class="btn__text" translate>To Desk</span>
                <span class="btn__text--short" translate>T D</span>
        </button>
        <button class="btn btn-custom"
                type="submit"
                ng-click="publish()"
                title="{{ :: 'Publish' | translate }}">
                <span class="btn__text" translate>Publish</span>
                <span class="btn__text--short" translate>P</span>
        </button>
        <button class="btn btn-custom"
                ng-click="publishAndContinue()"
                title="{{ :: 'Publish and Continue' | translate }}">
                <span class="btn__text" translate>Publish &amp; Continue</span>
                <span class="btn__text--short" translate>P &amp; C</span>
        </button>
      </div>
    </div>
    <div class="subnav__button-stack subnav__button-stack--default" sd-media-query min-width="180">
      <button id="Edit" class="btn btn-medium" ng-if="item._type !== 'legal_archive'"
        ng-show="action === 'view' && !item._locked && itemActions.edit"
        ng-click="edit()"
        translate>Edit</button>

      <button class="btn"
        ng-show="action === 'view' && !item._locked && itemActions.deschedule"
        ng-click="deschedule()"
        translate>Deschedule</button>

      <button class="btn btn-info" ng-if="item._type !== 'legal_archive'"
        ng-show="action === 'view' && !item._locked && itemActions.correct"
        ng-click="openAction('correct')"
        translate>Edit and Correct</button>

      <button class="btn btn-info" ng-if="item._type !== 'legal_archive'"
        ng-show="action === 'view' && !item._locked && itemActions.kill"
        ng-click="openAction('kill')"
        translate>Edit and Kill</button>

      <button class="btn btn--close" id="closeAuthoringBtn" ng-click="close()" title="{{ :: 'Close' | translate }}"><span class="btn__text" translate>Close</span><i class="icon-close-small btn__text--alt-icon"></i></button>

      <button class="btn btn-info" type="submit"
        ng-click="saveTopbar(item)"
        ng-show="_editable"
        ng-if = "itemActions.save && action === 'edit'"
        ng-disabled="!save_enabled() || saveDisabled"
        translate>Save</button>

      <button id="export" class="btn btn-info"
        ng-click="exportHighlight(item)"
        ng-disabled="!_editable"
        ng-if="highlight"
        translate>Export</button>
    </div>

    <div class="subnav__button-stack subnav__button-stack--square-buttons">
        <button class="navbtn strict"
            ng-if="!item._locked && _editable"
            title="{{ :: 'Minimize' | translate }}"
            ng-click="minimize()">
            <i class="big-icon-minimize"></i>
        </button>

        <div id="authoring-extra-dropdown"
             ng-if="item._type !== 'legal_archive' && item._type !== 'archived' && !highlight"
             class="navbtn dropdown pull-left strict" dropdown>
            <button id="more-actions" class="dropdown-toggle" title="{{ :: 'More actions' | translate }}" dropdown-toggle>
                <i class="icon-dots-vertical"></i>
            </button>
            <div class="dropdown-menu pull-right">
                <ul ng-controller="TemplateMenu as templateMenu" ng-show="canSaveTemplate()">
                  <li>
                    <button type="button"
                        ng-click="templateMenu.create(item)"
                        translate>Save as template</button>
                  </li>
                </ul>

                <ul id="multiedit" ng-if="item.task.desk && itemActions.multi_edit && !item._locked" ng-show="action !== 'kill'">
                  <li>
                    <div class="dropdown highlights-toggle" dropdown>
                      <button class="dropdown-toggle" dropdown-toggle>
                        {{ :: 'Multiedit' | translate }}
                        <i class="icon-chevron-right-thin submenu-icon"></i>
                      </button>
                      <ul class="dropdown-menu right-submenu" sd-multiedit-dropdown></ul>
                    </div>
                  </li>
                </ul>

                <ul ng-if="item.task.desk && itemActions.mark_item">
                  <li class="divider"></li>
                  <li><span class="menu-label" translate>Highlights</span></li>
                  <li>
                    <div class="dropdown highlights-toggle" dropdown>
                      <button class="dropdown-toggle" dropdown-toggle>
                        {{ :: 'Mark item for' | translate }}
                        <i class="icon-chevron-right-thin submenu-icon"></i>
                      </button>
                      <ul class="dropdown-menu right-submenu" sd-mark-highlights-dropdown></ul>
                    </div>
                  </li>
                </ul>

                <ul ng-if="_editable" ng-controller="SpellcheckMenu as spellcheckMenu">
                    <li class="divider"></li>
                    <li><span class="menu-label" translate>Spell Checker</span></li>
                    <li>
                      <span>
                        <span class="pull-right"
                            sd-switch
                            ng-model="spellcheckMenu.isAuto"
                            ng-change="spellcheckMenu.pushSettings()"
                            tooltip="{{ spellcheckMenu.isAuto ? 'Spell checking ON' : 'Spell checking OFF'  | translate }}"
                            tooltip-placement="left"></span>
                        <span translate>Run automatically</span>
                      </span>
                    </li>
                    <li>
                        <button type="button"
                            ng-click="spellcheckMenu.spellcheck()"
                            ng-disabled="spellcheckMenu.isAuto">
                              <span class="shortcut pull-right">Ctrl+Shift+D</span>
                              <span translate>Check spelling</span>
                        </button>
                    </li>
                </ul>
            </div>
        </div>

        <button id="send-to-btn" ng-show="_editable"
            class="navbtn navbtn--highlighted" title="{{ :: 'Send to / Publish' | translate }}"
            ng-click="views.send = !views.send"
            ng-class="{'active': views.send}">
            <i class="svg-icon-sendto inverse"></i>
        </button>
    </div>
</div>
<commit_msg>Check for unlock button visibility<commit_after><div id="subnav" class="subnav subnav--authoring" ng-class="{'auth-sendto': views.send}" sd-media-query min-width="900">

    <div class="dropdown dropright lock-avatar pull-left" ng-if="isLocked(item)" dropdown>
        <figure class="avatar small avatar-with-info" dropdown-toggle>
            <div class="logged-info"></div>
            <div class="user-image">
                <img sd-user-avatar data-user="item.lock_user">
            </div>
        </figure>

        <div class="dropdown-menu">
            <div class="menu-label" translate>Locked by</div>
            <figure class="avatar large">
                <div class="user-image">
                    <img sd-user-avatar data-user="item.lock_user">
                </div>
            </figure>
            <div class="lock-text">{{ item.lock_user | username }}</div>
            <button class="btn btn-medium pull-left"
                    ng-if="can_unlock()"
                    ng-click="unlock()"
                    ng-disabled="unlockClicked" translate>
                Unlock
            </button>
        </div>
    </div>

    <div class="subnav__authoring-topbar" ng-class="{'has-highlights': item.highlights}">
        <span class="stage" ng-show="stage" ng-if="item._type !== 'legal_archive'"><b>{{deskName}}</b> / {{ stage.name }}</span>
        <span class="stage" ng-show="stage" ng-if="item._type === 'legal_archive'"><b>{{deskName}}</b> / {{ stage }}</span>
        <div ng-if="item.more_coming === true" class="state-label state-in_progress" translate>More coming</div>
        <span ng-if="item.highlights" sd-highlights-title data-item="item"></span>
    </div>

    <div class="subnav__stretch-bar">
      <div class="subnav__button-stack subnav__button-stack--custom-buttons" ng-if="$root.config.features.customAuthoringTopbar" ng-show="_editable && itemActions.save && action === 'edit'">
        <button class="btn btn-custom"
                ng-if="itemActions.send"
                ng-click="sendToNextStage()"
                title="{{ :: 'To Desk' | translate }}">
                <span class="btn__text" translate>To Desk</span>
                <span class="btn__text--short" translate>T D</span>
        </button>
        <button class="btn btn-custom"
                type="submit"
                ng-click="publish()"
                title="{{ :: 'Publish' | translate }}">
                <span class="btn__text" translate>Publish</span>
                <span class="btn__text--short" translate>P</span>
        </button>
        <button class="btn btn-custom"
                ng-click="publishAndContinue()"
                title="{{ :: 'Publish and Continue' | translate }}">
                <span class="btn__text" translate>Publish &amp; Continue</span>
                <span class="btn__text--short" translate>P &amp; C</span>
        </button>
      </div>
    </div>
    <div class="subnav__button-stack subnav__button-stack--default" sd-media-query min-width="180">
      <button id="Edit" class="btn btn-medium" ng-if="item._type !== 'legal_archive'"
        ng-show="action === 'view' && !item._locked && itemActions.edit"
        ng-click="edit()"
        translate>Edit</button>

      <button class="btn"
        ng-show="action === 'view' && !item._locked && itemActions.deschedule"
        ng-click="deschedule()"
        translate>Deschedule</button>

      <button class="btn btn-info" ng-if="item._type !== 'legal_archive'"
        ng-show="action === 'view' && !item._locked && itemActions.correct"
        ng-click="openAction('correct')"
        translate>Edit and Correct</button>

      <button class="btn btn-info" ng-if="item._type !== 'legal_archive'"
        ng-show="action === 'view' && !item._locked && itemActions.kill"
        ng-click="openAction('kill')"
        translate>Edit and Kill</button>

      <button class="btn btn--close" id="closeAuthoringBtn" ng-click="close()" title="{{ :: 'Close' | translate }}"><span class="btn__text" translate>Close</span><i class="icon-close-small btn__text--alt-icon"></i></button>

      <button class="btn btn-info" type="submit"
        ng-click="saveTopbar(item)"
        ng-show="_editable"
        ng-if = "itemActions.save && action === 'edit'"
        ng-disabled="!save_enabled() || saveDisabled"
        translate>Save</button>

      <button id="export" class="btn btn-info"
        ng-click="exportHighlight(item)"
        ng-disabled="!_editable"
        ng-if="highlight"
        translate>Export</button>
    </div>

    <div class="subnav__button-stack subnav__button-stack--square-buttons">
        <button class="navbtn strict"
            ng-if="!item._locked && _editable"
            title="{{ :: 'Minimize' | translate }}"
            ng-click="minimize()">
            <i class="big-icon-minimize"></i>
        </button>

        <div id="authoring-extra-dropdown"
             ng-if="item._type !== 'legal_archive' && item._type !== 'archived' && !highlight"
             class="navbtn dropdown pull-left strict" dropdown>
            <button id="more-actions" class="dropdown-toggle" title="{{ :: 'More actions' | translate }}" dropdown-toggle>
                <i class="icon-dots-vertical"></i>
            </button>
            <div class="dropdown-menu pull-right">
                <ul ng-controller="TemplateMenu as templateMenu" ng-show="canSaveTemplate()">
                  <li>
                    <button type="button"
                        ng-click="templateMenu.create(item)"
                        translate>Save as template</button>
                  </li>
                </ul>

                <ul id="multiedit" ng-if="item.task.desk && itemActions.multi_edit && !item._locked" ng-show="action !== 'kill'">
                  <li>
                    <div class="dropdown highlights-toggle" dropdown>
                      <button class="dropdown-toggle" dropdown-toggle>
                        {{ :: 'Multiedit' | translate }}
                        <i class="icon-chevron-right-thin submenu-icon"></i>
                      </button>
                      <ul class="dropdown-menu right-submenu" sd-multiedit-dropdown></ul>
                    </div>
                  </li>
                </ul>

                <ul ng-if="item.task.desk && itemActions.mark_item">
                  <li class="divider"></li>
                  <li><span class="menu-label" translate>Highlights</span></li>
                  <li>
                    <div class="dropdown highlights-toggle" dropdown>
                      <button class="dropdown-toggle" dropdown-toggle>
                        {{ :: 'Mark item for' | translate }}
                        <i class="icon-chevron-right-thin submenu-icon"></i>
                      </button>
                      <ul class="dropdown-menu right-submenu" sd-mark-highlights-dropdown></ul>
                    </div>
                  </li>
                </ul>

                <ul ng-if="_editable" ng-controller="SpellcheckMenu as spellcheckMenu">
                    <li class="divider"></li>
                    <li><span class="menu-label" translate>Spell Checker</span></li>
                    <li>
                      <span>
                        <span class="pull-right"
                            sd-switch
                            ng-model="spellcheckMenu.isAuto"
                            ng-change="spellcheckMenu.pushSettings()"
                            tooltip="{{ spellcheckMenu.isAuto ? 'Spell checking ON' : 'Spell checking OFF'  | translate }}"
                            tooltip-placement="left"></span>
                        <span translate>Run automatically</span>
                      </span>
                    </li>
                    <li>
                        <button type="button"
                            ng-click="spellcheckMenu.spellcheck()"
                            ng-disabled="spellcheckMenu.isAuto">
                              <span class="shortcut pull-right">Ctrl+Shift+D</span>
                              <span translate>Check spelling</span>
                        </button>
                    </li>
                </ul>
            </div>
        </div>

        <button id="send-to-btn" ng-show="_editable"
            class="navbtn navbtn--highlighted" title="{{ :: 'Send to / Publish' | translate }}"
            ng-click="views.send = !views.send"
            ng-class="{'active': views.send}">
            <i class="svg-icon-sendto inverse"></i>
        </button>
    </div>
</div>

{'fraction_non_alphanumeric': 0.1561531715872552, 'fraction_numerical': 0.0007015492546039169, 'mean_word_length': 1.7887186175415715, 'pattern_counts': {'":': 0, '<': 319, '<?xml version=': 0, '>': 319, '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': '3951891', 'n_tokens_mistral': 4828, 'n_tokens_neox': 4578, 'n_words': 856}