superdesk/superdesk-client-core

View on GitHub
scripts/apps/authoring/views/authoring.html

Summary

Maintainability
Test Coverage
<section sd-authoring class="auth-screen" ng-if="origItem" data-test-id="authoring" aria-labelledby="authoring-heading" >
    <h2 id="authoring-heading"  class="a11y-only" translate>Authoring</h2>
    <div sd-authoring-topbar></div>
    <div ng-if="!loading" class="main-section" ng-class="{'auth-sendto': views.send, 'packaging-screen': item.type === 'composite', 'main-section--pinned-tabs': tabsPinned}">
        <div sd-authoring-widgets data-item="item">
            <div class="page-content-container" ng-click="views.send = false">
                <div>
                    <div class="authoring-sticky">
                        <div style="display: flex; align-items: center">
                            <div class="authoring-sticky__detailed">
                                <sd-authoring-topbar2-react
                                    article="item"
                                    action="action"
                                    on-change="handleArticleChange"
                                ></sd-authoring-topbar-react>
                            </div>
                        </div>

                        <div class="authoring-sticky__theme-controls ">
                            <div class="preview-modal-control" ng-if="$root.config.features.preview">
                                <button class="preview-toggle icn-btn"
                                    ng-if="canPrintPreview(item)"
                                    title="{{:: 'Preview' | translate}}"
                                    ng-click="openFullPreview($event)"
                                >
                                    <i class="icon-preview-mode"></i>
                                </button>
                            </div>

                            <button class="proofread-toggle icn-btn"
                                ng-class="{active: proofread}"
                                ng-click="proofread = !proofread"
                                title="{{:: 'Toggle theme' | translate}}">
                                <i class="icon-adjust"></i>
                            </button>
                            <span sd-theme-select
                                ng-if="proofread"
                                data-key="proofreadTheme"></span>
                            <span sd-theme-select
                                ng-if="!proofread"
                                data-key="theme"></span>
                        </div>
                    </div>
                </div>

                <div style="overflow-y: scroll; flex: 1" class="page-content-container--scrollable">
                    <header sd-authoring-header></header>

                    <article class="main-article theme-container " ng-class="{preview: !_editable}">
                        <div ng-if="item.type !== 'composite'" class="fieldset main-article__fieldset" sd-article-edit></div>
                        <div ng-if="item.type === 'composite'" sd-package-edit></div>
                    </article>
                </div>

            </div>
        </div>

        <div sd-macros-replace></div>

    </div>

    <sd-interactive-article-actions-panel-combined
        handle-unsaved-changes="handleUnsavedChangesReact"
        location="'authoring'"
        on-error="onError"
        on-data-change="autosave"
    />
</section>