Support email-attribute fetching from OpenID
[scpubgit/stemmaweb.git] / root / src / index.tt
index a8a908a..945f1e8 100644 (file)
@@ -3,6 +3,7 @@
        applicationjs = c.uri_for( 'js/componentload.js' )
 %]
     <script type="text/javascript">
+var selectedTextID;
 $(document).ready(function() {
     // call out to load the directory div
     $('#directory').load( "[% c.uri_for( 'directory' ) %]" );
@@ -13,14 +14,32 @@ $(document).ready(function() {
 
     <div id="topbanner">
       <h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
-      <span class="mainnav"><a href="[% c.uri_for( 'about.html' ) %]">About<a> | <a href="[% c.uri_for( 'doc.html' ) %]">Help</a></span>
+      <span class="mainnav">[% IF c.user_exists %]Hello! [% c.user.get_object.display %] [% ELSE %]<a href="[% c.uri_for('/login') %]">Login</a> | <a href="[% c.uri_for('/register') %]">Register</a> | [% END %]<a href="[% c.uri_for( 'about.html' ) %]">About<a> | <a href="[% c.uri_for( 'doc.html' ) %]">Help</a></span>
     </div>
-    
-    <div id="directory">
+    <div id="directory_container">
+      <h2>Text directory</h2>
+      <div id="directory">
        <h3>Loading texts, please wait...</h3>
        <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" />
+      </div>
+    </div>
+    <div id="stemma_container">
+      <h2>Stemma for <span class="texttitle">selected text</span></h2>
+      <div id="stemma_graph"></div>
+      <form id="run_stexaminer" action="" method="GET" name="run_stexaminer">
+        <div class="button" id="stexaminer_button" onClick="$('#run_stexaminer').submit()">
+         <span>Examine variants against this stemma</span>
+        </div>
+      </form>
+    </div>
+    <div id="variant_container">
+      <div style="float: left"><h2>Variant graph for <span class="texttitle">selected text</span></h2></div>
+      <form id="run_relater" action="" method="GET" name="run_relater">
+        <div class="button" id="relater_button" onClick="$('#run_relater').submit()">
+          <span>Run relationship mapper</span>
+        </div>
+      </form>
+      <div id="variant_graph"></div>
     </div>
-    <div id="stemma_graph"></div>
-    <div id="variant_graph"></div>
 
 [% PROCESS footer.tt %]
\ No newline at end of file