home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 July / CMCD0703.ISO / Software / Freeware / Programare / bugzero / jsp / _trail.jspf < prev    next >
Text File  |  2003-06-09  |  3KB  |  55 lines

  1. <table cellspacing=1 cellpadding=2 width=100% border=1>
  2. <% Trail[] trailArray = issue.getTrailArray();
  3.    String versionLabel;
  4.    String descriptionLabel;
  5.    String ccMail;
  6.    String[] filenames;
  7.    for (int index=trailArray.length-1; index>=0; index--) { 
  8.      versionLabel = label.get("issue_version", projectId) + (index+1);
  9.    if (trailArray[index].get("state").equalsIgnoreCase("new")) {
  10.      descriptionLabel =  label.get("issue_description", projectId);
  11.    } else {
  12.      descriptionLabel =  label.get("issue_response", projectId);
  13.    }
  14.    Access access = conf.getAccess();
  15.    DateTime dateTime = (DateTime)session.getAttribute("datetime");
  16. %>
  17. <tr><td>
  18. <table cellspacing=1 cellpadding=2 border=0 width=100%>
  19.   <tr><td bgcolor="#e0e0e0" valign=top width=80>
  20.       <%=versionLabel%></td> 
  21.       <td bgcolor="#efefef"><%=label.get("author", projectId)%>: <%=access.getDisplay(trailArray[index].get("author"))%>,
  22.       <%=label.get("date")%>: <%=dateTime.localTime(trailArray[index].getDate())%><br>
  23.       <%=label.get("issue_type", projectId)%>: <%=trailArray[index].get("issue_type")%>,
  24.       <%=label.get("severity", projectId)%>: <%=trailArray[index].get("severity")%>,
  25.       <%=label.get("priority", projectId)%>: <%=trailArray[index].get("priority")%>,
  26.       <%=label.get("state", projectId)%>: <%=trailArray[index].get("state")%>,
  27.       <% String resp=trailArray[index].get("responsible");
  28.       if (resp == null) resp = "nobody"; %>
  29.       <%=label.get("responsible", projectId)%>: <%=access.getDisplay(resp)%>
  30.       <% ccMail = trailArray[index].get("cc_mail");
  31.       if (ccMail != null) { %>
  32.       <br><%=label.get("cc_mail", projectId)%> <%=HtmlParser.escapeTag(ccMail)%>
  33.       <%}%>
  34.   </td></tr>
  35.   <tr><td bgcolor="#e0e0e0" valign=top><%=descriptionLabel%></td>
  36.      <td bgcolor="#efefef"><%=HtmlParser.toHtml(trailArray[index].get("issue_description"))%></td></tr>
  37.      <% filenames = trailArray[index].getFilenames();
  38.         if (filenames != null && filenames.length > 0) { %>
  39.   <tr><td bgcolor="#e0e0e0"><%=label.get("attachment", projectId)%></td>
  40.       <td bgcolor="#efefef">
  41.      <% for (int i=0; i<filenames.length; i++) {
  42.         String filename = filenames[i];
  43.         String filenameEncoded = java.net.URLEncoder.encode(filename); 
  44.      %>  
  45.   <a target="_file" href="<%=contextPath%>/servlet/download/<%=filenameEncoded%>?trail_id=<%=trailArray[index].getId()%>&filename=<%=filenameEncoded%>"><%=filename%></a>  
  46.      <%}%>
  47.      </td></tr>
  48.      <%}%>
  49. </table>
  50.  
  51. </td></tr>
  52. <% } %>
  53.  
  54. </table>
  55.