superdesk/superdesk-client-core

View on GitHub
scripts/apps/archive/views/item-preview.html

Summary

Maintainability
Test Coverage
<div>
    <div class="content-container">

        <div class="composite-nav" ng-if="item.type === 'composite'">
            <i class="filetype-icon-large-composite"></i> <span>{{ 'Package preview' | translate }}</span>
        </div>
        <div class="preview-state__row">
            <span sd-item-state data-state=item.state data-embargo=item.embargo></span>
            <span ng-if="item.flags.marked_for_not_publication" class="state-label not-for-publication" translate>Not For Publication</span>
            <span class="state-label legal" ng-if="item.flags.marked_for_legal" translate>Legal</span>
            <span class="state-label sms" ng-if="item.flags.marked_for_sms" translate>Sms</span>
            <span class="state-label updated" ng-if="item.rewritten_by" translate>Updated</span>
        </div>

        <p class="title" ng-if="item.headline" sd-html-preview="item.headline"></p>

        <div class="core-content">
            <p ng-if="item.is_spiked" class="alert alert-warning expires">
                <span translate>expires</span>
                <time sd-datetime data-date="item.expiry"></time>
            </p>
            <div ng-if="item.type === 'picture' || item.type === 'graphic'" class="picture-preview">
                <div>
                    <span translate>Original</span>
                    <div sd-item-rendition data-item="item" data-rendition="viewImage"></div>
                </div>
                <div sd-item-crops data-item="item"></div>
            </div>

            <div ng-if="item.type === 'audio'">
                <audio controls="controls" sd-sources data-renditions="item.renditions"></audio>
            </div>

            <div ng-if="item.type === 'video'">
                <sd-video item="item"></sd-video>
            </div>

            <div ng-if="item.associations.featuremedia" class="picture-preview">
                <div sd-item-rendition data-item="item.associations.featuremedia" data-rendition="viewImage"></div>
                <p class="nav-space description-text">{{item.associations.featuremedia.description_text}}</p>
            </div>

            <div class="text abstract" ng-show="item.abstract" sd-html-preview="item.abstract"></div>

            <div class="text" ng-show="item.body_html" sd-html-preview="item.body_html"></div>

            <div class="composite-preview" ng-if="item.type === 'composite'">
                <div sd-package data-item="item"></div>
            </div>
        </div>
    </div>
</div>