Add translator/editors buttons
This commit is contained in:
@@ -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,
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user