src/main/webapp/WEB-INF/jsp/issue-form.jsp

Sat, 30 May 2020 15:26:15 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 30 May 2020 15:26:15 +0200
changeset 81
1a2e7b5d48f7
parent 78
bb4c52bf3439
child 82
4ec7f2600c83
permissions
-rw-r--r--

adds issue summaries

     1 <%--
     2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4 Copyright 2018 Mike Becker. All rights reserved.
     6 Redistribution and use in source and binary forms, with or without
     7 modification, are permitted provided that the following conditions are met:
     9 1. Redistributions of source code must retain the above copyright
    10 notice, this list of conditions and the following disclaimer.
    12 2. Redistributions in binary form must reproduce the above copyright
    13 notice, this list of conditions and the following disclaimer in the
    14 documentation and/or other materials provided with the distribution.
    16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    26 --%>
    27 <%@page pageEncoding="UTF-8" %>
    28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    31 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" />
    32 <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/>
    33 <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/>
    34 <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/>
    35 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/>
    37 <form action="./projects/issues/commit" method="post">
    38     <table class="formtable">
    39         <colgroup>
    40             <col>
    41             <col style="width: 75ch">
    42         </colgroup>
    43         <tbody>
    44         <tr>
    45             <th><fmt:message key="thead.issue.project"/></th>
    46             <td>
    47                 <select name="pid" required>
    48                     <c:forEach var="project" items="${projects}">
    49                         <option value="${project.id}" <c:if test="${project eq issue.project}">selected</c:if> >
    50                             <c:out value="${project.name}" />
    51                         </option>
    52                     </c:forEach>
    53                 </select>
    54             </td>
    55         </tr>
    56         <tr>
    57             <th><fmt:message key="thead.issue.category"/></th>
    58             <td>
    59                 <select name="category">
    60                     <c:forEach var="category" items="${issueCategoryEnum}">
    61                         <option
    62                                 <c:if test="${category eq issue.category}">selected</c:if>
    63                                 value="${category}">
    64                             <fmt:message key="issue.category.${category}" />
    65                         </option>
    66                     </c:forEach>
    67                 </select>
    68             </td>
    69         </tr>
    70         <tr>
    71             <th><fmt:message key="thead.issue.status"/></th>
    72             <td>
    73                 <select name="status">
    74                     <c:forEach var="status" items="${issueStatusEnum}">
    75                         <option
    76                                 <c:if test="${status eq issue.status}">selected</c:if>
    77                                 value="${status}">
    78                                 <fmt:message key="issue.status.${status}" />
    79                         </option>
    80                     </c:forEach>
    81                 </select>
    82             </td>
    83         </tr>
    84         <tr>
    85             <th><fmt:message key="thead.issue.subject"/></th>
    86             <td><input name="subject" type="text" maxlength="20" required value="<c:out value="${issue.subject}"/>" /></td>
    87         </tr>
    88         <tr>
    89             <th class="vtop"><fmt:message key="thead.issue.description"/></th>
    90             <td>
    91                 <textarea name="description"><c:out value="${issue.description}"/></textarea>
    92             </td>
    93         </tr>
    94         <tr>
    95             <th><fmt:message key="thead.issue.assignee"/></th>
    96             <td>
    97                 <select name="assignee">
    98                     <option value="-1"><fmt:message key="placeholder.null-assignee"/></option>
    99                     <c:forEach var="user" items="${users}">
   100                         <option
   101                                 <c:if test="${not empty issue.assignee and user eq issue.assignee}">selected</c:if>
   102                                 value="${user.id}"><c:out value="${user.displayname}"/></option>
   103                     </c:forEach>
   104                 </select>
   105             </td>
   106         </tr>
   107         <tr>
   108             <th>
   109                 <c:choose>
   110                     <c:when test="${issue.affectedVersions.size() gt 1}">
   111                         <fmt:message key="thead.issue.affected-versions"/>
   112                     </c:when>
   113                     <c:otherwise>
   114                         <fmt:message key="thead.issue.affected-version"/>
   115                     </c:otherwise>
   116                 </c:choose>
   117             </th>
   118             <td>TODO</td>
   119         </tr>
   120         <tr>
   121             <th>
   122                 <c:choose>
   123                     <c:when test="${issue.scheduledVersions.size() gt 1}">
   124                         <fmt:message key="thead.issue.scheduled-versions"/>
   125                     </c:when>
   126                     <c:otherwise>
   127                         <fmt:message key="thead.issue.scheduled-version"/>
   128                     </c:otherwise>
   129                 </c:choose>
   130             </th>
   131             <td>TODO</td>
   132         </tr>
   133         <tr>
   134             <th>
   135                 <c:choose>
   136                     <c:when test="${issue.resolvedVersions.size() gt 1}">
   137                         <fmt:message key="thead.issue.resolved-versions"/>
   138                     </c:when>
   139                     <c:otherwise>
   140                         <fmt:message key="thead.issue.resolved-version"/>
   141                     </c:otherwise>
   142                 </c:choose>
   143             </th>
   144             <td>TODO</td>
   145         </tr>
   146         <tr>
   147             <th><fmt:message key="thead.issue.eta"/></th>
   148             <td><input name="eta" type="date" value="<fmt:formatDate value="${issue.eta}" pattern="YYYY-MM-dd" />" /> </td>
   149         </tr>
   150         <tr>
   151             <th><fmt:message key="thead.issue.created"/></th>
   152             <td><fmt:formatDate value="${issue.created}" /></td>
   153         </tr>
   154         <tr>
   155             <th><fmt:message key="thead.issue.updated"/></th>
   156             <td><fmt:formatDate value="${issue.updated}" /></td>
   157         </tr>
   158         </tbody>
   159         <tfoot>
   160         <tr>
   161             <td colspan="2">
   162                 <input type="hidden" name="id" value="${issue.id}"/>
   163                 <c:choose>
   164                     <c:when test="${not empty issue.project and issue.project.id ge 0}">
   165                         <c:set var="cancelUrl">./projects/issues/?pid=${issue.project.id}</c:set>
   166                     </c:when>
   167                     <c:otherwise>
   168                         <c:set var="cancelUrl">./projects/</c:set>
   169                     </c:otherwise>
   170                 </c:choose>
   171                 <a href="${cancelUrl}" class="button">
   172                     <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
   173                 </a>
   174                 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
   175             </td>
   176         </tr>
   177         </tfoot>
   178     </table>
   179 </form>

mercurial