9a30643880d811ec4d5b9a269d64a33dd32e36d8
[scpubgit/stemmatology.git] / stemmaweb / root / src / stexaminer.tt
1 [% PROCESS header.tt
2         pagetitle = "Stexaminer - $text_title"
3         applicationjs = c.uri_for('/js/stexaminer.js')
4         applicationstyle = c.uri_for('/css/stexaminer.css')
5 %]
6     <h1>Stexaminer</h1>
7     <h2>[% text_title %]</h2>
8     <div id="statistics">
9       <p>Analyzed [% total %] variant locations, of which [% genealogical %] entirely followed the stemma.  [% conflict %] readings conflicted with the stemma.</p>
10     </div>
11     <div id="variants_table">
12       <table>
13 [% FOREACH row IN variants -%]
14 [% INCLUDE variantrow %]
15 [% END -%]
16      </table>
17     </div>
18     <div id="stemma_graph">
19       [% svg %]
20     </div>
21 [% PROCESS footer.tt %]
22     
23
24 [% BLOCK variantrow -%]
25 [% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
26 [% SET rowclass = 'class="coincidental"' UNLESS row.genealogical -%]
27         <tr [% rowclass %]>
28           <th><span class="rowid">[% row.id %]</span></th>
29 [% FOREACH reading IN row.readings -%]
30 [% SET cellclass = 'clickable conflict' IF reading.conflict -%]
31 [% SET cellclass = 'clickable' IF !reading.conflict -%]
32           <td class="[% cellclass %]"><span onclick="color_nodes($(this).parent().index(), [% reading.group %], [% row.missing %]);$(this).parents('tr').addClass('active_variant_row');$(this).parent().addClass('active_variant_cell cellb'+($(this).parent().index()-1))">[% reading.text %]</span></td>
33 [% END -%]
34 [% FILTER repeat( row.empty ) -%]
35           <td/>
36 [% END -%]
37         </tr>
38 [% END -%]