Add the "Reload" and "CSV" buttons
[proteocache.git] / webapp / view / reportSSFeatures.jsp
index 7aae5d0..6363d24 100644 (file)
        <div class="container">
                <jsp:include page="fragments/mainmenu.jsp" />
                <spring:url value="/sequence/sequence/results" var="sequence_query" />
+               <spring:url value="/features/results" var="the_query"/>
+               <spring:url value="/features/results?TypeFeatures=${feature}&Percent=${percent}" var="the_query" />
+
+       <!-- 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 != ''}">
+               <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">
-               <div style="font-weight:bold;">Protein Secondary Structure Feature Statistics</div>
+               <p style="font-weight:bold;">Protein Secondary Structure Feature Statistics</p>
        </div>
-       <div class="panel-body">
 
+       <div class="panel-body">
                <c:choose>
                <c:when test="${njobs == 0}">
                        <p>No proteins with feature ${feature} more then ${percent}% of the protein sequence found</p>
                                        <tr>
                                                <td rowspan = 2>${count}
                                                <td style="text-align: left; border-buttom: dotted; font-family: monospace">
-                                               <a title="Click to view all jobs" href="${sequence_query}?sequence=${res.key}&searchtype=whole">${res.key}</a></td>
+                                               <a title="Click to view all jobs" href="${sequence_query}?sequence=${res.key}&searchtype=whole">
+                                               <script>
+                                                       document.write(shorten('${res.key}', 108));
+                                               </script>
+                                               </a></td>
                                        </tr>
                                        <tr>
-                                               <td style="text-align: left; border-buttom: dotted; font-family: monospace">${res.value}</td>
+                                               <td style="text-align: left; border-buttom: dotted; font-family: monospace">
+                                               <script>
+                                                       document.write(shorten('${res.value}', 108));
+                                               </script>
+                                               </td>
                                        </tr>
                                </c:forEach>
                        </tbody>