superdesk/superdesk-client-core

View on GitHub
scripts/apps/authoring/metadata/views/metadata-target-publishing.html

Summary

Maintainability
Test Coverage
<div class="form__row form__row--flex form__row--s-padding">
    <div class="form__row-item form__row-item--no-grow">
        <span sd-check ng-model="deny" ng-show="!disabled" label-position="inside">{{:: 'Not' | translate }}</span>
    </div>
    <div class="form__row-item">
        <div class="sd-line-input sd-line-input--is-select sd-line-input--no-label sd-line-input--no-margin">
            <select ng-model="target" ng-disabled="disabled" class="sd-line-input__select">
                <option value=""></option>
                <option value="{{t}}" ng-repeat="t in list track by t.name">{{:: t.name}}</option>
            </select>
        </div>
    </div>
    <div class="form__row-item form__row-item--no-grow">
        <button class="btn btn--hollow btn--primary" type="button" ng-click="addTarget(target)" ng-disabled="canAddTarget()" translate>Add</button>
    </div>
</div>

<div class="terms-list terms-list--full" ng-if="targets.length">
    <ul>
        <li ng-repeat="t in targets" ng-if="!disabled" ng-click="removeTarget(t)">{{ :: t['allow'] == false ? 'Not ' + t.name : t.name}}<i role="button" aria-label="{{'Remove item'| translate }}" class="icon-close-small"></i></li>
        <li ng-repeat="t in targets" ng-if="disabled">{{ :: t['allow'] == false ? 'Not ' + t.name : t.name}}</li>
    </ul>
</div>