superdesk/superdesk-client-core

View on GitHub
scripts/apps/packaging/views/search.html

Summary

Maintainability
Test Coverage
<div class="content-search" ng-class="{extended: selected}" ng-controller="SearchWidgetCtrl">
    <div class="search-container">
        <div class="search-box">
            <input type="text" placeholder="{{ 'Search'|translate }}" ng-model="query">
            <div ng-show="highlight" align="right" left sd-search-highlights data-highlight="highlight"></div>
        </div>

        <div class="filter-list">
            <div class="dropdown group-select pull-right" ng-if="multiSelected.length" dropdown>
                <div class="btn dropdown__toggle" dropdown__toggle><i class="icon-package-plus"></i> {{'Add items' | translate}}</div>
                <ul class="dropdown__menu pull-right">
                    <li ng-repeat="t in groupList">
                        <button option="{{ t | uppercase  }}" ng-click="addMultiItemsToGroup(t);">{{ t | uppercase | translate }}</button>
                    </li>
                </ul>
            </div>
        </div>

        <div class="content-list">
            <ul>
                <li ng-repeat="pitem in contentItems"
                    ng-class="{active: pitem === selected, added: itemInPackage(pitem), 'multi-select': pitem.multi}"
                    ng-if="pitem._id !== item._id"
                    sd-widget-prevent-preview>
                    <div class="select-box">
                        <i class="filetype-icon-{{pitem.type}}"></i>
                        <span ng-if="!itemInPackage(pitem)" ng-click="addToSelected(pitem)" class="select" sd-check ng-model="pitem.multi"></span>
                    </div>

                    <div class="state-label state-{{pitem.state}}">{{pitem.state}}</div>
                    <p><span class="keyword" ng-if="pitem.slugline">{{ pitem.slugline }}</span>{{pitem.headline || pitem.type}}</p>
                    <ul class="item-functions" ng-if="!itemInPackage(pitem) && !pitem.multi">
                    <li class="dropdown group-select" dropdown>
                        <button title="Add to package" class="dropdown__toggle" dropdown__toggle>
                            <i class="icon-package-plus"></i>
                        </button>
                        <ul class="dropdown__menu pull-right">
                            <li ng-repeat="t in groupList">
                                <button option="{{ t | uppercase  }}" ng-click="addItemToGroup(t, pitem);">{{ t | uppercase  }}</button>
                            </li>
                        </ul>
                    </li>
                   </ul>
                </li>
            </ul>
        </div>
    </div>

    <div ng-include="'scripts/apps/packaging/views/search-widget-preview.html'"></div>

</div>