Fix problem with monospace font
[proteocache.git] / webapp / view / reports / Job.jsp
index db8f352..ec7c4a1 100644 (file)
 <jsp:include page="../fragments/header.jsp" />
 <body>
        <div class="container">
-               <jsp:include page="../fragments/mainmenu.jsp" />
-               <spring:url value="/sequence/sequence/results" var="sequence_query" />
+               <sec:authorize access="hasRole('ROLE_USER')">
+                       <jsp:include page="../fragments/mainmenu.jsp" />
+               </sec:authorize>
+               <sec:authorize access="isAnonymous()">
+                       <jsp:include page="../fragments/publicmenu.jsp" />
+               </sec:authorize>
+
+               <spring:url value="/sequence/results" var="sequence_query" />
                <spring:url value="/admin/ip/results" var="ip_query" />
+               <spring:url value="/job/results?IdJob=${IdJob}" var="the_query" />
+               <spring:url value="/database/remove/go?byId=on&id=${IdJob}&byId=off&date1=&date2=&byDate=off&ip=&byIp=off&seq=&bySequence=off" var="remove_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>
+<sec:authorize access="hasRole('ROLE_ADMIN')">
+                       <li>
+                       <a href="${remove_query}" class="btn btn-default active">Delete</a>
+                       </li>
+</sec:authorize>
+               </ul>
 
                <div class="panel panel-default">
                <div class="panel-heading">
                        <p style="font-weight:bold;">Information for the job ${IdJob}</p>
                </div>
                <div class="panel-body">
+                       <c:choose><c:when test="${jobnotfound == 'yes'}">
+                               <p>The job not found</p>
+                       </c:when><c:otherwise>
                        <p>Start timestamp : ${result.dateStart}</p>
                        <p>End timestamp : ${result.dateEnd}</p>
-                       <p>Run : ${result.programmeName} server</p>
-                       <p>Version : ${result.version}</p>
+                       <c:if test='${result.programName != null}'>
+                               <c:choose>
+                               <c:when test="${result.programLink != ''}">
+                                       <p style="font-weight:bold;">
+                                       Program: <a href="${result.programLink}">${result.programName}</a> (version : ${result.programVersion})
+                                       </p>
+                               </c:when>
+                               <c:otherwise>
+                                       <p style="font-weight:bold;">Program : ${result.programName} (version : ${result.programVersion})</p>
+                               </c:otherwise>
+                               </c:choose>
+                       </c:if>
 <sec:authorize access="hasRole('ROLE_ADMIN')">
                        <p>IP: <a title="Click to view other jobs" href="${ip_query}?ip=${result.ip}">${result.ip}</a></p>
 </sec:authorize>
@@ -30,6 +63,9 @@
                                <spring:url value="../${jobarchive}" var="jobarchivefile" />
                                <p>Job archive: <a title="Click to get the file" href="${jobarchivefile}">download</a></p>
                        </c:if>
+                       <c:if test='${jobremotelink != null}'>
+                               <p>Original job link: <a title="Click to go to original job" href="${jobremotelink}">view</a></p>
+                       </c:if>
                        <div class="grid-wrapper-div">
                        <table class="table table-striped table-hover table-bordered">
                        <tbody>
@@ -41,7 +77,7 @@
                                </thead>
                                <tr>
                                        <td>Protein</td>
-                                       <td >
+                                       <td style="text-align: left; border-buttom: dotted; font-family: monospace">
                                                <a title="Click to view other jobs" href="${sequence_query}?sequence=${result.sequence}&searchtype=whole">${result.sequence}</a>
                                        </td>
                                </tr>
                        </tbody>
                        </table>
                        </div>
+                       </c:otherwise></c:choose>
                </div>
                </div>
 
                <jsp:include page="../fragments/footer.jsp" />
        </div>
 </body>
-</html>
\ No newline at end of file
+</html>