Replaced HIIT/EADH logos
[scpubgit/stemmaweb.git] / root / src / index.tt
index 84382b1..1a6b1ff 100644 (file)
@@ -1,6 +1,7 @@
 [% WRAPPER header.tt
        pagetitle = "Stemmaweb - Text tradition tools"
        applicationjs = c.uri_for( 'js/componentload.js' )
+       applicationstyle = c.uri_for( 'css/dashboard.css' )
 %]
     <script type="text/javascript">
 // Set global variables that must be passed by the server
@@ -11,7 +12,7 @@ var textOnLoad = "[% withtradition %]";
 [% END %]
    <div id="main_page" class="clearfix">
    <div class="mainnav">
-       <span>[% IF c.user_exists %]Hello! [% c.user.get_object.email %]! &nbsp; <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> | [% END %]<a class="navlink" href="[% c.uri_for( '/about' ) %]">About Stemmaweb</a> </span>
+       <span>[% IF c.user_exists %]Hello! [% c.user.get_object.email %]! &nbsp; <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')">Sign in/Register</a> | [% END %]<a class="navlink" href="[% c.uri_for( '/about' ) %]">About Stemmaweb</a> </span>
    </div>
     <div id="topbanner">
       <h1 class="title">Stemmaweb - a collection of tools for analysis of collated texts</h1>
@@ -90,11 +91,12 @@ var textOnLoad = "[% withtradition %]";
               <span id='relatebutton_label'>View collation and relationships</span>
             </div>
           </form>
-          <a id="dl_tradition" href="" download="file.xml">
-            <div class="button" id="download_button">
-              <span id='dlbutton_label'>Download tradition as XML</span>
+          <form id="dl_tradition" action="" method="GET" name="run_downloader">
+            <div class="button" id="download_button"
+               onClick="$('#download-dialog').dialog('open');">
+              <span id='dlbutton_label'>Download tradition</span>
             </div>
-          </a>
+          </form>
       </div>
       <div id="stemma_load_status"></div>
       <div id="stemma_graph"></div>
@@ -164,17 +166,54 @@ var textOnLoad = "[% withtradition %]";
        <!-- Stemweb UI dialog box -->
     <div id="stemweb-ui-dialog" title="Generate a Stemweb tree">
       <div id="stemweb_ui_container">
-       <form id="call_stemweb">
+               <div id="sponsor_container">
+                       <img id="hiit_logo" src="[% c.uri_for( '/images/hiit_logo.jpg' ) %]"></img>
+                       <img id="eadh_logo" src="[% c.uri_for( '/images/eadh-150.png' ) %]"></img>
+                       <p>Stemweb is a webservice provided by the Helsinki Institute for Information Technology HIIT. The integration into Stemmaweb was generously supported by a small project grant from the European Association for Digital Humanities.
+                       </p>
+               </div>
+               <hr/>
+               <form id="call_stemweb">
                <input id="stemweb_tradition" type="hidden" name="tradition"/>
+               <h5>Choose an algorithm</h5>
                <label for="algorithm">Run algorithm: </label>
-               <select id="stemweb_algorithm" name="algorithm"></select><br/>
+               <select id="stemweb_algorithm" name="algorithm"></select>
+               <span id="stemweb_algorithm_help">What is this?</span><br/>
+                       <div id="stemweb_algorithm_desc_text"></div>
+                       <br/>
+                       <h5>Set the options</h5>
                <!-- Algorithm-specific options, if any, will be added within this div -->
                <div id="stemweb_runtime_options"></div>
+               <br/>
+               <!-- Options applicable to all algorithms belong within this div -->
+               <div id="stemweb_local_options">
+                       <label for="merge_reltypes">Disregard variation of type:</label>
+                       <select multiple name="merge_reltypes" id="stemweb_merge_reltypes"></select>
+               </div>
        </form>
        <div id="stemweb_run_status"></div>
       </div>
     </div>
     
+    <!-- Data download dialog box -->
+    <div id="download-dialog" title="Download tradition data">
+      <div id="download_container">
+       <form id="download_form">
+               <input id="download_tradition" type="hidden" name="tradition"/><br/>
+               <label for="download_format">Choose a format for download: </label>
+               <select id="download_format" name="format">
+                       <option value="GraphML">Native XML format</option>
+                       <option value="CSV">Comma-separated values (collation only)</option>
+                       <option value="TSV">Tab-separated values (collation only)</option>
+                       <option value="SVG">SVG graph display (collation and relationships)</option>                            
+                       <!-- option value="tei_ps" -->
+                       <!-- option value="tei_dea" -->
+               </select>
+       </form>
+       <div id="download_status"></div>
+      </div>
+    </div>    
+    
     <!-- File upload dialog box -->
     <div id="upload-collation-dialog" title="Upload a collation">
       <div id="upload_container">