blob: cfb945866dbcbea7bf8e9b44aba7b52fccad4453 [file] [log] [blame]
<!-------------------------------------------------------------------------------
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
-------------------------------------------------------------------------------->
<div *ngFor="let attachment of appAttachments" [class.attachment---disabled]="appDisabled" class="attachment">
<input #inputElement (keydown.enter)="inputElement.click()"
(ngModelChange)="$event ? select(attachment?.id) : deselect(attachment?.id)"
[class.cursor-pointer]="!appDisabled"
[disabled]="appDisabled"
[id]="appId + '-' + attachment?.id"
[ngModel]="isSelected(attachment?.id)"
class="attachments--input"
type="checkbox">
<label
[class.attachments--label---deselected]="!isSelected(attachment?.id)"
[class.cursor-pointer]="!appDisabled"
[for]="appId + '-' + attachment?.id"
class="attachments--label">
{{attachment?.name}}
</label>
<button
(click)="appOpenAttachment.emit(attachment?.id)"
(pointerdown)="$event.preventDefault();"
[disabled]="appDisabled"
class="openk-button openk-info openk-button-rounded attachments--button"
type="button">
<mat-icon>call_made</mat-icon>
</button>
</div>