superdesk/superdesk-client-core

View on GitHub
scripts/apps/monitoring/views/item-actions-menu.html

Summary

Maintainability
Test Coverage
<div class="dropdown dropdown--align-right dropdown--more-activity item-actions-menu"
     dropdown
     dropdown-append-to-body
     is-open="open"
     on-toggle="toggleActions(open)">
    <button class="icn-btn more-activity-toggle-ref condensed dropdown__toggle"
            ng-click="stopEvent($event)"
            ng-dblclick="stopEvent($event)"
            ng-show="active || open"
            aria-label="{{ :: 'More actions' | translate }}"
            dropdown__toggle><i class="icon-dots-vertical"></i></button>

    <ul class="dropdown dropdown--align-right dropdown__menu more-activity-menu" ng-class="{open: open}">
        <li>
            <div class="dropdown__menu-label">
                {{ :: 'Actions' | translate }}
                <button class="dropdown__menu-close"><i class="icon-close-small"></i></button>
            </div>
        </li>
        <li ng-repeat-start="group in menuGroups"></li>
        <li class="dropdown__menu-divider"></li>


        <li ng-repeat="action in group.actions">
            <!-- Render activity based actions. Should be migrated to extension actions. -->
            <span
                ng-if="action.kind === 'activity-based'"
                ng-init="activity = action.activity"
                sd-activity-item
            ></span>

            <!-- Render actions from extensions -->
            <a ng-if="action.kind === 'extension-action'" ng-click="action.articleAction.onTrigger()">
                <i ng-if="action.articleAction.icon" class="{{action.articleAction.icon}}"></i>
                <span>{{action.articleAction.label}}</span>
            </a>
        </li>


        <li ng-if="group.concate" sd-activity-dropdown-item data-group="{group.label}"></li>


        <li ng-if="!menuGroups.length">
            <div class="info-block" translate>You don't have the privileges to perform any action</div>
        </li>
        <li ng-repeat-end></li>
    </ul>
</div>