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