Add the "Reload" and "CSV" buttons
[proteocache.git] / webapp / view / reportProteinSequences.jsp
index c6be974..b7e7923 100644 (file)
        <div class="container">
                <jsp:include page="fragments/mainmenu.jsp" />
                <spring:url value="/job/results" var="job_query" />
+               <spring:url value="/sequence/sequence/results?sequence=${prot}&searchtype=${searchtype}" var="the_query"/>
+               <c:set var="shortensequencelength" value="108"/>
 
+               <!-- reload and CSV buttons  -->
+               <ul class="nav navbar-nav navbar-right">
+                       <li>
+                       <a href="${the_query}" class="btn btn-default active">Reload</a>
+                       </li>
+                       <c:choose><c:when test="${csvfile != '' and csvfile != null}">
+                       <li>
+                       <a id="forCSVfile" download="data.csv" href="data:application/csv;charset=utf-8,${csvfile}" class="btn btn-default active">CSV</a>
+                       </li>
+                       </c:when></c:choose>
+               </ul>
+               
        <div class="panel panel-default">
        <div class="panel-heading">
                <c:choose>
                        <c:when test="${searchtype == 'whole'}">
-                               <p style="font-weight:bold;">Jobs for the protein sequence: ${prot}</p>
+                               <p style="font-weight:bold;">
+                               Jobs for the protein sequence:
+                               <script> document.write(shorten('${prot}', '${shortensequencelength}'));</script>
+                               </p>
                        </c:when>
                        <c:otherwise>
-                               <p style="font-weight:bold;">Jobs for the protein sequences, which include the substring:
-                                       ${prot}</p>
+                               <p style="font-weight:bold;">
+                               Jobs for the protein sequences, which include the substring: 
+                               <script> document.write(shorten('${prot}', '${shortensequencelength}'));</script>
+                               </p>
                        </c:otherwise>
                </c:choose>
        </div>
@@ -34,6 +53,7 @@
                        <c:otherwise>
                                <p>${njobs} jobs found</p>
                                <div class="table-responsive">
+                                       <div class="grid-wrapper-div">
                                        <table class="table table-striped table-hover table-bordered">
                                                <thead>
                                                        <tr>
@@ -51,7 +71,7 @@
                                                                                href="${job_query}?IdJob=${id}">${id}</a></th>
                                                                </tr>
                                                                <tr>
-                                                                       <td style="text-align: center; font-weight: bold; font-family: monospace">Protein Sequence</td>
+                                                                       <td style="text-align: center; font-weight: bold; font-family: monospace">Sequence</td>
                                                                        <c:if test="${searchtype == 'whole'}">
                                                                                <td
                                                                                        style="text-align: left; border-buttom: dotted; font-family: monospace"><c:out
                                                        </c:forEach>
                                                </tbody>
                                        </table>
+                                       </div>
                                </div>
                        </c:otherwise>
                </c:choose>