<!-- ******************************************************************************** | |
* Copyright (c) 2015-2018 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 v. 2.0 which is available at | |
* http://www.eclipse.org/legal/epl-2.0. | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
******************************************************************************** --> | |
<div [ngSwitch]="superType"> | |
<!-- audio --> | |
<div *ngSwitchCase="'audio'"> | |
<div [ngSwitch]="subType"> | |
<span *ngSwitchDefault [ngClass]="'fa fa-file-audio-o fa-' + size + 'x'"></span> | |
</div> | |
</div> | |
<!-- application --> | |
<div *ngSwitchCase="'application'"> | |
<div [ngSwitch]="subType"> | |
<span *ngSwitchCase="'vnd.openxmlformats-officedocument.wordprocessingml.document'" [ngClass]="'fa fa-file-word-o fa-' + size + 'x'"></span> | |
<span *ngSwitchCase="'vnd.openxmlformats-officedocument.presentationml.presentation'" [ngClass]="'fa fa-file-powerpoint-o fa-' + size + 'x'"></span> | |
<span *ngSwitchCase="'vnd.openxmlformats-officedocument.spreadsheetml.sheet'" [ngClass]="'fa fa-file-excel-o fa-' + size + 'x'"></span> | |
<span *ngSwitchCase="'pdf'" [ngClass]="'fa fa-file-pdf-o fa-' + size + 'x'"></span> | |
<span *ngSwitchCase="'x-zip-compressed'" [ngClass]="'fa fa-file-archive-o fa-' + size + 'x'"></span> | |
<span *ngSwitchDefault [ngClass]="'fa fa-file-o fa-' + size + 'x'"></span> | |
</div> | |
</div> | |
<!-- image --> | |
<div *ngSwitchCase="'image'"> | |
<div *ngIf="!imgUrl"> | |
<span *ngSwitchDefault [ngClass]="'fa fa-file-image-o fa-' + size + 'x'"></span> | |
</div> | |
<div *ngIf="imgUrl" [ngSwitch]="subType"> | |
<img *ngSwitchCase="'png'" [src]="imgUrl" style="max-height: 28px; max-width: 24px;"> | |
<img *ngSwitchCase="'jpg'" [src]="imgUrl" style="max-height: 28px; max-width: 24px;"> | |
<img *ngSwitchCase="'jpeg'" [src]="imgUrl" style="max-height: 28px; max-width: 24px;"> | |
<img *ngSwitchCase="'bmp'" [src]="imgUrl" style="max-height: 28px; max-width: 24px;"> | |
<span *ngSwitchDefault [ngClass]="'fa fa-file-image-o fa-' + size + 'x'"></span> | |
</div> | |
</div> | |
<!-- text --> | |
<div *ngSwitchCase="'text'"> | |
<div [ngSwitch]="subType"> | |
<span *ngSwitchDefault [ngClass]="'fa fa-file-text-o fa-' + size + 'x'"></span> | |
</div> | |
</div> | |
<!-- video --> | |
<div *ngSwitchCase="'video'"> | |
<div [ngSwitch]="subType"> | |
<span *ngSwitchDefault [ngClass]="'fa fa-file-video-o fa-' + size + 'x'"></span> | |
</div> | |
</div> | |
<!-- default --> | |
<div *ngSwitchDefault> | |
<span [ngClass]="'fa fa-file-o fa-' + size + 'x'"></span> | |
</div> | |
</div> |