<div>
    <h2 id="page-heading">
        <span jhiTranslate="faeBooApp.album.home.title">Albums</span>
        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-album" [routerLink]="['/album/new']">
            <fa-icon [icon]="'plus'"></fa-icon>
            <span  jhiTranslate="faeBooApp.album.home.createLabel">
            Create new Album
            </span>
        </button>
    </h2>
    <jhi-alert></jhi-alert>
    <br/>
    <div class="table-responsive" *ngIf="albums">
        <table class="table table-striped">
            <thead>
            <tr>
            <th><span jhiTranslate="global.field.id">ID</span></th>
            <th><span jhiTranslate="faeBooApp.album.name">Name</span></th>
            <th><span jhiTranslate="faeBooApp.album.description">Description</span></th>
            <th><span jhiTranslate="faeBooApp.album.owner">Owner</span></th>
            <th></th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let album of albums ;trackBy: trackId">
                <td><a [routerLink]="['/album', album.id, 'view' ]">{{album.id}}</a></td>
                <td>{{album.name}}</td>
                <td>{{album.description}}</td>
                <td>
                    {{album.owner?.email}}
                </td>
                <td class="text-right">
                    <div class="btn-group flex-btn-group-container">
                        <button type="submit"
                                [routerLink]="['/album', album.id, 'view' ]"
                                class="btn btn-info btn-sm">
                            <fa-icon [icon]="'eye'"></fa-icon>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/album', album.id, 'edit']"
                                class="btn btn-primary btn-sm">
                            <fa-icon [icon]="'pencil-alt'"></fa-icon>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/', { outlets: { popup: 'album/'+ album.id + '/delete'} }]"
                                replaceUrl="true"
                                queryParamsHandling="merge"
                                class="btn btn-danger btn-sm">
                            <fa-icon [icon]="'times'"></fa-icon>
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
                        </button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
