superdesk/superdesk-client-core

View on GitHub
scripts/apps/authoring/views/opened-articles.html

Summary

Maintainability
Test Coverage
<div class="opened-articles-bar" ng-class="{'menu-open': flags.menu}" data-test-id="opened-articles-bar">
    <button class="opened-articles-bar__quick-actions" ng-click="openDashboard()" title="{{ 'All opened items' | translate }}"><i class="icon-th-large icon--white"></i></button>

    <ul ng-if="workqueue.items.length" class="opened-articles-bar__list">
        <li
            class="opened-articles-bar__item"
            ng-repeat="article in workqueue.items track by article._id"
            ng-class="{'opened-articles-bar__item--active': article === articleInEditMode}"
            data-test-id="item"
        >
            <a class="opened-articles-bar__item-title" ng-click="edit(article, $event)" ng-href="{{ :: link(article) }}">
                <span ng-show="article.headline || article.slugline">{{ (article.headline || article.slugline) | stripHtmlTags }}</span>
                <span ng-show="!article.headline && !article.slugline" translate>Untitled</span>
            </a>
            <button class="opened-articles-bar__item-close" ng-click="closeItem(article)" data-test-id="close"><i class="icon-close-small icon--white"></i></button>
        </li>
    </ul>

    <ul class="opened-articles-bar__multiedit" ng-if="multiEdit.items.length">
        <li class="opened-articles-bar__item opened-articles-bar__item--teal" ng-class="{'opened-articles-bar__item--active': isMultiedit}">
            <a ng-href="" class="opened-articles-bar__item-title" ng-click="openMulti()">
                <span translate>Multiedit</span>
            </a>
            <button class="opened-articles-bar__item-close" ng-click="closeMulti()"><i class="icon-close-small icon--white"></i></button>
        </li>
    </ul>

    <div class="opened-articles-bar__create-new" ng-if="privileges.archive">
        <sd-content-create custom-button="createNewButton"></sd-content-create>
    </div>
</div>

<div sd-dashboard-articles
     data-active="dashboardActive"
     data-close-dashboard="closeDashboard()"
     data-close-item="closeItem(item)"
     data-edit="edit(item, event)"
     data-link="link(item)"
     data-items="workqueue.items"
></div>