add options for stexaminer re-analysis
[scpubgit/stemmatology.git] / stemmaweb / root / src / stexaminer.tt
index 10c4632..de72766 100644 (file)
@@ -5,10 +5,27 @@
 %]
 <script type="text/javascript">
 var readingstats = [% reading_statistics %];
+var graphdot = '[% graphdot %]';
 </script>
 [% END -%]
     <h1>Stexaminer</h1>
     <h2>[% text_title %]</h2>
+    <div id="options">
+       <h3>Analysis options:</h3>
+       <form id="use_variants_form" name="use_variants_form" class="clearfix" method="POST">
+               <div class="optionformelement">
+                       <input type="radio" name="ignore_variant" value="none" [% 'checked="true"' IF ignore_variant == 'none' %]>Analyze all variation</input><br/>
+                       <input type="radio" name="ignore_variant" value="orthographic" [% 'checked="true"' IF ignore_variant == 'orthographic' %]>Ignore orthographic variation</input><br/>
+                       <input type="radio" name="ignore_variant" value="spelling" [% 'checked="true"' IF ignore_variant == 'spelling' %]>Ignore orthographic and spelling variation</input>
+               </div>
+               <div class="optionformelement">
+                       <input type="checkbox" name="show_type1" [% 'checked="true"' IF show_type1 %]>Include type-1 variation</input>
+               </div>
+               <div id="options_button" class="button optionformelement" onclick="$('#use_variants_form').submit()">
+                       <span>Re-analyze</span>
+               </div>
+       </form>
+    </div>
     <div id="variants_table">
       <table>
 [% FOREACH row IN variants -%]
@@ -16,18 +33,20 @@ var readingstats = [% reading_statistics %];
 [% END -%]
      </table>
     </div>
-    <div id="stemma_graph">
-      [% svg %]
-    </div>
-    <div id="row_statistics">
-      <h3>Aggregate text statistics</h3>
-      <ul>
-       <li>Total number of variant locations analyzed: [% total %]</li>
-        <li>Number of fully genealogical locations: [% genealogical %]</li>
-        <li>Number of readings that conflict with the stemma: [% conflict %]</li>
-        <li>Genealogical reading transitions by relationship type: [% todo %]</li>
-      </ul>
-      <p>(Choose a row in the table to display statistics about individual readings.)</p>
+    <div>
+               <div id="stemma_graph">
+                 [% svg %]
+               </div>
+               <div id="row_statistics">
+                 <h3>Aggregate text statistics</h3>
+                 <ul>
+                       <li>Total number of variant locations analyzed: [% total %]</li>
+                       <li>Number of fully genealogical locations: [% genealogical %]</li>
+                       <li>Number of readings that conflict with the stemma: [% conflict %]</li>
+                       <li>Genealogical reading transitions by relationship type: [% todo %]</li>
+                 </ul>
+                 <p>(Choose a row in the table to display statistics about individual readings.)</p>
+               </div>
     </div>
     
     <div id="stats_template" class="template">
@@ -35,9 +54,9 @@ var readingstats = [% reading_statistics %];
            <!-- reading_template will be appended here for each reading -->
     </div>
     
-       <div id="reading_template" class="template">  
+       <div id="reading_template" class="template">
                <div class="reading_statistics">
-                       <span class="readinglabel"></span> - copied <span class="reading_copied"></span> times, changed <span class="reading_changed"></span> times<br/>
+                       <span class="readinglabel"></span> - copied <span class="reading_copied"></span> time(s), changed <span class="reading_changed"></span> time(s)<br/>
                        Reading root(s) at <span class="readingroots"></span><br/>
                        <!-- reading_parent_template will be appended here if there are parents -->
                </div>
@@ -57,7 +76,7 @@ var readingstats = [% reading_statistics %];
 [% SET rowclass = 'class="genealogical"' IF row.genealogical -%]
 [% SET rowclass = 'class="coincidental"' UNLESS row.genealogical -%]
         <tr [% rowclass %]>
-          <th><span class="rowid" onclick="color_row($(this));show_stats($(this).parent().parent().index())">[% row.id %]</span></th>
+          <th><span class="rowid" onclick="handle_row_click($(this))">[% row.id %]</span></th>
 [% FOREACH reading IN row.readings -%]
 [% SET cellclass = 'clickable conflict' IF reading.conflict -%]
 [% SET cellclass = 'clickable' IF !reading.conflict -%]