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