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

    This is the view to search information about films by year. This view shows
    a form with a combo element to select a film year from 2000 to 2015.

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

    <section data-ng-controller="FilmsController" data-ng-init="getYears()">
        <h1>Búsqueda de películas por año</h1><hr>
        <form data-ng-submit="listFilmsByYear()" novalidate>
            <div>
                <label for="filmYear">Año de estreno:</label>
                <div>
                    <select data-ng-model="year" id="filmYear" required>
                        <option data-ng-repeat="year in years"
                                data-ng-value="year" data-ng-bind="year">
                        </option>
                    </select>
                </div>
            </div><br>
            <div>
                <input type="submit" value="Buscar películas">
            </div><hr>
            <br>
            <div data-ng-show="error">
                <strong data-ng-bind="error"></strong>
            </div>
            <br>
            <a data-ng-href="/#!/films">Volver al menú anterior</a>
        </form>
    </section>