add main 'about' page, move most index page JS into componentload, rationalize the...
[scpubgit/stemmaweb.git] / root / src / relate.tt
1 [% WRAPPER header.tt
2         pagetitle = "Stemmaweb - Relationship mapper"
3         applicationjs = c.uri_for("/js/relationship-" _ permission _ ".js")
4         applicationstyle = c.uri_for('/css/relationship.css')
5 %]
6 <script type="text/javascript">
7 // Load the text ID and the base path
8 var basepath = "[% c.uri_for( '/relation/' ) %]";
9 var textid = "[% textid %]";
10
11 $(document).ready(function () {
12   loadSVG('[% svg_string %]');
13 });
14 </script>
15 [% END %]
16
17         <div id="topbanner">
18                 <div id="bannerinfo">
19                         <a href="help/[% text_lang %]" title="Relationship mapper help" class="helptag">Help / About</a> | <a href="[% c.uri_for( '/' ) %]?withtradition=[% textid %]" class="navlink">Return to index</a>
20                 </div>
21                 <h1>Relationship mapper</h1>
22                 <h2>[% text_title %]</h2>
23                 <div id="segmentation">
24 [% FOREACH segment IN textsegments -%]
25 [% IF segment.start != startseg -%]
26                         <a href="[% c.uri_for( "/relation/$textid" ) %]?start=[% segment.start %]">
27                                 <span class="segment_guide">[% segment.display %]</span>
28                         </a>
29 [% ELSE -%]
30                         <span class="segment_guide selected">[% segment.display %]</span>
31 [% END -%]
32 [% END -%]
33                 </div>
34         </div>
35
36         <div id="enlargement_container" class="fillPage">       
37                 <div id="loading_overlay">
38                         <div id="loading_message"><span>Loading, please wait...</span></div>
39                 </div>
40                 <div id="dialog_overlay"></div>
41                 <div id="enlargement" style="">
42                 <div id="svgenlargement"  class="fillPage"></div>
43                 </div>
44         </div>
45         
46         <div id="update_workspace_button"></div>
47         
48         <div id="dialog-form" title="Create relation between two nodes...">
49                 <form id="collapse_node_form" action="#">
50                 <fieldset>
51                         <input type="hidden" name="source_id" id="source_node_id"/>
52                         <input type="hidden" name="source_text" id="source_node_text"/>
53                         <input type="hidden" name="target_id" id="target_node_id"/>
54                         <input type="hidden" name="target_text" id="target_node_text"/>
55                         <label for="rel_type">Relation type..&nbsp;</label>
56                         <select name="rel_type" id="rel_type" class=".ui-widget select">
57                                 <option></option>
58                         </select>
59                         <br/><br/>
60                         <label for="scope">Scope of relation..&nbsp;</label>
61                         <select name="scope" id="scope" class=".ui-widget select">
62                                 <option></option>
63                         </select>
64                         <br/><br/>
65                         <label for="note">Annotation or note..&nbsp;</label>
66                         <textarea rows="3" style="width:100%;" name="note" id="note" class=".ui-widget input"></textarea>
67                 </fieldset>
68         <div id="status"></div>         
69                 </form>
70         </div>
71         <div id="dialog_overlay"></div>
72
73         <div id="delete-form" title="Relation info...">
74                 <form id="delete_relation_form" action="#">
75                         <input type="hidden" name="source_id" id="delete_source_node_id"/>
76                         <input type="hidden" name="target_id" id="delete_target_node_id"/>
77                 </form>
78                 <div id="delete-form-text"></div>
79         </div>
80         
81         <div id="reading-form" title="Reading info...">
82                 <form id="reading_data_form" action="#">
83                         <input type="hidden" name="reading_id" id="reading_id"/>
84                         <input type="checkbox" name="reading_is_nonsense" id="reading_is_nonsense"/>
85                         <label for="reading_is_nonsense">This is a nonsense word</label>
86                         <br/>
87                         <input type="checkbox" name="reading_grammar_invalid" id="reading_grammar_invalid"/>
88                         <label for="reading_grammar_invalid">This word's grammar cannot be right</label>
89                         <br/><br/>
90                         <!-- Morphological options go here -->
91                         <div id="normalization">
92                                 <label for="reading_normal_form">Normalized form: </label>
93                                 <input type="text" name="reading_normal_form" id="reading_normal_form"></input>
94                                 <button id="#reading_relemmatize" onclick="relemmatize(); return false;">Re-lemmatize</button>
95                         </div>
96                         <div id="relemmatize_pending">
97                                 <img src="[% c.uri_for('/images/ajax-loader.gif') %]"/>
98                         </div>
99                         <br/><br/>
100                         <div id="morph_outer">
101                                 <label>Lemma / part of speech:</label><br/>
102                                 <div id="morphology"></div>
103                         </div>
104                         </select>
105                         <div id="reading_status"></div>
106                 </form>
107     </div>
108         
109     <p/><p/>    
110     <div id="keymap">
111         <ul id="keymaplist">
112           <li></li>
113         </ul>
114     </div>
115     
116 [% PROCESS footer.tt %]