diff --git a/server/router/translate/index.js b/server/router/translate/index.js index ac11d8e..a6e155c 100644 --- a/server/router/translate/index.js +++ b/server/router/translate/index.js @@ -82,6 +82,9 @@ module.exports = function (options) { ] } ] + }, + { + association: db.TranslationArtifactVersion.TranslationArtifactVersionEditor, } ] }).then(translationArtifactVersion => { @@ -103,6 +106,15 @@ module.exports = function (options) { .get(function(request, response, next) { db.TranslationChapter.findByPk(request.params.chapterId, { include: [ + { + association: db.TranslationChapter.Chapter, + }, + { + association: db.TranslationChapter.TranslationChapterTranslators, + }, + { + association: db.TranslationChapter.TranslationChapterProofReaders, + }, { association: db.TranslationChapter.TranslationChunks, include: [ @@ -132,6 +144,9 @@ module.exports = function (options) { }, { association: db.TranslationArtifactVersion.BackTranslationFrom + }, + { + association: db.TranslationArtifactVersion.TranslationArtifactVersionEditor, } ] } diff --git a/server/views/project-tracker.pug b/server/views/project-tracker.pug index 81e284f..a22e9e2 100644 --- a/server/views/project-tracker.pug +++ b/server/views/project-tracker.pug @@ -32,7 +32,7 @@ block content label input#overview-checkbox(type="checkbox") span - th Title Text + th Name th a.dropdown-trigger language ▼ th Artifact @@ -45,14 +45,14 @@ block content a.dropdown-trigger editor ▼ tbody each translationChapter in translationChapters.sort((a, b) => a.index - b.index) - tr(onclick=`window.location='/projects/${project.id}/tracker/${translationChapter.id}'`) + tr(onclick=`window.location='/translate/${translationChapter.translationArtifactVersion.id}/chapter/${translationChapter.id}'`) //- TODO: link to the translationChapter... td p label input(type="checkbox") span - td(title=translationChapter.chapter.name)= translationChapter.chapter.name + td.truncate(title=translationChapter.chapter.name)= translationChapter.chapter.name td a(href=`/projects/${project.id}/tracker?dialectId=${translationChapter.translationArtifactVersion.dialect.id}`)= translationChapter.translationArtifactVersion.dialect.name td #{translationChapter.translationArtifactVersion.artifactVersion.artifact.name} - #{translationChapter.translationArtifactVersion.artifactVersion.tag} diff --git a/server/views/translate-chapter.pug b/server/views/translate-chapter.pug index 4126551..6982e58 100644 --- a/server/views/translate-chapter.pug +++ b/server/views/translate-chapter.pug @@ -6,6 +6,32 @@ block content h1= translationChapter.translationArtifactVersion.name h2= translationChapter.translationArtifactVersion.artifactVersion.artifact.name + p.flow-text + span.chip #{translationChapter.chapter.wordCount.toLocaleString()} words + + .row + .col.s12.m4 + + p.flow-text + a.btn-flat.waves-effect Translator ▼ + if translationChapter.translationChapterTranslators.length > 0 + span With #{translationChapter.translationChapterTranslators.length} translator(s) assigned + else + span No translators assigned yet + .col.s12.m4 + p.flow-text + a.btn-flat.waves-effect Editor ▼ + if translationChapter.translationArtifactVersion.translationArtifactVersionEditor + span= translationChapter.translationArtifactVersion.translationArtifactVersionEditor.id + else + span No editors assigned yet + .col.s12.m4 + p.flow-text + a.btn-flat.waves-effect Proof Reader ▼ + if translationChapter.translationChapterProofReaders.length > 0 + span With #{translationChapter.translationChapterProofReaders.length} proof reader(s) assigned + else + span No proof reader assigned yet //- TODO: List translationChunks in the chapter .row .col.s12 diff --git a/server/views/translation-artifact-version.pug b/server/views/translation-artifact-version.pug index 067c267..333ed14 100644 --- a/server/views/translation-artifact-version.pug +++ b/server/views/translation-artifact-version.pug @@ -42,6 +42,15 @@ block content form(action=`/fork/t/${translationArtifactVersion.id}`, method="post") button.btn.black(type="submit") fork + .row + .col.s12 + p.flow-text + a.btn-flat.waves-effect Editor ▼ + if translationArtifactVersion.translationArtifactVersionEditor + span= translationArtifactVersion.translationArtifactVersionEditor.id + else + span No editors assigned yet + if isOwnedByUser //- TODO: Check required conditions to start back translation... .row