stexaminer now working to my satisfaction
[scpubgit/stemmatology.git] / stemmaweb / root / src / stexaminer.tt
CommitLineData
23306161 1[% WRAPPER header.tt
cf9626aa 2 pagetitle = "Stexaminer - $text_title"
57acbbe2 3 applicationjs = c.uri_for('/js/stexaminer.js')
4 applicationstyle = c.uri_for('/css/stexaminer.css')
cf9626aa 5%]
23306161 6<script type="text/javascript">
7var readingstats = [% reading_statistics %];
f8d13166 8var graphdot = '[% graphdot %]';
23306161 9</script>
10[% END -%]
cf9626aa 11 <h1>Stexaminer</h1>
12 <h2>[% text_title %]</h2>
cf9626aa 13 <div id="variants_table">
14 <table>
15[% FOREACH row IN variants -%]
16[% INCLUDE variantrow %]
17[% END -%]
18 </table>
19 </div>
f8d13166 20 <div>
21 <div id="stemma_graph">
22 [% svg %]
23 </div>
24 <div id="row_statistics">
25 <h3>Aggregate text statistics</h3>
26 <ul>
27 <li>Total number of variant locations analyzed: [% total %]</li>
28 <li>Number of fully genealogical locations: [% genealogical %]</li>
29 <li>Number of readings that conflict with the stemma: [% conflict %]</li>
30 <li>Genealogical reading transitions by relationship type: [% todo %]</li>
31 </ul>
32 <p>(Choose a row in the table to display statistics about individual readings.)</p>
33 </div>
23306161 34 </div>
3751a3c2 35
36 <div id="stats_template" class="template">
37 <h3>Statistics for readings at <span id="statrank"></span>:</h3>
38 <!-- reading_template will be appended here for each reading -->
39 </div>
40
f8d13166 41 <div id="reading_template" class="template">
3751a3c2 42 <div class="reading_statistics">
f8d13166 43 <span class="readinglabel"></span> - copied <span class="reading_copied"></span> time(s), changed <span class="reading_changed"></span> time(s)<br/>
3751a3c2 44 Reading root(s) at <span class="readingroots"></span><br/>
45 <!-- reading_parent_template will be appended here if there are parents -->
46 </div>
23306161 47 </div>
3751a3c2 48
49 <div id="reading_parent_template" class="template">
50 <div class="parent_statistics">
51 Reading parent(s):
52 <ul class="reading_parent_list"></ul>
53 </div>
54 </div>
23306161 55
cf9626aa 56[% PROCESS footer.tt %]
57
6b70c348 58
59[% BLOCK variantrow -%]
60[% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
61[% SET rowclass = 'class="coincidental"' UNLESS row.genealogical -%]
62 <tr [% rowclass %]>
f8d13166 63 <th><span class="rowid" onclick="handle_row_click($(this))">[% row.id %]</span></th>
6b70c348 64[% FOREACH reading IN row.readings -%]
65[% SET cellclass = 'clickable conflict' IF reading.conflict -%]
66[% SET cellclass = 'clickable' IF !reading.conflict -%]
a44aaf2a 67 <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>
6b70c348 68[% END -%]
69[% FILTER repeat( row.empty ) -%]
70 <td/>
71[% END -%]
72 </tr>
73[% END -%]