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

    This is the view to show a list of tv series as a result of a
    search using two route parameters:

        -> searchType: is the search type. Possible values:
            *> "tvSeriesByTitle"
            *> "tvSeriesByYear"
            *> "tvSeriesByGenre"
            *> "tvSeriesByProtagonist"
            *> "tvSeriesByDirector"
            *> "tvSeriesByRating"

        -> patternToSearch: is the pattern user to do the search.

    Every tv series in this list can be shown in details. Only a click
    on tv series name is necessary to show tv series details.

    If there aren't tv series matched to inserted pattern, the view
    will show a message.
-->

    <section data-ng-controller="TVSeriesController" data-ng-init="find()">
        <h1>Listado de series</h1><hr>
        <ul>
            <li data-ng-repeat="tvSerie in tvSeries">
                <a data-ng-href="#!/tvSeries/{{tvSerie._id}}"
                   data-ng-bind="tvSerie.title"></a>
                <br>
            </li>
        </ul>
        <label data-ng-hide="!tvSeries || tvSeries.length">
            No existen series que coincidan con el patrón introducido
        </label>
        <hr><br>
        <a data-ng-href="#!/tvSeries/{{searchType}}">Volver al menú anterior</a>
    </section>