move jsp for reports to a separate dir
[proteocache.git] / webapp / view / reports / SequencesStatistics.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
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
9 <html>
10 <jsp:include page="../fragments/header.jsp" />
11
12 <body>
13         <div class="container">
14                 <jsp:include page="../fragments/mainmenu.jsp" />
15                 <spring:url value="/sequence/sequence/results" var="sequence_query" />
16                 <spring:url value="/sequence/counts/results?counterJob=${counter}" var="the_query" />
17                 <c:set var="shortensequencelength" value="108"/>
18
19                 <!-- reload and CSV buttons  -->
20                 <ul class="nav navbar-nav navbar-right">
21                         <li>
22                         <a href="${the_query}" class="btn btn-default active">Reload</a>
23                         </li>
24                         <c:choose><c:when test="${njobs > 0}">
25                         <li>
26                         <a id="forCSVfile" download="data.csv" href="data:application/csv;charset=utf-8,${csvfile}" class="btn btn-default active">CSV</a>
27                         </li>
28                         </c:when></c:choose>
29                 </ul>
30
31         <div class="panel panel-default">
32         <div class="panel-heading">
33                 <p style="font-weight:bold;">Jobs Statistics</p>
34         </div>
35
36         <div class="panel-body">
37                 <c:choose>
38                 <c:when test="${njobs == 0}">
39                         <p>No proteins with at least ${counter} jobs found</p>
40                 </c:when>
41                 <c:otherwise>
42                         <p>${njobs} proteins with at least ${counter} jobs found</p>
43                         <div class="table-responsive">
44                         <table class="table table-striped table-hover table-bordered" id="counts">
45                         <thead>
46                                 <tr>
47                                         <th style="text-align: centre">Number of jobs</th>
48                                         <th style="text-align: left">Protein</th>
49                                 </tr>
50                         </thead>
51                         <tbody>
52                                 <c:forEach items="${results}" var="res">
53                                         <tr>
54                                                 <td>${res.totaljobs}</td>
55                                                 <td style="text-overflow:ellipsis text-align: left; font-family: monospace" id="proteinline">
56                                                         <a title="Click to view all jobs" href="${sequence_query}?sequence=${res.name}&searchtype=whole">
57                                                         <script>
58                                                                 document.write(shorten('${res.name}', '${shortensequencelength}'));
59                                                         </script>
60                                                         <!-- ${res.name}-->
61                                                         </a>
62                                                 </td>
63                                         </tr>
64                                 </c:forEach>
65                         </tbody>
66                         </table>
67                         </div>
68                 </c:otherwise>
69                 </c:choose>
70         </div>
71         </div>
72
73         <jsp:include page="../fragments/footer.jsp" />
74         </div>
75 </body>
76 </html>