add main 'about' page, move most index page JS into componentload, rationalize the...
[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 %]";
fb6e49b3 9 </script>
10
11[% END %]
12
7439e248 13 <div id="topbanner">
14 <h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
3f9d7ae5 15 <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>
7439e248 16 </div>
fb792f63 17 <div id="directory_container">
18 <h2>Text directory</h2>
04469f3e 19 <div id="directory"></div>
98a45925 20[% IF c.user_exists -%]
5cc32d47 21 <div class="button" id="new_trad_button" onClick="start_upload_dialog();">
98a45925 22 <span>Add a new text tradition</span>
23 </div>
24[% END %]
25 </div>
26 <div id="textinfo_waitbox">
75354c3a 27 <h3>Loading tradition information, please wait...</h3>
28 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" alt="Loading tradition info..." />
98a45925 29 </div>
30 <div id="textinfo_container">
04469f3e 31 <div id="textinfo_load_status"></div>
98a45925 32 <h2>Text <span class="texttitle"></span></h2>
ea39d630 33 <form id="open_textinfo_edit" action="" method="GET" name="edit_textinfo">
34 <div class="button" id="edit_textinfo_button"
35 onClick="$('#textinfo-edit-dialog').dialog('open')">
36 <span>Modify information about this tradition</span>
37 </div>
38 </form>
98a45925 39 <ul>
75354c3a 40 <li>is owned by <span id="owner_id"></span></li>
41 <li>is <span id="not_public"></span>public</li>
42 <li>has <span id="marked_language"></span> as its primary language</li>
98a45925 43 <li>has <span id="witness_num"></span> witnesses: <span id="witness_list"></span></li>
98a45925 44 </ul>
45
a35b3190 46 <div id="textinfo_container_buttons">
47 <form id="stemma_pager" action="" method="GET" name="stemma_pager">
ea39d630 48 <div id="stemma_pager_buttons">
65a0c9c6 49 <div class="pager_left_button" id="stemma_pager_left_button"></div>
50 <div class="pager_right_button" id="stemma_pager_right_button"></div>
a35b3190 51 </div>
52 </form>
75354c3a 53 <form id="open_stemma_add" action="" method="GET" name="add_new_stemma">
54 <div class="button" id="stemma_add_button"
55 onClick="$('#stemmaseq').val('n'); $('#stemma-edit-dialog').dialog('open');">
56 <span>Add a new stemma</span>
57 </div>
58 </form>
59 <form id="open_stemma_edit" action="" method="GET" name="edit_current_stemma">
60 <div class="button" id="stemma_edit_button"
61 onClick="$('#stemmaseq').val(selectedStemmaID); $('#stemma-edit-dialog').dialog('open');">
62 <span>Edit this stemma</span>
63 </div>
64 </form>
a35b3190 65 <form id="run_stexaminer" action="" method="GET" name="run_stexaminer">
66 <div class="button" id="stexaminer_button" onClick="$('#run_stexaminer').submit()">
67 <span>Examine variants against this stemma</span>
68 </div>
69 </form>
70 <form id="run_relater" action="" method="GET" name="run_relater">
71 <div class="button" id="relater_button" onClick="$('#run_relater').submit()">
72 <span>Run relationship mapper</span>
73 </div>
74 </form>
75 </div>
98a45925 76 <div id="stemma_graph"></div>
7439e248 77 </div>
fb6e49b3 78
04469f3e 79 <!-- Interim 'loading' message for directory box -->
80 <div id="loading_message">
81 <h3>Loading texts, please wait...</h3>
75354c3a 82 <img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" alt="Loading tradition list..."/>
83 </div>
84
85 <!-- Textinfo editor dialog -->
86 <div id="textinfo-edit-dialog" title="Edit information about this tradition">
87 <div id="textinfo_edit_container">
88 <form id="edit_textinfo">
89 <label for="edit_name">Tradition name: </label>
90 <input id="edit_name" type="text" size="30" name="name"/><br/>
91 <label for="edit_language">Language: </label>
92 <input id="edit_language" type="text" size="12" name="language"/>
93 <label for="edit_public">Publicly viewable: </label>
94 <input id="edit_public" type="checkbox" name="public"/><br/>
95[% IF c.user_exists -%]
96[% IF c.user.get_object.is_admin -%]
ce1c5863 97 <label for="edit_owner">Tradition owner: </label>
75354c3a 98 <input id="edit_owner" type="text" size="30" name="owner"/><br/>
99[% END -%]
100[% END -%]
101 </form>
102 <div id="edit_textinfo_status"></div>
103 </div>
104 </div>
105
106 <!-- Stemma dot editor dialog, simple textarea for now -->
107 <div id="stemma-edit-dialog">
108 <div id="stemma_edit_container">
109 <form id="edit_stemma">
110 <label for="dot_field">Dot definition for this stemma: </label><br/>
111 <textarea id="dot_field" rows="30" cols="40"></textarea>
112 <input id="stemmaseq" type="hidden" name="stemmaseq" val="n"/>
113 <div id="edit_instructions">
114 <p>All definitions begin with the line
115 <pre>digraph stemma {</pre>
116 and end with the line
117 <pre>}</pre>Please do not change these lines.</p>
118 <p>First list each witness in your stemma, whether extant or lost /
119 reconstructed / hypothetical, and assign them a class of either "extant"
120 or "hypothetical". For example:</p><pre>
121 α [ class=hypothetical ]
122 C [ class=extant ]
123 </pre>
124 <p>Next, list the direct links between witnesses, one per line. For example, if
125 witness C descends directly from witness α, note it as follows:</p><pre>
126 α -> C
127 </pre>
128 <p>A witness may be the exemplar for any number of other witnesses, whether
129 extant or not; likewise, a witness may inherit from any number of other
130 witnesses. Use as may "A -> B" pairings as necessary to describe the links.</p>
131 </div>
132 </form>
133 <div id="edit_stemma_status"></div>
134 </div>
04469f3e 135 </div>
40ed7ca6 136
137 <!-- File upload dialog box -->
138 <div id="upload-collation-dialog" title="Upload a collation">
5cc32d47 139 <div id="upload_container">
140 <form id="new_tradition">
75354c3a 141 <label for="new_name">Name of this text / tradition: </label>
142 <input id="new_name" type="text" name="name" size="40"/><br/>
143 <label for="new_lang">Primary language of the text: </label>
144 <input id="new_lang" type="text" name="language" size="20"/><br/>
145 <label for="new_public">Allow public display: </label>
146 <input id="new_public" name="public" type="checkbox"/><br/>
5cc32d47 147 <div id="filelist"></div>
148 <form>
149 <div id="upload_status"></div>
40ed7ca6 150 <div>
151 <h4>Supported file types / extensions:</h4>
152 <ul>
153 <li>*.txt - spreadsheet collation, tab-separated values</li>
154 <li>*.csv - spreadsheet collation, comma-separated values</li>
155 <li>*.xls - spreadsheet collation, Excel 97-2004 format</li>
156 <li>*.xlsx - spreadsheet collation, Excel 2007 XML format</li>
157 <li>*.xml - TEI XML parallel segmentation format</li>
158 <li>*.xml - TEI XML export from Classical Text Editor</li>
159 <li>*.xml - GraphML export from the CollateX tool</li>
160 </ul>
161 <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>
162 </div>
5cc32d47 163 </div>
40ed7ca6 164 </div>
fb6e49b3 165[% PROCESS footer.tt %]