1 | <%inherit file="/base.mako"/> |
---|
2 | <%def name="title()">Custom Database Builds</%def> |
---|
3 | |
---|
4 | <style type="text/css"> |
---|
5 | th, td { |
---|
6 | min-width: 100px; |
---|
7 | vertical-align: text-top; |
---|
8 | } |
---|
9 | pre { |
---|
10 | padding: 0; |
---|
11 | margin: 0; |
---|
12 | } |
---|
13 | </style> |
---|
14 | |
---|
15 | <script type="text/javascript"> |
---|
16 | |
---|
17 | $(function() { |
---|
18 | $(".db_hide").each(function() { |
---|
19 | var pre = $(this); |
---|
20 | pre.hide(); |
---|
21 | pre.siblings("span").wrap( "<a href='javascript:void(0);'></a>" ).click( function() { |
---|
22 | pre.toggle(); |
---|
23 | }); |
---|
24 | }); |
---|
25 | }); |
---|
26 | |
---|
27 | </script> |
---|
28 | |
---|
29 | % if message: |
---|
30 | <div class="errormessagelarge">${message}</div> |
---|
31 | % elif lines_skipped > 0: |
---|
32 | <div class="warningmessagelarge">Skipped ${lines_skipped} lines that could not be parsed</div> |
---|
33 | % endif |
---|
34 | |
---|
35 | <h2>Custom Database/Builds</h2> |
---|
36 | |
---|
37 | <p>You may specify your own database/builds here.</p> |
---|
38 | |
---|
39 | % if dbkeys: |
---|
40 | <table class="colored" cellspacing="0" cellpadding="0"> |
---|
41 | <tr class="header"> |
---|
42 | <th>Name</th> |
---|
43 | <th>Key</th> |
---|
44 | <th>Number of Chroms</th> |
---|
45 | <th></th> |
---|
46 | </tr> |
---|
47 | % for key, dct in dbkeys.iteritems(): |
---|
48 | <tr> |
---|
49 | <td>${dct['name'] | h}</td> |
---|
50 | <td>${key | h}</td> |
---|
51 | <td> |
---|
52 | ## <span>${len(dct["chroms"])} entries</span> |
---|
53 | ## <pre id="pre_${key}" class="db_hide"> |
---|
54 | ## <table cellspacing="0" cellpadding="0"> |
---|
55 | ## <tr><th>Chrom</th><th>Length</th></tr> |
---|
56 | ## % for chrom, chrom_len in dct["chroms"].iteritems(): |
---|
57 | ## <tr><td>${chrom | h}</td><td>${chrom_len | h}</td></tr> |
---|
58 | ## % endfor |
---|
59 | ## </table> |
---|
60 | ## </pre> |
---|
61 | % if 'count' in dct: |
---|
62 | ${dct['count']} |
---|
63 | % endif |
---|
64 | </td> |
---|
65 | <td><form action="dbkeys" method="post"><input type="hidden" name="key" value="${key}" /><input type="submit" name="delete" value="Delete" /></form></td> |
---|
66 | </tr> |
---|
67 | % endfor |
---|
68 | </table> |
---|
69 | % else: |
---|
70 | <p>You currently have no custom builds.</p> |
---|
71 | % endif |
---|
72 | <br /> |
---|
73 | <form action="dbkeys" method="post" enctype="multipart/form-data"> |
---|
74 | <div class="toolForm"> |
---|
75 | <div class="toolFormTitle">Add a Build</div> |
---|
76 | <div class="toolFormBody"> |
---|
77 | <div class="form-row"> |
---|
78 | <label for="name">Name (eg: Human Chromosome):</label> |
---|
79 | <input type="text" id="name" name="name" /> |
---|
80 | </div> |
---|
81 | <div class="form-row"> |
---|
82 | <label for="key">Key (eg: hg18):</label> |
---|
83 | <input type="text" id="key" name="key" /> |
---|
84 | </div> |
---|
85 | <div class="form-row"> |
---|
86 | <label for="len_file">Chromosome Length file upload (.len file):</label> |
---|
87 | <input type="file" id="len_file" name="len_file" /><br /> |
---|
88 | <label for="len_text">Alternatively, paste length info:</label> |
---|
89 | <textarea id="len_text" name="len_text" cols="40" rows="10"></textarea> |
---|
90 | </div> |
---|
91 | |
---|
92 | <div class="form-row"><input type="submit" name="add" value="Submit"/></div> |
---|
93 | </div> |
---|
94 | </div> |
---|
95 | </form> |
---|