diff --git a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css index 91742033..384f7075 100644 --- a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css +++ b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css @@ -34,8 +34,47 @@ color: black; } -.quotelike { - border-left: 5px solid #ddd; + +.status-indicator { + display: inline-block; + position: absolute; + left: -35px; + top: 10px; + font-size: small; + width: 20px; + margin: 0px; + padding: 0px; +} + +.button-reset { + display: inline-block; + position: absolute; + left: -40px; + top: 40px; + font-size: small; + background-color: transparent !important; + border: none; + width: 20px; + margin: 0px; + padding: 0px; +} + +.button-submit { + display: block; + margin-left: auto; + margin-right: auto; +} + +.target-box { + position: relative; + margin-bottom: -10px; +} + +.language_tag { + /* transform: rotate(-90deg); */ + float: right; + color: #777; + font-size: small; } .quotelike { @@ -52,6 +91,7 @@ .item-box { margin-bottom: 20px; + border-radius: 4px; } .target-text { @@ -71,6 +111,7 @@ .source-text > audio, .source-text > video { width: 100%; + max-height: 550px; } .source-text > img { @@ -126,6 +167,12 @@ color: black; } +#instructions { + background-color: #d9edf7; + padding: 10px; + border-radius: 4px; +} + .alert_message { position: fixed; top: 25px; @@ -190,4 +237,15 @@ .ui-widget-content { border: none !important; +} + + +/* override defaults */ +.alert-info { + border: none; + color: #257; +} +.navbar-fixed-top { + position: absolute; + top: -2px; } \ No newline at end of file diff --git a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js index 8f2c3844..a01cd352 100644 --- a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js +++ b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js @@ -174,8 +174,9 @@ $(document).ready(() => { // show submit button only on MQM and not ESA $(".button-submit").toggle(MQM_TYPE == "MQM") - let instructions_show = localStorage.getItem("appraise-instructions-show") == "true" + let instructions_show = localStorage.getItem("appraise-instructions-show") if (instructions_show == null) instructions_show = true; + else instructions_show = instructions_show == "true"; $("#instructions-show").on("click", () => { instructions_show = !instructions_show; @@ -194,9 +195,8 @@ function _all_sentences_scored() { return items_left == 0; } -function _change_item_status_icon(item_box, icon_name, status_text) { +function _change_item_status_icon(item_box, icon_name) { let icon_box = item_box.find('.status-indicator').removeClass('glyphicon-refresh glyphicon-ok glyphicon-flag'); - item_box.find(".status-text").text(status_text) icon_box.addClass(`glyphicon-${icon_name}`) } @@ -210,21 +210,21 @@ function submit_form_ajax(item_box) { dataType: 'json', beforeSend: function () { console.log('Sending AJAX request, item-id=', item_box.data('item-id')); - _change_item_status_icon(item_box, 'refresh', "Uploading"); + _change_item_status_icon(item_box, 'refresh'); }, success: function (data) { console.log(`Success, saved=${data.saved} next_item=${data.item_id}`); if (data.saved) { - _change_item_status_icon(item_box, 'ok', "Completed"); + _change_item_status_icon(item_box, 'ok'); } else { - _change_item_status_icon(item_box, 'none', "Upload failed"); + _change_item_status_icon(item_box, 'warning-sign'); _show_error_box(data.error_msg, 10_000); } }, error: function (x, s, t) { console.log('Error:', x, s, t); - _change_item_status_icon(item_box, 'none', "Upload failed"); + _change_item_status_icon(item_box, 'warning-sign'); _show_error_box( 'An unrecognized error has occured. ' + 'Please reload the page or try again in a moment. ', @@ -513,10 +513,10 @@ class MQMItemHandler { check_status() { if (this.el.attr("data-item-completed") == "True") { - _change_item_status_icon(this.el, "ok", "Completed") + _change_item_status_icon(this.el, "ok") this.el.find(".button-submit").hide() } else { - _change_item_status_icon(this.el, "flag", "Unfinished") + _change_item_status_icon(this.el, "flag") } } diff --git a/EvalView/templates/EvalView/_instructions-esa.html b/EvalView/templates/EvalView/_instructions-esa.html index ea8b1526..38abbe41 100644 --- a/EvalView/templates/EvalView/_instructions-esa.html +++ b/EvalView/templates/EvalView/_instructions-esa.html @@ -15,15 +15,16 @@
  • Missing content: If something is missing, highlight the word [MISSING] to mark the error.
  • Tip: Highlight the word or general area of the error (it doesn't need to be exact). Use multiple highlights for different errors.
  • -
  • Tip: Pay particular attention to translation consistency across the whole document.
  • +
  • Tip: Pay particular attention to translation consistency between texts across the whole document.
  • Score the translation: After marking errors, please use the slider and set an overall score based on meaning preservation and general quality:
  • +
  • Using external tools for annotations (chatbots, LLMs) is not allowed.
  • \ No newline at end of file diff --git a/EvalView/templates/EvalView/_slider-mqm-esa.html b/EvalView/templates/EvalView/_slider-mqm-esa.html index e2eecea8..363e8a57 100644 --- a/EvalView/templates/EvalView/_slider-mqm-esa.html +++ b/EvalView/templates/EvalView/_slider-mqm-esa.html @@ -1,9 +1,9 @@
    - +
    - - - + + +
    0%: No meaning preserved33%: Some meaning preserved66%: Most meaning preserved0%: Broken/poor33%: Flawed66%: Good 100%: Perfect
    diff --git a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html index c9df8bba..ef500e95 100644 --- a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html +++ b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html @@ -35,14 +35,13 @@
    -
    + {% if guidelines %}

    {{ guidelines }}

    {% endif %} @@ -81,11 +80,18 @@
    +
    +
    {{source_language}}
    +
    +
    {{ item.sourceText|safe }}
    - +
    +
    +
    {{target_language}}
    +
    {{item.targetText}}
    @@ -95,23 +101,12 @@
    {% include 'EvalView/_slider-mqm-esa.html' %}
    - - - - - - - -
    - - - - Item status - - -
    + + + +
    @@ -143,7 +138,7 @@ id="button-next-doc-fake" title="Please first complete all items in the document (error spans + scores)." > - Continue to next document (unavailable) + Continue to next document (finish all segments first) {% endblock %} \ No newline at end of file