UNTESTED allow for query of outstanding Stemweb processes and return of results. #29
[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">
3f9d7ae5 6// Set global variables that must be passed by the server
7var basepath = "[% c.uri_for( '/' ) %]";
c655153c 8var textOnLoad = "[% withtradition %]";
db234220 9var stemwebAlgorithms = [% stemweb_algorithms %];
fb6e49b3 10 </script>
11
12[% END %]
13
7439e248 14 <div id="topbanner">
15 <h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
3f9d7ae5 16 <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> | [% END %]<a class="navlink" href="[% c.uri_for( '/about' ) %]">About</a> </span>
50778a5d 17 <p id="compatibility_check"><span class="error">This browser does not support
18 the functions necessary for Stemmaweb to work properly. We recommend use of
19 <a href="http://mozilla.org/firefox">Mozilla Firefox</a> or
20 <a href="http://www.google.com/chrome">Google Chrome</a>.</span></p>
7439e248 21 </div>
fb792f63 22 <div id="directory_container">
23 <h2>Text directory</h2>
04469f3e 24 <div id="directory"></div>
98a45925 25[% IF c.user_exists -%]
e0b90236 26 <div class="button" id="new_trad_button" onClick="$('#upload-collation-dialog').dialog('open')">
98a45925 27 <span>Add a new text tradition</span>
28 </div>
29[% END %]
30 </div>
31 <div id="textinfo_waitbox">
75354c3a 32 <h3>Loading tradition information, please wait...</h3>
33 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" alt="Loading tradition info..." />
98a45925 34 </div>
35 <div id="textinfo_container">
04469f3e 36 <div id="textinfo_load_status"></div>
98a45925 37 <h2>Text <span class="texttitle"></span></h2>
ea39d630 38 <form id="open_textinfo_edit" action="" method="GET" name="edit_textinfo">
39 <div class="button" id="edit_textinfo_button"
40 onClick="$('#textinfo-edit-dialog').dialog('open')">
41 <span>Modify information about this tradition</span>
42 </div>
43 </form>
98a45925 44 <ul>
75354c3a 45 <li>is owned by <span id="owner_id"></span></li>
46 <li>is <span id="not_public"></span>public</li>
47 <li>has <span id="marked_language"></span> as its primary language</li>
98a45925 48 <li>has <span id="witness_num"></span> witnesses: <span id="witness_list"></span></li>
98a45925 49 </ul>
50
a35b3190 51 <div id="textinfo_container_buttons">
52 <form id="stemma_pager" action="" method="GET" name="stemma_pager">
ea39d630 53 <div id="stemma_pager_buttons">
65a0c9c6 54 <div class="pager_left_button" id="stemma_pager_left_button"></div>
55 <div class="pager_right_button" id="stemma_pager_right_button"></div>
a35b3190 56 </div>
57 </form>
75354c3a 58 <form id="open_stemma_add" action="" method="GET" name="add_new_stemma">
59 <div class="button" id="stemma_add_button"
60 onClick="$('#stemmaseq').val('n'); $('#stemma-edit-dialog').dialog('open');">
61 <span>Add a new stemma</span>
62 </div>
63 </form>
64 <form id="open_stemma_edit" action="" method="GET" name="edit_current_stemma">
65 <div class="button" id="stemma_edit_button"
66 onClick="$('#stemmaseq').val(selectedStemmaID); $('#stemma-edit-dialog').dialog('open');">
67 <span>Edit this stemma</span>
68 </div>
69 </form>
db234220 70 <form id="open_stemweb_ui" action="" method="GET" name="run_stemweb">
71 <div class="button" id="run_stemweb_button"
72 onClick="$('#stemweb-ui-dialog').dialog('open');">
73 <span>Run a Stemweb algorithm</span>
74 </div>
75 </form>
c2b80bba 76 <form id="query_stemweb_ui" action="" method="GET" name="query_stemweb">
77 <div class="button" id="query_stemweb_button"
78 onClick="query_stemweb_progress();">
79 <span>Check progress of Stemweb algorithm</span>
80 </div>
81 </form>
a35b3190 82 <form id="run_stexaminer" action="" method="GET" name="run_stexaminer">
83 <div class="button" id="stexaminer_button" onClick="$('#run_stexaminer').submit()">
84 <span>Examine variants against this stemma</span>
85 </div>
86 </form>
87 <form id="run_relater" action="" method="GET" name="run_relater">
88 <div class="button" id="relater_button" onClick="$('#run_relater').submit()">
cbd23059 89 <span id='relatebutton_label'>View collation and relationships</span>
a35b3190 90 </div>
91 </form>
38627d20 92 <a id="dl_tradition" href="" download="file.xml">
93 <div class="button" id="download_button">
94 <span id='dlbutton_label'>Download tradition as XML</span>
95 </div>
96 </a>
a35b3190 97 </div>
98a45925 98 <div id="stemma_graph"></div>
ec2f89ff 99 <div id="stemma_graph_title"><span id="stemma_identifier"></span></div>
7439e248 100 </div>
fb6e49b3 101
04469f3e 102 <!-- Interim 'loading' message for directory box -->
103 <div id="loading_message">
104 <h3>Loading texts, please wait...</h3>
75354c3a 105 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" alt="Loading tradition list..."/>
106 </div>
107
108 <!-- Textinfo editor dialog -->
109 <div id="textinfo-edit-dialog" title="Edit information about this tradition">
110 <div id="textinfo_edit_container">
111 <form id="edit_textinfo">
112 <label for="edit_name">Tradition name: </label>
113 <input id="edit_name" type="text" size="30" name="name"/><br/>
114 <label for="edit_language">Language: </label>
115 <input id="edit_language" type="text" size="12" name="language"/>
116 <label for="edit_public">Publicly viewable: </label>
117 <input id="edit_public" type="checkbox" name="public"/><br/>
118[% IF c.user_exists -%]
119[% IF c.user.get_object.is_admin -%]
ce1c5863 120 <label for="edit_owner">Tradition owner: </label>
75354c3a 121 <input id="edit_owner" type="text" size="30" name="owner"/><br/>
122[% END -%]
123[% END -%]
124 </form>
125 <div id="edit_textinfo_status"></div>
126 </div>
127 </div>
128
129 <!-- Stemma dot editor dialog, simple textarea for now -->
130 <div id="stemma-edit-dialog">
131 <div id="stemma_edit_container">
132 <form id="edit_stemma">
133 <label for="dot_field">Dot definition for this stemma: </label><br/>
134 <textarea id="dot_field" rows="30" cols="40"></textarea>
135 <input id="stemmaseq" type="hidden" name="stemmaseq" val="n"/>
136 <div id="edit_instructions">
137 <p>All definitions begin with the line
db234220 138 <pre>digraph "Stemma Name" {</pre>
75354c3a 139 and end with the line
db234220 140 <pre>}</pre>
141 Please do not change these lines except to edit the stemma name.</p>
75354c3a 142 <p>First list each witness in your stemma, whether extant or lost /
143 reconstructed / hypothetical, and assign them a class of either "extant"
144 or "hypothetical". For example:</p><pre>
145 α [ class=hypothetical ]
146 C [ class=extant ]
147 </pre>
148 <p>Next, list the direct links between witnesses, one per line. For example, if
149 witness C descends directly from witness α, note it as follows:</p><pre>
150 α -> C
151 </pre>
152 <p>A witness may be the exemplar for any number of other witnesses, whether
153 extant or not; likewise, a witness may inherit from any number of other
154 witnesses. Use as may "A -> B" pairings as necessary to describe the links.</p>
155 </div>
156 </form>
157 <div id="edit_stemma_status"></div>
158 </div>
04469f3e 159 </div>
40ed7ca6 160
db234220 161 <!-- Stemweb UI dialog box -->
70744367 162 <div id="stemweb-ui-dialog" title="Generate a Stemweb tree">
db234220 163 <div id="stemweb_ui_container">
164 <form id="call_stemweb">
70744367 165 <input id="stemweb_tradition" type="hidden" name="tradition"/>
166 <label for="algorithm">Run algorithm: </label>
167 <select id="stemweb_algorithm" name="algorithm"></select><br/>
db234220 168 <!-- Algorithm-specific options, if any, will be added within this div -->
169 <div id="stemweb_runtime_options"></div>
170 </form>
171 <div id="stemweb_run_status"></div>
172 </div>
173 </div>
174
40ed7ca6 175 <!-- File upload dialog box -->
176 <div id="upload-collation-dialog" title="Upload a collation">
5cc32d47 177 <div id="upload_container">
ab0d1218 178 <input id="new_file" name="file" type="file" onchange="file_selected(this)">
179 <label for="new_file" id="new_file_label">Collation file: </label>
180 <div id="new_file_name_container" onclick="$('#new_file').click();">&nbsp;(Use 'pick file' to select a tradition file to upload.)</div>
5cc32d47 181 <form id="new_tradition">
75354c3a 182 <label for="new_name">Name of this text / tradition: </label>
183 <input id="new_name" type="text" name="name" size="40"/><br/>
184 <label for="new_lang">Primary language of the text: </label>
185 <input id="new_lang" type="text" name="language" size="20"/><br/>
186 <label for="new_public">Allow public display: </label>
187 <input id="new_public" name="public" type="checkbox"/><br/>
8214a482 188 </form>
5cc32d47 189 <div id="upload_status"></div>
40ed7ca6 190 <div>
191 <h4>Supported file types / extensions:</h4>
192 <ul>
193 <li>*.txt - spreadsheet collation, tab-separated values</li>
194 <li>*.csv - spreadsheet collation, comma-separated values</li>
195 <li>*.xls - spreadsheet collation, Excel 97-2004 format</li>
196 <li>*.xlsx - spreadsheet collation, Excel 2007 XML format</li>
197 <li>*.xml - TEI XML parallel segmentation format</li>
198 <li>*.xml - TEI XML export from Classical Text Editor</li>
199 <li>*.xml - GraphML export from the CollateX tool</li>
200 </ul>
201 <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>
202 </div>
5cc32d47 203 </div>
40ed7ca6 204 </div>
fb6e49b3 205[% PROCESS footer.tt %]