check the date in controller, new class dateFormatter
[proteocache.git] / webapp / view / reportProteinSequences.jsp
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <%@ page trimDirectiveWhitespaces="true"%>
3 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
4 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
5 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
6 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
7 <%@page import="java.util.ArrayList"%>
8
9 <html>
10 <jsp:include page="fragments/header.jsp" />
11 <body>
12         <div class="container">
13                 <jsp:include page="fragments/mainmenu.jsp" />
14                 <spring:url value="/job/results" var="job_query" />
15
16         <div class="panel panel-default">
17         <div class="panel-heading">
18                 <c:choose>
19                         <c:when test="${searchtype == 'whole'}">
20                                 <p style="font-weight:bold;">Jobs for the protein sequence: ${prot}</p>
21                         </c:when>
22                         <c:otherwise>
23                                 <p style="font-weight:bold;">Jobs for the protein sequences, which include the substring:
24                                         ${prot}</p>
25                         </c:otherwise>
26                 </c:choose>
27         </div>
28
29         <div class="panel-body">
30                 <c:choose>
31                         <c:when test="${njobs == 0}">
32                                 <p>No jobs found</p>
33                         </c:when>
34                         <c:otherwise>
35                                 <p>${njobs} jobs found</p>
36                                 <div class="table-responsive">
37                                         <table class="table table-striped table-hover table-bordered">
38                                                 <thead>
39                                                         <tr>
40                                                                 <th>Job ID</th>
41                                                                 <th>annotation</th>
42                                                                 <th>Sequence</th>
43                                                         </tr>
44                                                 </thead>
45                                                 <tbody>
46                                                         <c:forEach items="${results}" var="res" varStatus="status">
47                                                                 <c:forEach items="${res.jobid}" var="id" varStatus="status">
48                                                                 <tr>
49                                                                         <th rowspan="${res.size + 2}"><a
50                                                                                 title="Click to view the job log"
51                                                                                 href="${job_query}?IdJob=${id}">${id}</a></th>
52                                                                 </tr>
53                                                                 <tr>
54                                                                         <td
55                                                                                 style="text-align: center; font-weight: bold; font-family: monospace">Protein
56                                                                                 Sequence</td>
57                                                                         <c:if test="${searchtype == 'whole'}">
58                                                                                 <td
59                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
60                                                                                                 value="${res.sequence}" /></td>
61                                                                         </c:if>
62                                                                         <c:if test="${searchtype == 'partial'}">
63                                                                                 <td
64                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace">
65                                                                                         <c:forEach items="${res.subProt}" var="seq">
66                                                                                                 <c:choose>
67                                                         <c:when test="${fn:contains(seq, prot)}">
68                                                         <span style="background-color: blue">${seq}</span></c:when>
69                                                         <c:otherwise>${seq}</c:otherwise>
70                                                                                                 </c:choose>
71                                                                                         </c:forEach>
72                                                                                 </td>
73                                                                         </c:if>
74                                                                 </tr>
75                                                                 <c:forEach items="${res.predictions}" var="seq"
76                                                                         varStatus="status">
77                                                                         <tr>
78                                                                                 <td
79                                                                                         style="text-align: center; font-weight: bold; font-family: monospace"><c:out
80                                                                                                 value="${seq.key}" /></td>
81                                                                                 <td
82                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
83                                                                                                 value="${seq.value}" /></td>
84                                                                         </tr>
85                                                                 </c:forEach>
86                                                         </c:forEach>
87                                                         </c:forEach>
88                                                 </tbody>
89                                         </table>
90                                 </div>
91                         </c:otherwise>
92                 </c:choose>
93
94         </div>
95         </div>
96
97                 <jsp:include page="fragments/footer.jsp" />
98         </div>
99 </body>
100 </html>