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

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

        -> searchType: is the search type. Possible values:
            *> "filmsByTitle"
            *> "filmsByYear"
            *> "filmsByGenre"
            *> "filmsByProtagonist"
            *> "filmsByDirector"
            *> "filmsByRating"

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

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

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

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