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

    This is the view to search information about tv series by rating.
    This view shows a form with a combo element to select a tv serie
    rating between 0 to 10.

    If there are tv series matched to inserted rating, these tv series
    will be listed in another view, where the user can access to view
    details of every tv serie.
-->

    <section data-ng-controller="TVSeriesController" data-ng-init="getRatings()">
        <h1>Búsqueda de series por valoración</h1><hr>
        <form data-ng-submit="listTVSeriesByRating()" novalidate>
            <div>
                <label for="tvSerieRating">Valoración de la serie:</label>
                <div>
                    <select data-ng-model="rating" id="tvSerieRating" required>
                        <option data-ng-repeat="rating in ratings"
                                data-ng-value="rating" data-ng-bind="rating">
                        </option>
                    </select>
                </div>
            </div><br>
            <div>
                <input type="submit" value="Buscar series">
            </div><hr>
            <br>
            <div data-ng-show="error">
                <strong data-ng-bind="error"></strong>
            </div>
            <br>
            <a data-ng-href="/#!/tvSeries">Volver al menú anterior</a>
        </form>
    </section>