update path to some dynamic pages
[proteocache.git] / webapp / view / reports / Sequences.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 <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
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                 <spring:url value="/sequence/results?sequence=${prot}&searchtype=${searchtype}" var="the_query"/>
16                 <c:set var="shortensequencelength" value="108"/>
17
18                 <!-- reload and CSV buttons  -->
19                 <ul class="nav navbar-nav navbar-right">
20                         <li>
21                         <a href="${the_query}" class="btn btn-default active">Reload</a>
22                         </li>
23                         <c:choose><c:when test="${csvfile != '' and csvfile != null}">
24                         <li>
25                         <a id="forCSVfile" download="data.csv" href="data:application/csv;charset=utf-8,${csvfile}" class="btn btn-default active">CSV</a>
26                         </li>
27                         </c:when></c:choose>
28                 </ul>
29                 
30         <div class="panel panel-default">
31         <div class="panel-heading">
32                 <c:choose>
33                         <c:when test="${searchtype == 'whole'}">
34                                 <p style="font-weight:bold;">
35                                 Jobs for the protein sequence:
36                                 <script> document.write(shorten('${prot}', '${shortensequencelength}'));</script>
37                                 </p>
38                         </c:when>
39                         <c:otherwise>
40                                 <p style="font-weight:bold;">
41                                 Jobs for the protein sequences, which include the substring: 
42                                 <script> document.write(shorten('${prot}', '${shortensequencelength}'));</script>
43                                 </p>
44                         </c:otherwise>
45                 </c:choose>
46         </div>
47
48         <div class="panel-body">
49 <sec:authorize access="hasRole('ROLE_ADMIN')">
50                         <p>Servlet execution time: ${timeExecution} milliseconds</p>
51 </sec:authorize>
52                 <c:choose>
53                         <c:when test="${njobs == 0}">
54                                 <p>No jobs found</p>
55                         </c:when>
56                         <c:otherwise>
57                                 <p>${njobs} jobs found</p>
58                                 <div class="table-responsive">
59                                         <div class="grid-wrapper-div">
60                                         <table class="table table-striped table-hover table-bordered">
61                                                 <thead>
62                                                         <tr>
63                                                                 <th>Job ID</th>
64                                                                 <th>annotation</th>
65                                                                 <th>Sequence</th>
66                                                         </tr>
67                                                 </thead>
68                                                 <tbody>
69                                                         <c:forEach items="${results}" var="res" varStatus="status">
70                                                                 <c:forEach items="${res.jobid}" var="id" varStatus="status">
71                                                                 <tr>
72                                                                         <th rowspan="3"><a
73                                                                                 title="Click to view the job log"
74                                                                                 href="${job_query}?IdJob=${id}">${id}</a></th>
75                                                                 </tr>
76                                                                 <tr>
77                                                                         <td style="text-align: center; font-weight: bold; font-family: monospace">Sequence</td>
78                                                                         <c:if test="${searchtype == 'whole'}">
79                                                                                 <td style="text-align: left; font-family: monospace">
80                                                                                                 ${res.sequence}</td>
81                                                                         </c:if>
82                                                                         <c:if test="${searchtype == 'partial'}">
83                                                                                 <td style="text-align: left; border-buttom: dotted; font-family: monospace">
84                                                                                         <c:forEach items="${res.subProt}" var="seq">
85                                                                                                 <c:choose>
86                                                                                                 <c:when test="${fn:contains(seq, prot)}">
87                                                                                                 <span style="background-color: blue">${seq}</span></c:when>
88                                                                                                 <c:otherwise>${seq}</c:otherwise>
89                                                                                                 </c:choose>
90                                                                                         </c:forEach>
91                                                                                 </td>
92                                                                         </c:if>
93                                                                 </tr>
94                                                                 <tr>
95                                                                         <td style="text-align: center; font-weight: bold; font-family: monospace">
96                                                                                 Jnetpred
97                                                                         </td>
98                                                                         <td style="text-align: left; border-buttom: dotted; font-family: monospace">
99                                                                                 ${res.jnetpred}
100                                                                         </td>
101                                                                 </tr>
102                                                         </c:forEach>
103                                                         </c:forEach>
104                                                 </tbody>
105                                         </table>
106                                         </div>
107                                 </div>
108                         </c:otherwise>
109                 </c:choose>
110
111         </div>
112         </div>
113
114                 <jsp:include page="../fragments/footer.jsp" />
115         </div>
116 </body>
117 </html>