<!--
    AngularJS template. Created by fran lopez on 14/12/15.

    This is the view to search information about books by title.
    This view shows a form with an input element to insert a pattern
    or a book title saved in database.

    If there are books matched to inserted pattern, these books will
    be listed in another view, where the user can access to view
    details of every book.
-->

    <section data-ng-controller="BooksController">
        <h1>Búsqueda de libros por título</h1><hr>
        <form data-ng-submit="listBooksByTitle()" novalidate>
            <div>
                <label for="patternForBookTitle">Título del libro:</label>
                <div>
                    <input type="text" data-ng-model="title"
                           id="patternForBookTitle" placeholder="Título de libro"
                           required>
                </div>
            </div><br>
            <div>
                <input type="submit" value="Buscar libros">
            </div><hr>
            <div data-ng-show="error">
                <strong data-ng-bind="error"></strong>
            </div>
            <br>
            <a data-ng-href="/#!/books">Volver al menú anterior</a>
        </form>
    </section>