mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-29 17:27:17 +00:00
fix: [ocr] UI correlation, fix language bloc
This commit is contained in:
parent
4cb47e8af3
commit
56fae107bf
1 changed files with 39 additions and 38 deletions
|
@ -75,48 +75,49 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% if not is_correlation %}
|
||||||
|
<div class="my-1">
|
||||||
|
|
||||||
<div class="my-1">
|
{% set mess_id_escape= meta['id'] | replace("/", "_") %}
|
||||||
|
<span class="btn btn-outline-dark p-0 px-1" type="button" data-toggle="collapse" data-target="#collapseTrans{{ mess_id_escape }}" aria-expanded="false" aria-controls="collapseTrans{{ mess_id_escape }}">
|
||||||
{% set mess_id_escape= meta['id'] | replace("/", "_") %}
|
<i class="fas fa-language"></i> {% if meta['language'] %}{{ meta['language'] }}{% endif %}
|
||||||
<span class="btn btn-outline-dark p-0 px-1" type="button" data-toggle="collapse" data-target="#collapseTrans{{ mess_id_escape }}" aria-expanded="false" aria-controls="collapseTrans{{ mess_id_escape }}">
|
</span>
|
||||||
<i class="fas fa-language"></i> {% if meta['language'] %}{{ meta['language'] }}{% endif %}
|
<div class="collapse" id="collapseTrans{{ mess_id_escape }}">
|
||||||
</span>
|
<div class="card card-body">
|
||||||
<div class="collapse" id="collapseTrans{{ mess_id_escape }}">
|
<form method="post" action="{{ url_for('languages_ui.translate_object') }}">
|
||||||
<div class="card card-body">
|
<input type="text" id="type" name="type" value="{{meta['type']}}" hidden>
|
||||||
<form method="post" action="{{ url_for('languages_ui.translate_object') }}">
|
<input type="text" id="id" name="id" value="{{meta['id']}}" hidden>
|
||||||
<input type="text" id="type" name="type" value="{{meta['type']}}" hidden>
|
<span class="badge badge-primary">Source:</span>
|
||||||
<input type="text" id="id" name="id" value="{{meta['id']}}" hidden>
|
<span class="">
|
||||||
<span class="badge badge-primary">Source:</span>
|
<select id="language_target" name="language_target" class="form-select" aria-label="Message Language" onchange="$('#translation').val('');">
|
||||||
<span class="">
|
<option selected value="{{ meta['language'] }}">{{ meta['language'] }}</option>
|
||||||
<select id="language_target" name="language_target" class="form-select" aria-label="Message Language" onchange="$('#translation').val('');">
|
{% for language in translation_languages %}
|
||||||
<option selected value="{{ meta['language'] }}">{{ meta['language'] }}</option>
|
<option value="{{ language }}">{{ translation_languages[language] }}</option>
|
||||||
{% for language in translation_languages %}
|
{% endfor %}
|
||||||
<option value="{{ language }}">{{ translation_languages[language] }}</option>
|
</select>
|
||||||
{% endfor %}
|
</span>
|
||||||
</select>
|
{% if translation_target %}
|
||||||
</span>
|
<input type="text" id="target" name="target" value="{{translation_target}}" hidden>
|
||||||
{% if translation_target %}
|
<span class="badge badge-primary">Target:</span><span>{{translation_target}}</span>
|
||||||
<input type="text" id="target" name="target" value="{{translation_target}}" hidden>
|
<textarea class="form-control" id="translation" name="translation">{{ meta['translation'] }}</textarea>
|
||||||
<span class="badge badge-primary">Target:</span><span>{{translation_target}}</span>
|
<button class="btn btn-dark" type="submit">
|
||||||
<textarea class="form-control" id="translation" name="translation">{{ meta['translation'] }}</textarea>
|
<i class="fas fa-pen-alt"> Update Language or Translation</i>
|
||||||
<button class="btn btn-dark" type="submit">
|
</button>
|
||||||
<i class="fas fa-pen-alt"> Update Language or Translation</i>
|
{% else %}
|
||||||
</button>
|
<button class="btn btn-dark" type="submit">
|
||||||
{% else %}
|
<i class="fas fa-pen-alt"> Update Language</i>
|
||||||
<button class="btn btn-dark" type="submit">
|
</button>
|
||||||
<i class="fas fa-pen-alt"> Update Language</i>
|
{% endif %}
|
||||||
</button>
|
</form>
|
||||||
{% endif %}
|
<div>
|
||||||
</form>
|
<a class="btn btn-primary" href="{{ url_for('languages_ui.detect_object_language')}}?type={{ meta['type'] }}&id={{ meta['id'] }}">
|
||||||
<div>
|
<i class="fas fa-redo"></i> Detect Language
|
||||||
<a class="btn btn-primary" href="{{ url_for('languages_ui.detect_object_language')}}?type={{ meta['type'] }}&id={{ meta['id'] }}">
|
</a>
|
||||||
<i class="fas fa-redo"></i> Detect Language
|
</div>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue