| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one |
| ~ or more contributor license agreements. See the NOTICE file |
| ~ distributed with this work for additional information |
| ~ regarding copyright ownership. The ASF licenses this file |
| ~ to you under the Apache License, Version 2.0 (the |
| ~ "License"); you may not use this file except in compliance |
| ~ with the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, |
| ~ software distributed under the License is distributed on an |
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~ KIND, either express or implied. See the License for the |
| ~ specific language governing permissions and limitations |
| ~ under the License. |
| --> |
| |
| <div class="dropdown-multiselect btn-group" ngClass="{{type || ''}}"> |
| <button type="button" #list (click)="multiactions.toggle($event, list)"> |
| <span class="ellipsis" *ngIf="model.length === 0 && type"> |
| <ng-container *ngIf="type === 'resource_type' || type === 'resource_types';else noResourceTypeSelect">Select {{ type | convertaction}}</ng-container> |
| <ng-template #noResourceTypeSelect>Select {{ type }}</ng-template> |
| |
| </span> |
| <span class="selected-items ellipsis" *ngIf="model.length !== 0"> |
| Selected {{model.length}} item<strong *ngIf="model.length > 1">s</strong> |
| </span> |
| <span class="caret-btn"><i class="material-icons">keyboard_arrow_down</i></span> |
| </button> |
| |
| <bubble-up #multiactions position="bottom" [keep-open]="true" class="mt-5"> |
| <ul class="list-menu" id="scrolling"> |
| <li class="filter-actions"> |
| <a class="select_all" (click)="selectAllOptions($event)"> |
| <i class="material-icons">playlist_add_check</i> All |
| </a> |
| <a class="deselect_all" (click)="deselectAllOptions($event)"> |
| <i class="material-icons">clear</i> None |
| </a> |
| </li> |
| <ng-template let-item ngFor [ngForOf]="items"> |
| <li role="presentation" *ngIf="model"> |
| <a href="#" |
| class="list-item billing-user-name" |
| [ngClass]="{'uppercase': type === 'resource_type' || type === 'status'}" |
| role="menuitem" |
| (click)="toggleSelectedOptions($event, model, item)"> |
| <span class="material-icons" *ngIf="model.indexOf(item) >= 0">done</span> |
| <ng-container *ngIf="type !== 'resource_type' && type !== 'resource_types' && item !== 'invalid_name' && item !== 'invalid_version' && item !== 'installation_error'"> |
| <div [ngClass]="{'uppercase': type === 'status'}">{{item}}</div> |
| </ng-container> |
| <ng-container *ngIf="type === 'resource_type' || type === 'resource_types' || item === 'invalid_name' || item === 'invalid_version' || item === 'installation_error'"> |
| <div [ngClass]="{'uppercase': type === 'status' || type === 'resource_type'}">{{item | convertaction}}</div> |
| </ng-container> |
| </a> |
| </li> |
| </ng-template> |
| <li *ngIf="items?.length == 0"> |
| <a role="menuitem" class="list-item"> |
| <span class="material-icons">visibility_off</span> |
| <ng-container *ngIf="type === 'resource_type' || type === 'resource_types';else noResourceType">No {{type | convertaction}}</ng-container> |
| <ng-template #noResourceType>No {{type}}</ng-template> |
| </a> |
| </li> |
| </ul> |
| </bubble-up> |
| </div> |