Clean up JSP code
[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="/sequence/query" var="searchquery" />
15                 <spring:url value="/joblog/query" var="jobquery" />
16
17         <div class="panel panel-default">
18         <div class="panel-heading">
19                 <c:choose>
20                         <c:when test="${flag == 'whole'}">
21                                 <p style="font-weight:bold;">Jobs for the protein sequence: ${prot}</p>
22                         </c:when>
23                         <c:otherwise>
24                                 <p style="font-weight:bold;">Jobs for the protein sequences, which include the substring:
25                                         ${prot}</p>
26                         </c:otherwise>
27                 </c:choose>
28         </div>
29
30         <div class="panel-body">
31                 <c:choose>
32                         <c:when test="${njobs == 0}">
33                                 <p>No jobs found</p>
34                         </c:when>
35                         <c:otherwise>
36                                 <p>${njobs} jobs found</p>
37                                 <div class="table-responsive">
38                                         <table class="table table-striped table-hover table-bordered">
39                                                 <thead>
40                                                         <tr>
41                                                                 <th>Job ID</th>
42                                                                 <th>annotation</th>
43                                                                 <th>Sequence</th>
44                                                         </tr>
45                                                 </thead>
46                                                 <tbody>
47                                                         <c:forEach items="${results}" var="res" varStatus="status">
48                                                                 <c:set var="ann" value="${res.predictions}" />
49                                                                 <tr>
50                                                                         <th rowspan="${ann.mapsize + 2}"><a
51                                                                                 title="Click to view the job log"
52                                                                                 href="${jobquery}?IdJob=${res.id}">${res.id}</a></th>
53                                                                 </tr>
54                                                                 <tr>
55                                                                         <td
56                                                                                 style="text-align: center; font-weight: bold; font-family: monospace">Protein
57                                                                                 Sequence</td>
58                                                                         <c:if test="${flag == 'whole'}">
59                                                                                 <td
60                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
61                                                                                                 value="${res.prot}" /></td>
62                                                                         </c:if>
63                                                                         <c:if test="${flag == 'part'}">
64                                                                                 <td
65                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace">
66                                                                                         <c:forEach items="${res.subProt}" var="seq">
67                                                                                                 <c:choose>
68                                                         <c:when test="${fn:contains(seq, prot)}">
69                                                         <span style="background-color: blue">${seq}</span></c:when>
70                                                         <c:otherwise>${seq}</c:otherwise>
71                                                                                                 </c:choose>
72                                                                                         </c:forEach>
73                                                                                 </td>
74                                                                         </c:if>
75                                                                 </tr>
76                                                                 <c:forEach items="${ann.predictions}" var="seq"
77                                                                         varStatus="status">
78                                                                         <tr>
79                                                                                 <td
80                                                                                         style="text-align: center; font-weight: bold; font-family: monospace"><c:out
81                                                                                                 value="${seq.key}" /></td>
82                                                                                 <td
83                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
84                                                                                                 value="${seq.value}" /></td>
85                                                                         </tr>
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>