Some tweaks with Reporting JSPs
[proteocache.git] / website / ReportSequenceProtein.jsp
1 <%@page import="java.util.ArrayList"%>
2 <%@ page trimDirectiveWhitespaces="true"%>
3 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
4 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
5 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
6 <%@ taglib uri="http://displaytag.sf.net" prefix="dt"%>
7 <c:choose>
8         <c:when test="${search == 'Search counter'}">
9                 <h3>Dundee ProteoCache query result for jobs more than ${counter} </h3>
10         </c:when>
11         <c:otherwise>
12                 <h3>Dundee ProteoCache query result</h3>
13         </c:otherwise>
14 </c:choose>
15 <h3>Time execution: ${timeExecution} ms</h3>
16 <c:choose>
17
18         <c:when test="${result == null}">
19                 <h3>No jobs for sequence ${prot} </h3>
20         </c:when>
21         <c:otherwise>
22         
23         
24 <table border="1" style="border-collapse: collapse; white-space: nowrap">
25         <c:choose>
26                 <c:when test="${search == 'Search counter'}">
27                         <thead>
28                                 <tr>
29                                         <th style="text-align: centre">Number of jobs</th>
30                                         <th style="text-align: left">Protein</th>
31                                 </tr>
32                         </thead>
33                         <tbody>
34                                 <c:forEach items="${result}" var="res">
35                                         <tr>
36                                                 <td>${res.totalId}</td>
37                                                 <td
38                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><a
39                                                         title="Click to view predictions"
40                                                         href="ServletSequenceProtein?prot=${res.prot}&protein=whole&Search=Search+sequence&counterJob=${counter}">${res.prot}</a>
41                                                 </td>
42                                         </tr>
43                                 </c:forEach>
44                 </c:when>
45                 <c:otherwise>
46                         <thead>
47                                 <tr>
48                                         <th style="text-align: centre">ID</th>
49                                         <th style="text-align: centre">Predictions</th>
50                                 </tr>
51                         </thead>
52                         <tbody>
53                                 <c:forEach items="${result}" var="res" varStatus="status">
54                                         <tr>
55                                                 <td rowspan="2"><a href="ServletLogInfo?IdJob=${res.id}">${res.id}</a></td>
56                                                 <c:if test="${flag == 'whole'}">
57                                                         <td
58                                                                 style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
59                                                                         value="${res.prot}" /></td>
60                                                 </c:if>
61                                                 <c:if test="${flag == 'part'}">
62                                                         <td
63                                                                 style="text-align: left; border-buttom: dotted; font-family: monospace">
64                                                                 <c:forEach items="${res.subProt}" var="seq">
65                                                                         <c:choose>
66                                                                                 <c:when test="${fn:contains(seq, prot)}">
67                                                                                         <span style="background-color: blue">${seq}</span>
68                                                                                 </c:when>
69                                                                                 <c:otherwise>${seq}</c:otherwise>
70                                                                         </c:choose>
71                                                                 </c:forEach>
72                                                         </td>
73                                                 </c:if>
74                                         </tr>
75                                         <tr>
76                                                 <td
77                                                         style="text-align: left; border-top: hidden; font-family: monospace"><c:out
78                                                                 value="${res.jpred}" /></td>
79                                         </tr>
80                                 </c:forEach>
81                 </c:otherwise>
82         </c:choose>
83         </tbody>
84 </table>
85 </c:otherwise>
86 </c:choose>