Translation chunks...
This commit is contained in:
@@ -4,15 +4,15 @@ block content
|
||||
.container
|
||||
.center
|
||||
h1 Translate into
|
||||
a(href=`/translate/${chunk.chapter.artifactVersion.translationArtifactVersions[0].id}/chapter/${chunk.chapter.id}`) #{chunk.chapter.artifactVersion.translationArtifactVersions[0].name}
|
||||
a(href=`/translate/${translationChunk.translationChapter.translationArtifactVersion.id}/chapter/${translationChunk.translationChapter.id}`) #{translationChunk.translationChapter.translationArtifactVersion.name}
|
||||
|
||||
//- TODO: Show previous...
|
||||
form.row(action=`/translate/${chunk.chapter.artifactVersion.translationArtifactVersions[0].id}/chapter/${chunk.chapter.id}/t/${chunk.index}`, method="post")
|
||||
form.row(action=`/translate/${translationChunk.translationChapter.translationArtifactVersion.id}/chapter/${translationChunk.translationChapter.id}/t/${translationChunk.index}`, method="post")
|
||||
.col.s12.m6.input-field
|
||||
textarea#original-text.materialize-textarea(name="originalText", readonly)= chunk.text
|
||||
textarea#original-text.materialize-textarea(name="originalText", readonly)= translationChunk.text
|
||||
label(for="original-text") Original Text
|
||||
.col.s12.m6.input-field
|
||||
textarea#translated-text.materialize-textarea(name="translatedText", placeholder=chunk.text)= chunk.translation ? chunk.translation.text : null
|
||||
textarea#translated-text.materialize-textarea(name="translatedText", placeholder=translationChunk.text)= translationChunk.translation ? translationChunk.translation.text : null
|
||||
label(for="original-text") Translated Text
|
||||
.col.s12
|
||||
.center
|
||||
@@ -22,63 +22,59 @@ block content
|
||||
.row
|
||||
.col.s12
|
||||
ul.tabs#adjacent-tabs
|
||||
if previousChunk
|
||||
if previousTranslationChunk
|
||||
li.tab.col.s6
|
||||
a(href="#previous-translation") Previous Translation
|
||||
if nextChunk
|
||||
if nextTranslationChunk
|
||||
li.tab.col.s6
|
||||
a(href="#next-translation") Next Translation
|
||||
if previousChunk
|
||||
if previousTranslationChunk
|
||||
.col.s12#previous-translation
|
||||
table
|
||||
//- thead
|
||||
tr
|
||||
th #{chunk.chapter.artifact.dialect.name}
|
||||
th #{chunk.chapter.artifact.translationArtifactVersions[0].name}
|
||||
th
|
||||
|
||||
tbody
|
||||
tr
|
||||
td= previousChunk.text
|
||||
td= previousTranslationChunk.text
|
||||
td
|
||||
if previousChunk.translated
|
||||
span= previousChunk.text
|
||||
else if previousChunk.translation
|
||||
span= previousChunk.translation.text
|
||||
if previousTranslationChunk.translated
|
||||
span= previousTranslationChunk.text
|
||||
else if previousTranslationChunk.translation
|
||||
span= previousTranslationChunk.translation.text
|
||||
else
|
||||
span.grey-text= previousChunk.text
|
||||
span.grey-text= previousTranslationChunk.text
|
||||
td
|
||||
if previousChunk.translated
|
||||
if previousTranslationChunk.translated
|
||||
span nothing
|
||||
else if previousChunk.translation
|
||||
a.btn.blue(href=`/translate/${previousChunk.chapter.artifactVersion.translationArtifactVersions[0].id}/chapter/${previousChunk.chapter.id}/t/${previousChunk.index}`) edit
|
||||
else if previousTranslationChunk.translation
|
||||
a.btn.blue(href=`/translate/${previousTranslationChunk.translationChapter.translationArtifactVersion.id}/chapter/${previousTranslationChunk.translationChapter.id}/t/${previousTranslationChunk.index}`) edit
|
||||
else
|
||||
a.btn.black(href=`/translate/${previousChunk.chapter.artifactVersion.translationArtifactVersions[0].id}/chapter/${previousChunk.chapter.id}/t/${previousChunk.index}`) previous translation
|
||||
a.btn.black(href=`/translate/${previousTranslationChunk.translationChapter.translationArtifactVersion.id}/chapter/${previousTranslationChunk.translationChapter.id}/t/${previousTranslationChunk.index}`) previous translation
|
||||
|
||||
if nextChunk
|
||||
if nextTranslationChunk
|
||||
.col.s12#next-translation
|
||||
table
|
||||
//- thead
|
||||
tr
|
||||
th #{chunk.chapter.artifact.dialect.name}
|
||||
th #{chunk.chapter.artifact.translationArtifactVersions[0].name}
|
||||
th #{translationChunk.translationChapter.artifact.dialect.name}
|
||||
th #{translationChunk.translationChapter.artifact.translationArtifactVersions[0].name}
|
||||
th
|
||||
tbody
|
||||
tr
|
||||
td= nextChunk.text
|
||||
td= nextTranslationChunk.text
|
||||
td
|
||||
if nextChunk.translated
|
||||
span= nextChunk.text
|
||||
else if nextChunk.translation
|
||||
span= nextChunk.translation.text
|
||||
if nextTranslationChunk.translated
|
||||
span= nextTranslationChunk.text
|
||||
else if nextTranslationChunk.translation
|
||||
span= nextTranslationChunk.translation.text
|
||||
else
|
||||
span.grey-text= nextChunk.text
|
||||
span.grey-text= nextTranslationChunk.text
|
||||
td
|
||||
if nextChunk.translated
|
||||
if nextTranslationChunk.translated
|
||||
span nothing
|
||||
else if nextChunk.translation
|
||||
a.btn.blue(href=`/translate/${nextChunk.chapter.artifactVersion.translationArtifactVersions[0].id}/chapter/${nextChunk.chapter.id}/t/${nextChunk.index}`) edit
|
||||
else if nextTranslationChunk.translation
|
||||
a.btn.blue(href=`/translate/${nextTranslationChunk.translationChapter.translationArtifactVersion.id}/chapter/${nextTranslationChunk.translationChapter.id}/t/${nextTranslationChunk.index}`) edit
|
||||
else
|
||||
a.btn.black(href=`/translate/${nextChunk.chapter.artifactVersion.translationArtifactVersions[0].id}/chapter/${nextChunk.chapter.id}/t/${nextChunk.index}`) next translation
|
||||
a.btn.black(href=`/translate/${nextTranslationChunk.translationChapter.translationArtifactVersion.id}/chapter/${nextTranslationChunk.translationChapter.id}/t/${nextTranslationChunk.index}`) next translation
|
||||
|
||||
|
||||
block additionalScripts
|
||||
|
||||
Reference in New Issue
Block a user