c6be974ac372107220bacf178514717f96b35b77
[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 style="text-align: center; font-weight: bold; font-family: monospace">Protein Sequence</td>
55                                                                         <c:if test="${searchtype == 'whole'}">
56                                                                                 <td
57                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
58                                                                                                 value="${res.sequence}" /></td>
59                                                                         </c:if>
60                                                                         <c:if test="${searchtype == 'partial'}">
61                                                                                 <td
62                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace">
63                                                                                         <c:forEach items="${res.subProt}" var="seq">
64                                                                                                 <c:choose>
65                                                         <c:when test="${fn:contains(seq, prot)}">
66                                                         <span style="background-color: blue">${seq}</span></c:when>
67                                                         <c:otherwise>${seq}</c:otherwise>
68                                                                                                 </c:choose>
69                                                                                         </c:forEach>
70                                                                                 </td>
71                                                                         </c:if>
72                                                                 </tr>
73                                                                 <c:forEach items="${res.predictions}" var="seq"
74                                                                         varStatus="status">
75                                                                         <tr>
76                                                                                 <td
77                                                                                         style="text-align: center; font-weight: bold; font-family: monospace"><c:out
78                                                                                                 value="${seq.key}" /></td>
79                                                                                 <td
80                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
81                                                                                                 value="${seq.value}" /></td>
82                                                                         </tr>
83                                                                 </c:forEach>
84                                                         </c:forEach>
85                                                         </c:forEach>
86                                                 </tbody>
87                                         </table>
88                                 </div>
89                         </c:otherwise>
90                 </c:choose>
91
92         </div>
93         </div>
94
95                 <jsp:include page="fragments/footer.jsp" />
96         </div>
97 </body>
98 </html>