summaryrefslogtreecommitdiff
path: root/interface.php
blob: c1cb2211d65a7836c4c1a5d07a6408a2d36712ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<html>
<head>
  <meta charset="utf-8" />
  <title>Post-Editing Interface (Session: #<?php echo $_GET["key"]; ?>)</title>
  <link rel="stylesheet" type="text/css" href="static/main.css" />
  <link rel="stylesheet" type="text/css" href="static/nouislider.css" />
  <script src="js/jquery.min.js"                                    type="text/javascript" charset="utf-8"></script>
  <script src="js/interface.js"                                     type="text/javascript" charset="utf-8"></script>
  <script src="js/raphael-min.js"                                   type="text/javascript" charset="utf-8"></script>
  <script src="js/derivation_editor/raphael.inline_text_editing.js" type="text/javascript" charset="utf-8"></script>
  <script src="js/derivation_editor/derivation-editor.js"           type="text/javascript" charset="utf-8"></script>
  <script src="js/jquery.scrollTo.min.js"                           type="text/javascript" charset="utf-8"></script>
  <script src="js/nouislider.js"                                    type="text/javascript" charset="utf-8"></script>
</head>

<body>

<?php include("inc/db.inc.php"); ?>

<?php include("inc/header.inc.php"); ?>

<!-- Derivation editor -->
<div id="derivation_editor">
  <div id="holder" style="width:100px; overflow-x:scroll"></div>
  <div class="small">
    <p><strong>Source:</strong> <span id="de_source">n/a</span></p>
    <p><strong>Target:</strong> <span id="de_original_mt">n/a</span></p>
  </div>
</div>
<!-- /Derivation editor-->

<!-- Source and target textboxes -->
<div id="textboxes">
  <table>
    <tr>
      <td align="right">Source:</td>
      <td id="raw_source_textarea"></td>
    </tr>
    <tr>
      <td align="right">Target:</td>
      <td>
        <textarea id="target_textarea" name="target" cols="80" rows="2" onkeypress="TEXT_handle_keypress(event);" disabled></textarea>
      </td>
    </tr>
  </table>
</div>
<div id="oov_form">
  <p><strong>Unknown words:</strong>
  Please enter a translation for each source word, then click 'Next' or simply press return.<br />
Note that the source word may be distorted.
</p>
<p><strong>Context:</strong> <span id="oov_context"></span></p>
  <div id="oov_fields"></div>
</div>
<!-- /Source and target textboxes -->

<!-- Buttons -->
<div>
  <button id="help_button" class="button" onclick="$('#help').toggle('blind')">Help</button>
  <button id="pause_button" class='button' type="button" onclick="pause()">Pause</button>
  <button id="reset_button" class='button' type="button" onclick="reset()">Reset</button>
  <button id="next" type="button" class='button' onclick="next();">Start/Continue</button>
  <span id="status"><strong>Working: <span id="status_detail">...</span></strong> <img src="static/ajax-loader-large.gif" width="20px" /></span>
</div>
<!-- /Buttons -->

<!-- Slider -->
<div id="slider_wrapper" style="padding:1.5em;display:none">
<p><em style="font-size:80%">Read the text below and rate it by how much you agree with it:</em></p>
<p style="text-align:center">The proposed target sentence ("Target:") is an adequate translation of the source sentence ("Source:").</p>
<p style="display:none"><strong>Proposed translation:</strong> <span id="original_mt_cmp"></span></p>
<table style="width:100%">
  <tr>
    <td style="text-align:right">strongly disagree</td><td style="width:50%" id="slider"></td><td style="text-align:left">strongly agree</td>
  </tr>
</table>
</div>
<!-- /Slider -->

<!-- Summary -->
<div id="view_summary" style="display:none;margin:2em"><strong>Session finished, thank you!</strong> View <a href="http://postedit.cl.uni-heidelberg.de:<?php echo $db->port; ?>/summary" target="_blank">Summary</a>.</div>
<!-- /Summary -->

<!-- Help -->
<div id="help">
  <?php include("inc/help.inc.php"); ?>
  <p class="tiny">
    Support: <a href="mailto://simianer@cl.uni-heidelberg.de">Mail</a>
  </p>
  <p class="tiny">Session: #<?php echo $_GET["key"]; ?> <!--|
    <a href="http://postedit.cl.uni-heidelberg.de:<?php echo $db->port; ?>/debug" target="_blank">Debug</a>-->
    <!--| <a href="http://postedit.cl.uni-heidelberg.de:<?php echo $db->port; ?>/summary" target="_blank">Summary</a>-->
  </p>
</div>
<!-- /Help -->


<!-- Debug -->
<div id="debug"></div>
<!-- /Debug -->

<!-- Session overview -->
<div id="overview_wrapper">
<p id="overview_header">Session overview</p>
  <table id="overview">
    <?php include("inc/session-overview.inc.php"); ?>
  </table>
</div>
<!-- /Session overview -->

<?php include("inc/footer.inc.php"); ?>

</body>
</html>

<!-- Data -->
<textarea style="display:none" id="key"               ><?php echo $_GET['key']; ?></textarea>
<textarea style="display:none" id="source"            ></textarea>
<textarea style="display:none" id="last_post_edit"    ></textarea>
<textarea style="display:none" id="current_seg_id"    ><?php echo $db->progress; ?></textarea>
<textarea style="display:none" id="paused"            >0</textarea>
<textarea style="display:none" id="oov_correct"       >0</textarea>
<textarea style="display:none" id="oov_num_items"     >0</textarea>
<textarea style="display:none" id="displayed_oov_hint">0</textarea>
<textarea style="display:none" id="port"              ><?php echo $db->port; ?></textarea>
<textarea style="display:none" id="init"              >0</textarea>
<textarea style="display:none" id="ui_type"           ><?php echo $_GET["ui_type"]; ?></textarea>
<textarea style="display:none" id="data"              ></textarea>
<textarea style="display:none" id="original_svg"      ></textarea>
<textarea style="display:none" id="original_mt"       ></textarea>
<textarea style="display:none" id="name"              ><?php echo $_GET["name"]; ?></textarea>
<textarea style="display:none" id="rating"            >-1</textarea>
<!-- /Data -->