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