From f356d4bb894321a1e9000c8d8a0771f0ab2873f1 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 16 Apr 2020 10:21:22 +0200 Subject: [PATCH 1/4] Naming... --- app/templates/corpora/corpus.html.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/templates/corpora/corpus.html.j2 b/app/templates/corpora/corpus.html.j2 index fcf181c5..28b455df 100644 --- a/app/templates/corpora/corpus.html.j2 +++ b/app/templates/corpora/corpus.html.j2 @@ -35,7 +35,7 @@
searchAnalyze - merge_typeCompile + buildBuild deleteDelete
@@ -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"); } } } From 72e585395b9ab9ef985f654866716f5ff842c3d5 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 16 Apr 2020 13:28:09 +0200 Subject: [PATCH 2/4] status update handling for corpus list --- app/static/js/nopaque.lists.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/static/js/nopaque.lists.js b/app/static/js/nopaque.lists.js index 03b1e127..08c5f680 100644 --- a/app/static/js/nopaque.lists.js +++ b/app/static/js/nopaque.lists.js @@ -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; From 6177093a51e1de564c93fb974b32ea272e6055ec Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 16 Apr 2020 13:47:52 +0200 Subject: [PATCH 3/4] Set characters according to metadata label --- app/templates/macros.jinja | 41 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/app/templates/macros.jinja b/app/templates/macros.jinja index 0e8e4ab4..d61de68b 100644 --- a/app/templates/macros.jinja +++ b/app/templates/macros.jinja @@ -1,31 +1,30 @@ {% macro render_field(field) %} -
- {{ field.name[0:1]|upper }} - {{ field.label }} - {{ field(data_length='255')|safe }} -
- {% if field.errors %} - {% for error in field.errors %} - {{ error }} - {% endfor %} - {% endif %} +
+ {{ field.label.text[0:1]|upper }} + {{ field.label }} + {{ field(data_length='255')|safe }} + {% for error in field.errors %} + {{ error }} + {% endfor %} +
{% endmacro %} {% macro render_field_with_value(field, corpus_file) %} -
- {{ field.name[0:1]|upper }} - {{ field.label }} - {{ field(value=corpus_file[field.name], data_length='255')| safe }} -
- {% if field.errors %} - {% for error in field.errors %} - {{ error }} - {% endfor %} - {% endif %} +
+ {{ field.label.text[0:1]|upper }} + {{ field.label }} + {{ field(value=corpus_file[field.name], data_length='255')| safe }} + {% for error in field.errors %} + {{ error }} + {% endfor %} +
{% endmacro %} {% macro submit_button(input) %} - + {% endmacro %} From 23ffbe5f6b013b9b45949b0f6bb795545f44426e Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 16 Apr 2020 13:48:31 +0200 Subject: [PATCH 4/4] Fix link after service renaming (file-setup) --- app/templates/services/roadmap.html.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/services/roadmap.html.j2 b/app/templates/services/roadmap.html.j2 index 59831d89..05b703fe 100644 --- a/app/templates/services/roadmap.html.j2 +++ b/app/templates/services/roadmap.html.j2 @@ -1,7 +1,7 @@