add user accounting; add tradition upload method
[scpubgit/stemmaweb.git] / root / src / index.tt
CommitLineData
fb6e49b3 1[% WRAPPER header.tt
2 pagetitle = "Stemmaweb - Text tradition tools"
538715bd 3 applicationjs = c.uri_for( 'js/componentload.js' )
fb6e49b3 4%]
5 <script type="text/javascript">
f007ac1e 6var selectedTextID;
98a45925 7var selectedStemmaID = -1;
8var stemmata = [];
fb6e49b3 9$(document).ready(function() {
10 // call out to load the directory div
98a45925 11 $('#textinfo_container').hide();
12 $('#textinfo_waitbox').hide();
69799996 13 $('#directory').load( "[% c.uri_for( 'directory' ) %]",
14 function(response, status, xhr) {
15 if (status == "error") {
16 var msg = "An error occurred: ";
17 $("#directory").html(msg + xhr.status + " " + xhr.statusText);
18 }
19 });
20 });
fb6e49b3 21 </script>
22
23[% END %]
24
7439e248 25 <div id="topbanner">
26 <h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
69799996 27 <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>
7439e248 28 </div>
fb792f63 29 <div id="directory_container">
30 <h2>Text directory</h2>
31 <div id="directory">
7439e248 32 <h3>Loading texts, please wait...</h3>
33 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" />
fb792f63 34 </div>
98a45925 35[% IF c.user_exists -%]
36 <div class="button" id="new_trad_button" onClick="$('#new_trad_form').open()">
37 <span>Add a new text tradition</span>
38 </div>
39[% END %]
40 </div>
41 <div id="textinfo_waitbox">
42 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" alt="Loading tradition info..."/>
43 </div>
44 <div id="textinfo_container">
45 <h2>Text <span class="texttitle"></span></h2>
46 <ul>
47 <li>has <span id="witness_num"></span> witnesses: <span id="witness_list"></span></li>
48 <li>has <span id="reading_num"></span> distinct readings</li>
49 <li>has <span id="relationship_num"></span> distinct reading relationships</li>
50 </ul>
51
52 <!-- TODO buttons on either side of the graph div to flip through the stemmata -->
a35b3190 53 <div id="textinfo_container_buttons">
54 <form id="stemma_pager" action="" method="GET" name="stemma_pager">
55 <div class="button" id="stemma_pager_button" onClick="$('#stemma_pager').submit()">
56 <span>Left &amp; right go here</span>
57 </div>
58 </form>
59 <form id="run_stexaminer" action="" method="GET" name="run_stexaminer">
60 <div class="button" id="stexaminer_button" onClick="$('#run_stexaminer').submit()">
61 <span>Examine variants against this stemma</span>
62 </div>
63 </form>
64 <form id="run_relater" action="" method="GET" name="run_relater">
65 <div class="button" id="relater_button" onClick="$('#run_relater').submit()">
66 <span>Run relationship mapper</span>
67 </div>
68 </form>
69 </div>
98a45925 70 <div id="stemma_graph"></div>
7439e248 71 </div>
fb6e49b3 72
73[% PROCESS footer.tt %]