<div>
    <h2 id="page-heading">
        <span>Books</span>
        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-book" [routerLink]="['/book/new']">
            <fa-icon [icon]="'plus'"></fa-icon>
            <span >
            Create new Book
            </span>
        </button>
    </h2>
    <jhi-alert></jhi-alert>
    <br/>
    <div class="table-responsive" *ngIf="books">
        <table class="table table-striped">
            <thead>
            <tr>
            <th><span>ID</span></th>
            <th><span>Title</span></th>
            <th><span>Author</span></th>
            <th><span>Published</span></th>
            <th><span>Quantity</span></th>
            <th><span>Price</span></th>
            <th></th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let book of books ;trackBy: trackId">
                <td><a [routerLink]="['/book', book.id, 'view' ]">{{book.id}}</a></td>
                <td>{{book.title}}</td>
                <td>{{book.author}}</td>
                <td>{{book.published | date:'mediumDate'}}</td>
                <td>{{book.quantity}}</td>
                <td>{{book.price}}</td>
                <td class="text-right">
                    <div class="btn-group flex-btn-group-container">
                        <button type="submit"
                                [routerLink]="['/book', book.id, 'view' ]"
                                class="btn btn-info btn-sm">
                            <fa-icon [icon]="'eye'"></fa-icon>
                            <span class="d-none d-md-inline">View</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/book', book.id, 'edit']"
                                class="btn btn-primary btn-sm">
                            <fa-icon [icon]="'pencil-alt'"></fa-icon>
                            <span class="d-none d-md-inline">Edit</span>
                        </button>
                        <button type="submit"
                                [routerLink]="['/', 'book', { outlets: { popup: book.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">Delete</span>
                        </button>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
