open ID realm is hostname only, not uri_for(/)
[scpubgit/stemmaweb.git] / root / src / stexaminer.tt
1 [% WRAPPER 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 <script type="text/javascript">
7 var baseurl = "[% c.uri_for( '/stexaminer/' ) %]";
8 var textid = '[% text_id %]';
9 var original_svg = '[% svg %]';
10 [% IF error -%]
11 var readingstats = [];
12 [% ELSE -%]
13 var readingstats = [% reading_statistics %];
14 [% END -%]
15 var graphdot = '[% graphdot %]';
16 </script>
17 [% END -%]
18   <div id="main_page" class="clearfix">
19     <div id="topbanner">
20         <span class="mainnav">
21             <a href="help" title="Stexaminer help" class="navlink" id="aboutlink">Help / About</a> | <a href="[% c.uri_for( '/' ) %]?withtradition=[% text_id %]" title="Index" class="navlink">Return to index</a>
22         </span>
23         <h1>Stexaminer</h1>
24         <h2>[% text_title %]</h2>
25     </div>
26     <div id="status">
27 [% IF error -%]
28         <span class="error">[% error %]</span>
29 [% END -%]
30     </div>
31     <div id="variants_table">
32       <table>
33 [% FOREACH row IN variants -%]
34 [% INCLUDE variantrow %]
35 [% END -%]
36      </table>
37     </div>
38     <div>
39         <div id="stemma_graph">
40         </div>
41         <div id="row_statistics">
42           <h3 id="stats_title">Aggregate text statistics</h3>
43           <div id="options_button_container">
44             <div id="options_button" class="button" onClick="$('#options').dialog('open')">
45                   <span>Analysis options</span>
46             </div>
47           </div>
48           <div id="stats_container">
49                           <ul id="aggregates">
50                                 <li>Total number of variant locations analyzed: [% total %]</li>
51                                 <li>Number of fully genealogical locations: [% genealogical %]</li>
52                                 <li>Number of readings that conflict with the stemma: [% conflict %]</li>
53                                 <li>Genealogical reading transitions by relationship type: [% todo %]</li>
54                           </ul>
55                           <p>(Choose a row in the table to display statistics about individual readings.)</p>
56                   </div>
57         </div>
58     </div>
59     
60     <div id="stats_template" class="template">
61         <!-- reading_template will be appended here for each reading -->
62         <span class="solutionstatus"></span>
63     </div>
64     
65     <div id="reading_template" class="template">
66         <div class="reading_statistics">
67             <span class="readinglabel"></span> - copied <span class="reading_copied"></span> time(s), changed <span class="reading_changed"></span> time(s)<br/>
68             Reading root(s) at <span class="readingroots"></span><br/>
69             <span class="readingreversions">Reading reversion(s) at <span class="reversionroots"></span><br/></span>
70             <!-- source_parent_template will be appended here if there are parents -->
71             <!-- reversion_parent_template will be appended here if there are reversions -->
72         </div>
73     </div>
74     
75     <div id="reading_source_template" class="template">
76         <div class="parent_statistics">
77             Reading parent(s):
78             <ul class="reading_source_list"></ul>
79         </div>
80     </div>
81     <div id="reading_reversion_template" class="template">
82         <div class="parent_statistics">
83             Reverted reading parent(s):
84             <ul class="reading_reversion_list"></ul>
85         </div>
86     </div>
87   </div> <!-- main_page -->
88     
89     <div id="options" title="Analysis options...">
90         <form id="use_variants_form" name="use_variants_form">
91             <fieldset>
92                 <input type="radio" name="ignore_variant" value="none" [% 'checked="true"' IF !ignore_variant %]>Analyze all variation</input><br/>
93                 <input type="radio" name="ignore_variant" value="orthographic" [% 'checked="true"' IF ignore_variant == 'orthographic' %]>Ignore orthographic variation</input><br/>
94                 <input type="radio" name="ignore_variant" value="spelling" [% 'checked="true"' IF ignore_variant == 'spelling' %]>Ignore orthographic and spelling variation</input>
95             </fieldset>
96             <fieldset>
97                 <input type="checkbox" name="show_type1" [% 'checked="true"' IF show_type1 %]>Include type-1 variation</input>
98             </fieldset>
99          </form>
100     </div>
101
102
103 [% PROCESS footer.tt %]
104     
105
106 [% BLOCK variantrow -%]
107 [% SET rowclass = 'coincidental' -%]
108 [% SET rowclass = 'genealogical' IF row.genealogical -%]
109 [% SET rowclass = "$rowclass unsolved" IF row.unsolved -%]
110         <tr class="[% rowclass %]">
111           <th><span class="rowid" onclick="handle_row_click($(this))">[% row.id %]</span></th>
112 [% FOREACH reading IN row.readings -%]
113 [% SET cellclass = 'clickable' -%]
114 [% SET cellclass = 'clickable reversion' IF reading.is_reverted -%]
115 [% SET cellclass = 'clickable conflict' IF reading.is_conflict -%]
116           <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>
117 [% END -%]
118         </tr>
119 [% END -%]