Merge branch 'master' of github.com:tla/stemmatology
[scpubgit/stemmatology.git] / stemmaweb / root / src / index.tt
index 910b1d1..4131aeb 100644 (file)
@@ -1,8 +1,9 @@
 [% WRAPPER header.tt
        pagetitle = "Stemmaweb - Text tradition tools"
-       applicationjs = "js/componentload.js"
+       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' ) %]" );
@@ -11,9 +12,32 @@ $(document).ready(function() {
 
 [% END %]
 
-    <div id="topbanner"><h1>Stemmaweb - a collection of tools for analysis of collated texts</h1></div>
-    <div id="directory"></div>
-    <div id="stemma_graph"></div>
-    <div id="variant_graph"></div>
+    <div id="topbanner">
+      <h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
+      <span class="mainnav">[% IF c.user_exists %]Hello! [% c.user.get_object.email %] <a class="navlink" href="[% c.uri_for( '/logout' ) %]">Sign out</a> | [% ELSE %]<a class="navlink" onclick="window.open('[% c.uri_for( '/login' ) %]', 'loginwindow', 'height=385,width=445')">Login</a> | <a class="navlink" onclick="window.open('[% c.uri_for( '/register' ) %]', 'regwindow', 'height=385,width=445')">Register</a> | [% END %]<a class="navlink" href="[% c.uri_for( 'about.html' ) %]">About<a> </span>
+    </div>
+    <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>
+      <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>
+    <div id="variant_container">
+    </div>
 
 [% PROCESS footer.tt %]
\ No newline at end of file