2 pagetitle = "Stexaminer - $text_title"
3 applicationjs = c.uri_for('/js/stexaminer.js')
4 applicationstyle = c.uri_for('/css/stexaminer.css')
6 <script type="text/javascript">
7 var readingstats = [% reading_statistics %];
8 function show_stats( row_index ) {
9 var rs = readingstats[row_index];
10 var rshtml = $('#stats_template').clone();
11 rshtml.find('#statrank').append( rs.id );
12 $('#row_statistics').empty();
13 $('#row_statistics').append( rshtml.contents() );
18 <h2>[% text_title %]</h2>
19 <div id="variants_table">
21 [% FOREACH row IN variants -%]
22 [% INCLUDE variantrow %]
26 <div id="stemma_graph">
29 <div id="row_statistics">
30 <h3>Aggregate text statistics</h3>
32 <li>Total number of variant locations analyzed: [% total %]</li>
33 <li>Number of fully genealogical locations: [% genealogical %]</li>
34 <li>Number of readings that conflict with the stemma: [% conflict %]</li>
36 <p>(Choose a row in the table to display statistics about individual readings.)</p>
38 <div id="stats_template">
39 <h3>Statistics for readings at <span id="statrank"></span></h3>
42 [% PROCESS footer.tt %]
45 [% BLOCK variantrow -%]
46 [% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
47 [% SET rowclass = 'class="coincidental"' UNLESS row.genealogical -%]
49 <th><span class="rowid" onclick="color_row($(this));show_stats($(this).parent().parent().index())">[% row.id %]</span></th>
50 [% FOREACH reading IN row.readings -%]
51 [% SET cellclass = 'clickable conflict' IF reading.conflict -%]
52 [% SET cellclass = 'clickable' IF !reading.conflict -%]
53 <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>
55 [% FILTER repeat( row.empty ) -%]