2 pagetitle = "Stemmaweb - Text tradition tools"
3 applicationjs = c.uri_for( 'js/componentload.js' )
5 <script type="text/javascript">
7 var selectedStemmaID = -1;
10 function refreshDirectory () {
11 $('#directory').load( "[% c.uri_for( 'directory' ) %]",
12 function(response, status, xhr) {
13 if (status == "error") {
14 var msg = "An error occurred: ";
15 $("#directory").html(msg + xhr.status + " " + xhr.statusText);
21 function start_upload_dialog() {
22 if( typeof uploader != 'undefined' ){ uploader.destroy() };
23 $('#upload-collation-dialog').dialog('option', 'attach_uploader')();
24 $('#upload_button').button('disable');
25 $('#upload-collation-dialog').dialog('open');
28 $(document).ready( function() {
29 // call out to load the directory div
30 $('#textinfo_container').hide();
31 $('#textinfo_waitbox').hide();
33 $('#upload-collation-dialog').dialog({
41 id: "pick_uploadfile_button",
48 $('#upload_status').empty();
54 $('#upload-collation-dialog').dialog('close');
57 attach_uploader: function() {
58 create_uploader( "[% c.uri_for ( '/newtradition' ) %]" );
59 $('#filelist').empty().html( 'Use the \'Pick\' button to choose a source fileā¦' );
68 <h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
69 <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>
71 <div id="directory_container">
72 <h2>Text directory</h2>
74 <h3>Loading texts, please wait...</h3>
75 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" />
77 [% IF c.user_exists -%]
78 <div class="button" id="new_trad_button" onClick="start_upload_dialog();">
79 <span>Add a new text tradition</span>
83 <div id="textinfo_waitbox">
84 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" alt="Loading tradition info..."/>
86 <div id="textinfo_container">
87 <h2>Text <span class="texttitle"></span></h2>
89 <li>has <span id="witness_num"></span> witnesses: <span id="witness_list"></span></li>
90 <li>has <span id="reading_num"></span> distinct readings</li>
91 <li>has <span id="relationship_num"></span> distinct reading relationships</li>
94 <!-- TODO buttons on either side of the graph div to flip through the stemmata -->
95 <div id="textinfo_container_buttons">
96 <form id="stemma_pager" action="" method="GET" name="stemma_pager">
97 <div class="button" id="stemma_pager_button" onClick="$('#stemma_pager').submit()">
98 <span>Left & right go here</span>
101 <form id="run_stexaminer" action="" method="GET" name="run_stexaminer">
102 <div class="button" id="stexaminer_button" onClick="$('#run_stexaminer').submit()">
103 <span>Examine variants against this stemma</span>
106 <form id="run_relater" action="" method="GET" name="run_relater">
107 <div class="button" id="relater_button" onClick="$('#run_relater').submit()">
108 <span>Run relationship mapper</span>
112 <div id="stemma_graph"></div>
116 <!-- File upload dialog box -->
117 <div id="upload-collation-dialog" title="Upload a collation">
118 <div id="upload_container">
119 <form id="new_tradition">
120 <label for="traditionname">Name of this text / tradition: </label>
121 <input id="traditionname" type="text" name="name" size="40"/><br/>
122 <div id="filelist"></div>
124 <div id="upload_status"></div>
126 <h4>Supported file types / extensions:</h4>
128 <li>*.txt - spreadsheet collation, tab-separated values</li>
129 <li>*.csv - spreadsheet collation, comma-separated values</li>
130 <li>*.xls - spreadsheet collation, Excel 97-2004 format</li>
131 <li>*.xlsx - spreadsheet collation, Excel 2007 XML format</li>
132 <li>*.xml - TEI XML parallel segmentation format</li>
133 <li>*.xml - TEI XML export from Classical Text Editor</li>
134 <li>*.xml - GraphML export from the CollateX tool</li>
136 <p>All spreadsheet collations should be arranged with the witness sigla in the first row, and the words aligned by row each in its correct witness column.</p>
140 [% PROCESS footer.tt %]