<!--
    AngularJS template. Created by fran lopez on 9/1/16.

    This is the view to show details of a book, a result of a search
    it using one route parameter, named "bookId". This parameter has
    information about an internal identifier associated to a book.

-->

    <section data-ng-controller="BooksController" data-ng-init="getBookDetails()">
        <h1>Detalles del libro</h1><hr>
        <div class="formElement">
            <label class="staticLabel">Título original:</label>
            <label data-ng-bind="book.title"></label>
        </div>
        <div class="formElement">
            <label class="staticLabel">Fecha de publicación:</label>
            <label data-ng-bind="book.publicationDate | filterToFormatPublicationDate"></label>
        </div>
        <div class="formElement">
            <label class="staticLabel">Páginas:</label>
            <label data-ng-bind="book.numberOfPages"></label>
        </div>
        <div class="formElement">
            <label class="staticLabel">Género:</label>
            <label data-ng-bind="book.genre"></label>
        </div>
        <div class="formElement">
            <label class="staticLabel">Escritor:</label>
            <label data-ng-bind="book.writer"></label>
        </div>
        <div class="formElement">
            <label class="staticLabel">Protagonista:</label>
            <label data-ng-bind="book.protagonist"></label>
        </div>
        <div class="formElement">
            <label class="staticLabel">Sinopsis:</label>
            <table><tr data-ng-bind="book.synopsis"></tr></table>
        </div>
        <div class="formElement">
            <label class="staticLabel">Valoración:</label>
            <label data-ng-bind="book.rating"></label>
        </div>
        <hr><br>
        <a data-ng-href="#!/bookImages/{{bookId}}">Ver las imágenes del libro</a><br>
        <a data-ng-href="#!/bookReviews/{{bookId}}">Ver las críticas del libro</a><br><br>
        <a data-ng-href="#!/books">Volver al menú de búsqueda de libros</a>
    </section>