Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development

This commit is contained in:
Stephan Porada 2020-04-16 13:49:24 +02:00
commit fe26c56344
4 changed files with 28 additions and 28 deletions

View File

@ -36,7 +36,8 @@ class RessourceList extends List {
item = this.get("id", pathArray[0])[0];
switch(pathArray[1]) {
case "status":
item.values({status: operation.value});
item.values({status: operation.value,
"analyse-link": ["analysing", "prepared", "start analysis"].includes(operation.value) ? `/corpora/${pathArray[0]}/analyse` : ""});
break;
default:
break;

View File

@ -35,7 +35,7 @@
</div>
<div class="card-action right-align">
<a href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}" class="btn disabled hide waves-effect waves-light" id="analyze"><i class="material-icons left">search</i>Analyze</a>
<a href="{{ url_for('corpora.prepare_corpus', corpus_id=corpus.id) }}" class="btn disabled hide waves-effect waves-light" id="compile"><i class="material-icons left">merge_type</i>Compile</a>
<a href="{{ url_for('corpora.prepare_corpus', corpus_id=corpus.id) }}" class="btn disabled hide waves-effect waves-light" id="build"><i class="material-icons left">build</i>Build</a>
<a data-target="delete-corpus-modal" class="btn modal-trigger red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
</div>
</div>
@ -163,7 +163,7 @@
}
setStatus(status) {
let analyzeElement, compileElement, numFiles, progressIndicatorElement, statusElement;
let analyzeElement, buildElement, numFiles, progressIndicatorElement, statusElement;
numFiles = (this.foreignCorpusFlag ? nopaque.foreignCorpora[this.corpusId] : nopaque.corpora[this.corpusId]).files.length;
@ -185,11 +185,11 @@
analyzeElement.classList.add("disabled", "hide");
}
compileElement = document.getElementById("compile");
buildElement = document.getElementById("build");
if (status === "unprepared" && numFiles > 0) {
compileElement.classList.remove("disabled", "hide");
buildElement.classList.remove("disabled", "hide");
} else {
compileElement.classList.add("disabled", "hide");
buildElement.classList.add("disabled", "hide");
}
}
}

View File

@ -1,31 +1,30 @@
{% macro render_field(field) %}
<div class="input-field">
<i class="prefix">{{ field.name[0:1]|upper }}</i>
<div class="input-field">
<i class="prefix">{{ field.label.text[0:1]|upper }}</i>
{{ field.label }}
{{ field(data_length='255')|safe }}
</div>
{% if field.errors %}
{% for error in field.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
{% endif %}
</div>
{% endmacro %}
{% macro render_field_with_value(field, corpus_file) %}
<div class="input-field">
<i class="prefix">{{ field.name[0:1]|upper }}</i>
<div class="input-field">
<i class="prefix">{{ field.label.text[0:1]|upper }}</i>
{{ field.label }}
{{ field(value=corpus_file[field.name], data_length='255')| safe }}
</div>
{% if field.errors %}
{% for error in field.errors %}
<span class="helper-text red-text">{{ error }}</span>
{% endfor %}
{% endif %}
</div>
{% endmacro %}
{% macro submit_button(input) %}
<button class="btn waves-effect waves-light" id="{{ input.id }}" name="{{ input.name }}" type="submit" value="{{ input.label.text }}">{{ input.label.text }}<i class="material-icons right">send</i></button>
<button class="btn waves-effect waves-light" id="{{ input.id }}" name="{{ input.name }}" type="submit" value="{{ input.label.text }}">
{{ input.label.text }}
<i class="material-icons right">send</i>
</button>
{% endmacro %}

View File

@ -1,7 +1,7 @@
<ul class="table-of-contents" id="roadmap">
<li><b>Roadmap</b></li>
<li>
<a href="{{ url_for('services.service', service='setup-files') }}">File setup</a>
<a href="{{ url_for('services.service', service='file-setup') }}">File setup</a>
</li>
<li>
<a href="{{ url_for('services.service', service='ocr') }}">Optical Character Recognition</a>