Merge branch 'master' of github.com:tla/stemmatology
[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>
e217c221 13 <div id="options">
14 <h3>Analysis options:</h3>
15 <form id="use_variants_form" name="use_variants_form" class="clearfix" method="POST">
16 <div class="optionformelement">
17 <input type="radio" name="ignore_variant" value="none" [% 'checked="true"' IF ignore_variant == 'none' %]>Analyze all variation</input><br/>
18 <input type="radio" name="ignore_variant" value="orthographic" [% 'checked="true"' IF ignore_variant == 'orthographic' %]>Ignore orthographic variation</input><br/>
19 <input type="radio" name="ignore_variant" value="spelling" [% 'checked="true"' IF ignore_variant == 'spelling' %]>Ignore orthographic and spelling variation</input>
20 </div>
21 <div class="optionformelement">
22 <input type="checkbox" name="show_type1" [% 'checked="true"' IF show_type1 %]>Include type-1 variation</input>
23 </div>
24 <div id="options_button" class="button optionformelement" onclick="$('#use_variants_form').submit()">
25 <span>Re-analyze</span>
26 </div>
27 </form>
28 </div>
cf9626aa 29 <div id="variants_table">
30 <table>
31[% FOREACH row IN variants -%]
32[% INCLUDE variantrow %]
33[% END -%]
34 </table>
35 </div>
f8d13166 36 <div>
37 <div id="stemma_graph">
38 [% svg %]
39 </div>
40 <div id="row_statistics">
41 <h3>Aggregate text statistics</h3>
42 <ul>
43 <li>Total number of variant locations analyzed: [% total %]</li>
44 <li>Number of fully genealogical locations: [% genealogical %]</li>
45 <li>Number of readings that conflict with the stemma: [% conflict %]</li>
46 <li>Genealogical reading transitions by relationship type: [% todo %]</li>
47 </ul>
48 <p>(Choose a row in the table to display statistics about individual readings.)</p>
49 </div>
23306161 50 </div>
3751a3c2 51
52 <div id="stats_template" class="template">
53 <h3>Statistics for readings at <span id="statrank"></span>:</h3>
54 <!-- reading_template will be appended here for each reading -->
55 </div>
56
f8d13166 57 <div id="reading_template" class="template">
3751a3c2 58 <div class="reading_statistics">
f8d13166 59 <span class="readinglabel"></span> - copied <span class="reading_copied"></span> time(s), changed <span class="reading_changed"></span> time(s)<br/>
3751a3c2 60 Reading root(s) at <span class="readingroots"></span><br/>
61 <!-- reading_parent_template will be appended here if there are parents -->
62 </div>
23306161 63 </div>
3751a3c2 64
65 <div id="reading_parent_template" class="template">
66 <div class="parent_statistics">
67 Reading parent(s):
68 <ul class="reading_parent_list"></ul>
69 </div>
70 </div>
23306161 71
cf9626aa 72[% PROCESS footer.tt %]
73
6b70c348 74
75[% BLOCK variantrow -%]
76[% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
77[% SET rowclass = 'class="coincidental"' UNLESS row.genealogical -%]
78 <tr [% rowclass %]>
f8d13166 79 <th><span class="rowid" onclick="handle_row_click($(this))">[% row.id %]</span></th>
6b70c348 80[% FOREACH reading IN row.readings -%]
81[% SET cellclass = 'clickable conflict' IF reading.conflict -%]
82[% SET cellclass = 'clickable' IF !reading.conflict -%]
a44aaf2a 83 <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 84[% END -%]
85[% FILTER repeat( row.empty ) -%]
86 <td/>
87[% END -%]
88 </tr>
89[% END -%]