<div class="row justify-content-center">
    <div class="col-8">
        <div *ngIf="photo">
            <h2><span jhiTranslate="faeBooApp.photo.detail.title">Photo</span> {{photo.id}}</h2>
            <hr>
            <jhi-alert-error></jhi-alert-error>
            <dl class="row-md jh-entity-details">
                <dt><span jhiTranslate="faeBooApp.photo.imageURL">Image URL</span></dt>
                <dd>
                    <span>{{photo.imageURL}}</span>
                </dd>
                <dt><span jhiTranslate="faeBooApp.photo.size">Size</span></dt>
                <dd>
                    <span>{{photo.size}}</span>
                </dd>
                <dt><span jhiTranslate="faeBooApp.photo.post">Post</span></dt>
                <dd>
                    <div *ngIf="photo.post">
                        <a [routerLink]="['/post', photo.post?.id, 'view']">{{photo.post?.id}}</a>
                    </div>
                </dd>
                <dt><span jhiTranslate="faeBooApp.photo.album">Album</span></dt>
                <dd>
                    <span *ngFor="let album of photo.albums; let last = last">
                        <a [routerLink]="['/album', album?.id, 'view' ]">{{album.name}}</a>{{last ? '' : ', '}}
                    </span>
                </dd>
            </dl>

            <button type="submit"
                    (click)="previousState()"
                    class="btn btn-info">
                <fa-icon [icon]="'arrow-left'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.back"> Back</span>
            </button>

            <button type="button"
                    [routerLink]="['/photo', photo.id, 'edit']"
                    class="btn btn-primary">
                <fa-icon [icon]="'pencil-alt'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.edit"> Edit</span>
            </button>
        </div>
    </div>
</div>
