Improve front-end view of the website
[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                 <c:choose>
19                         <c:when test="${flag == '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                 <!-- <h3>Time execution: ${timeExecution} ms</h3>-->
28
29                 <c:choose>
30                         <c:when test="${njobs == 0}">
31                                 <p>No jobs found</p>
32                         </c:when>
33                         <c:otherwise>
34                                 <p>${njobs} jobs found</p>
35                                 <div class="table-responsive">
36                                         <table class="table table-striped table-hover table-bordered">
37                                                 <thead>
38                                                         <tr>
39                                                                 <th>Job ID</th>
40                                                                 <th>annotation</th>
41                                                                 <th>Sequence</th>
42                                                         </tr>
43                                                 </thead>
44                                                 <tbody>
45                                                         <c:forEach items="${results}" var="res" varStatus="status">
46                                                                 <c:set var="ann" value="${res.predictions}" />
47                                                                 <tr>
48                                                                         <th rowspan="${ann.mapsize + 2}"><a
49                                                                                 title="Click to view the job log"
50                                                                                 href="${jobquery}?IdJob=${res.id}">${res.id}</a></th>
51                                                                 </tr>
52                                                                 <tr>
53                                                                         <td
54                                                                                 style="text-align: center; font-weight: bold; font-family: monospace">Protein
55                                                                                 Sequence</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></c:when>
68                                                         <c:otherwise>${seq}</c:otherwise>
69                                                                                                 </c:choose>
70                                                                                         </c:forEach>
71                                                                                 </td>
72                                                                         </c:if>
73                                                                 </tr>
74                                                                 <c:forEach items="${ann.predictions}" var="seq"
75                                                                         varStatus="status">
76                                                                         <tr>
77                                                                                 <td
78                                                                                         style="text-align: center; font-weight: bold; font-family: monospace"><c:out
79                                                                                                 value="${seq.key}" /></td>
80                                                                                 <td
81                                                                                         style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
82                                                                                                 value="${seq.value}" /></td>
83                                                                         </tr>
84                                                                 </c:forEach>
85                                                         </c:forEach>
86                                                 </tbody>
87                                         </table>
88                                 </div>
89                         </c:otherwise>
90                 </c:choose>
91
92                 <jsp:include page="fragments/footer.jsp" />
93         </div>
94 </body>
95 </html>