<div>
    <h2 id="page-heading">
        <span jhiTranslate="gatewayApp.quotesQuote.home.title">Quotes</span>
        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-quote" [routerLink]="['/quote/new']">
            <fa-icon [icon]="'plus'"></fa-icon>
            <span  jhiTranslate="gatewayApp.quotesQuote.home.createLabel">
            Create new Quote
            </span>
        </button>
    </h2>
    <jhi-alert></jhi-alert>
    <br/>
    <div class="table-responsive" *ngIf="quotes">
        <table class="table table-striped">
            <thead>
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
            <th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="symbol"><span jhiTranslate="gatewayApp.quotesQuote.symbol">Symbol</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="price"><span jhiTranslate="gatewayApp.quotesQuote.price">Price</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th jhiSortBy="lastTrade"><span jhiTranslate="gatewayApp.quotesQuote.lastTrade">Last Trade</span> <fa-icon [icon]="'sort'"></fa-icon></th>
            <th></th>
            </tr>
            </thead>
            <tbody>
            <tr *ngFor="let quote of quotes ;trackBy: trackId">
                <td><a [routerLink]="['/quote', quote.id, 'view' ]">{{quote.id}}</a></td>
                <td>{{quote.symbol}}</td>
                <td>{{quote.price}}</td>
                <td>{{quote.lastTrade | date:'medium'}}</td>
                <td class="text-right">
                    <div class="btn-group flex-btn-group-container">
                        <button type="submit"
                                [routerLink]="['/quote', quote.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]="['/quote', quote.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: 'quote/'+ quote.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 *ngIf="quotes && quotes.length">
        <div class="row justify-content-center">
            <jhi-item-count [page]="page" [total]="queryCount" [maxSize]="5" [itemsPerPage]="itemsPerPage"></jhi-item-count>
        </div>
        <div class="row justify-content-center">
            <ngb-pagination [collectionSize]="totalItems" [(page)]="page" [pageSize]="itemsPerPage" [maxSize]="5" [rotate]="true" [boundaryLinks]="true" (pageChange)="loadPage(page)"></ngb-pagination>
        </div>
    </div>
</div>
