1 | <html> |
---|
2 | <head> |
---|
3 | <meta name="layout" content="main" /> |
---|
4 | <title>List runs | Metagenomics | dbNP</title> |
---|
5 | <link rel="stylesheet" href="<g:resource dir="css" file="fileuploader.new.css" />" type="text/css"/> |
---|
6 | <g:javascript src="run.index.runDialog.js" /> |
---|
7 | |
---|
8 | <g:javascript src="fileuploader.new.js" /> |
---|
9 | <g:javascript src="fileuploads.new.js" /> |
---|
10 | |
---|
11 | <script type="text/javascript"> |
---|
12 | // Create a variable with assay names to check for existing names |
---|
13 | var runNames = []; |
---|
14 | <g:each in="${runs}" var="run"> |
---|
15 | runNames[ runNames.length ] = {id: ${run.id}, name: '${run.name}', alreadyAdded: false}; |
---|
16 | </g:each> |
---|
17 | </script> |
---|
18 | </head> |
---|
19 | <body> |
---|
20 | <h1>List of metagenomics runs</h1> |
---|
21 | <g:if test="${runs.size() == 0}"> |
---|
22 | <p> |
---|
23 | Currently there are no studies available in the database. Click <a href="#" onClick="showAddRunDialog(); return false;">here</a> to add a new run. |
---|
24 | </p> |
---|
25 | </g:if> |
---|
26 | <g:else> |
---|
27 | <form id="runForm"> |
---|
28 | </form> |
---|
29 | <table id="runs" class="paginate"> |
---|
30 | <thead> |
---|
31 | <tr> |
---|
32 | <th class="nonsortable"><input type="checkbox" id="checkAll" onClick="checkAllPaginated(this);" /></th> |
---|
33 | <th>Run</th> |
---|
34 | <th># samples</th> |
---|
35 | <th># sequences</th> |
---|
36 | </tr> |
---|
37 | </thead> |
---|
38 | <tbody> |
---|
39 | <g:each in="${runs}" var="run"> |
---|
40 | <tr> |
---|
41 | <td><g:checkBox name="ids" value="${run.id}" checked="${false}" onClick="updateCheckAll(this);" /></td> |
---|
42 | <td><g:link controller="run" action="show" id="${run.id}">${run.name}</g:link></td> |
---|
43 | <td>${run.assaySamples?.size()}</td> |
---|
44 | <td>${run.numSequences()}</td> |
---|
45 | </tr> |
---|
46 | </g:each> |
---|
47 | </tbody> |
---|
48 | </table> |
---|
49 | <p class="options"> |
---|
50 | <a class="add" href="#" onClick="showAddRunDialog(); return false;">Add run</a> |
---|
51 | <a class="fasta" href="#" onClick="submitPaginatedForm( $( '#runForm' ), '<g:createLink action="exportAsFasta" />', '#runs', 'Please select a run to export' ); return false;">Export as fasta</a> |
---|
52 | <a class="excel" href="#" onClick="submitPaginatedForm( $( '#runForm' ), '<g:createLink action="exportMetaData" />', '#runs', 'Please select a run to export' ); return false;">Export metadata</a> |
---|
53 | </p> |
---|
54 | </g:else> |
---|
55 | <g:render template="addRunDialog" /> |
---|
56 | </body> |
---|
57 | </html> |
---|