main.jsp 3.16 KB
Newer Older
Cesar Giulano Gonzalez Maqueda committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
    <head>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
        <c:set var="valores" scope="session" value="${{1, 2, 3, 4, 5, 6}}"/>
    </head>
    <body>
        <div class="container">
            <div class="row mt-3"><h2>Films</h2></div>
            <div class="row mt-3">
                <div class="col-md-6">
                    <h4>Films</h4>
                    <ul>
                        <c:forEach items="${films}" var="numero">
                            <li>${numero.title} <a href="/films?id=${numero.id}">Actualizar</a></li>
                            <hr/>
                        </c:forEach>
                    </ul>
                </div>
                <div class="col-md-6">
                    <form:form method="POST" action="addFilm" modelAttribute="film">
                        <form:input type="hidden" name="id" path="id"/>
                        <div class="form-group">
                            <form:label path="title">Titulo</form:label>
                            <form:input class="form-control" type="text" path="title"/>
                        </div>

                        <div class="form-group">
                            <form:label path="description">Descripcion</form:label>
                            <form:input class="form-control" type="text" path="description"/>
                        </div>

                        <div class="form-group">
                            <form:label path="releaseYear">Anho de Lanzamiento</form:label>
                            <form:input class="form-control" type="number" path="releaseYear"/>
                        </div>


                        <div class="form-group">
                            <form:label path="duration">Duracion</form:label>
                            <form:input class="form-control" type="number" path="duration"/>
                        </div>


                        <div class="form-group">
                            <form:label path="language">Lenguaje</form:label>
                            <form:select path="language">
                                <option value="1">English</option>
                                <option value="2">Italian</option>
                                <option value="3">Japanese</option>
                                <option value="4">Mandarin</option>
                                <option value="5">French</option>
                                <option value="6">German</option>
                            </form:select>
                        </div>

                        <input class="btn btn-dark" type="submit" name="action" value="create">
                        <input class="btn btn-dark" type="submit" name="action" value="update">
                    </form:form>
                </div>
            </div>
        </div>
    </body>
</html>