Sat, 06 Jan 2024 20:32:29 +0100
merge upstream commit
universe@47 | 1 | <%-- |
universe@47 | 2 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
universe@47 | 3 | |
universe@180 | 4 | Copyright 2021 Mike Becker. All rights reserved. |
universe@47 | 5 | |
universe@47 | 6 | Redistribution and use in source and binary forms, with or without |
universe@47 | 7 | modification, are permitted provided that the following conditions are met: |
universe@47 | 8 | |
universe@47 | 9 | 1. Redistributions of source code must retain the above copyright |
universe@47 | 10 | notice, this list of conditions and the following disclaimer. |
universe@47 | 11 | |
universe@47 | 12 | 2. Redistributions in binary form must reproduce the above copyright |
universe@47 | 13 | notice, this list of conditions and the following disclaimer in the |
universe@47 | 14 | documentation and/or other materials provided with the distribution. |
universe@47 | 15 | |
universe@47 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
universe@47 | 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
universe@47 | 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
universe@47 | 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
universe@47 | 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
universe@47 | 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
universe@47 | 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
universe@47 | 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
universe@47 | 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
universe@47 | 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
universe@47 | 26 | --%> |
universe@47 | 27 | <%@page pageEncoding="UTF-8" %> |
universe@47 | 28 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
universe@47 | 29 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
universe@47 | 30 | |
universe@97 | 31 | <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectEditView" scope="request" /> |
universe@97 | 32 | <c:set var="project" scope="page" value="${viewmodel.project}"/> |
universe@47 | 33 | |
universe@184 | 34 | <form action="./projects/-/commit" method="post"> |
universe@69 | 35 | <table class="formtable"> |
universe@47 | 36 | <colgroup> |
universe@47 | 37 | <col> |
universe@69 | 38 | <col style="width: 75ch"> |
universe@47 | 39 | </colgroup> |
universe@47 | 40 | <tbody> |
universe@47 | 41 | <tr> |
universe@181 | 42 | <th><fmt:message key="project.name"/></th> |
universe@187 | 43 | <td><input name="name" type="text" maxlength="50" required value="<c:out value="${project.name}"/>" /></td> |
universe@47 | 44 | </tr> |
universe@138 | 45 | <tr title="<fmt:message key="node.tooltip"/>"> |
universe@138 | 46 | <th><fmt:message key="node"/></th> |
universe@187 | 47 | <td><input name="node" type="text" maxlength="50" value="<c:out value="${project.node}"/>" /></td> |
universe@138 | 48 | </tr> |
universe@47 | 49 | <tr> |
universe@82 | 50 | <th><fmt:message key="description"/></th> |
universe@75 | 51 | <td><input type="text" name="description" maxlength="200" value="<c:out value="${project.description}"/>" /></td> |
universe@47 | 52 | </tr> |
universe@47 | 53 | <tr> |
universe@181 | 54 | <th><fmt:message key="project.repoUrl"/></th> |
universe@75 | 55 | <td><input name="repoUrl" type="url" maxlength="50" value="<c:out value="${project.repoUrl}"/>" /></td> |
universe@47 | 56 | </tr> |
universe@47 | 57 | <tr> |
universe@284 | 58 | <th><fmt:message key="project.vcs"/></th> |
universe@284 | 59 | <td> |
universe@284 | 60 | <select name="vcs"> |
universe@284 | 61 | <option value="None"><fmt:message key="project.vcs.none"/></option> |
universe@284 | 62 | <c:forTokens var="vcs" items="Mercurial,Git" delims=","> |
universe@284 | 63 | <option <c:if test="${project.vcs eq vcs}">selected</c:if> value="${vcs}">${vcs}</option> |
universe@284 | 64 | </c:forTokens> |
universe@284 | 65 | </select> |
universe@284 | 66 | </td> |
universe@284 | 67 | </tr> |
universe@284 | 68 | <tr> |
universe@181 | 69 | <th><fmt:message key="project.owner"/></th> |
universe@47 | 70 | <td> |
universe@47 | 71 | <select name="owner"> |
universe@72 | 72 | <option value="-1"><fmt:message key="placeholder.null-owner"/></option> |
universe@97 | 73 | <c:forEach var="user" items="${viewmodel.users}"> |
universe@72 | 74 | <option |
universe@75 | 75 | <c:if test="${not empty project.owner and user eq project.owner}">selected</c:if> |
universe@72 | 76 | value="${user.id}"><c:out value="${user.displayname}"/></option> |
universe@51 | 77 | </c:forEach> |
universe@47 | 78 | </select> |
universe@47 | 79 | </td> |
universe@47 | 80 | </tr> |
universe@181 | 81 | <tr title="<fmt:message key="ordinal.tooltip" />"> |
universe@175 | 82 | <th><fmt:message key="ordinal"/></th> |
universe@175 | 83 | <td> |
universe@177 | 84 | <input name="ordinal" type="number" value="${project.ordinal}"/> |
universe@175 | 85 | </td> |
universe@175 | 86 | </tr> |
universe@47 | 87 | </tbody> |
universe@47 | 88 | <tfoot> |
universe@47 | 89 | <tr> |
universe@47 | 90 | <td colspan="2"> |
universe@184 | 91 | <input type="hidden" name="id" value="${project.id}"/> |
universe@78 | 92 | <a href="./projects/" class="button"> |
universe@180 | 93 | <fmt:message key="button.cancel"/> |
universe@78 | 94 | </a> |
universe@180 | 95 | <button type="submit"><fmt:message key="button.okay"/></button> |
universe@47 | 96 | </td> |
universe@47 | 97 | </tr> |
universe@47 | 98 | </tfoot> |
universe@47 | 99 | </table> |
universe@47 | 100 | </form> |