85 lines
4.6 KiB
Plaintext
85 lines
4.6 KiB
Plaintext
extend templates/layout.pug
|
|
|
|
block content
|
|
.container
|
|
.center
|
|
h1 Translate into #{chunk.chapter.entryVersion.translationEntryVersions[0].name}
|
|
|
|
//- TODO: Show previous...
|
|
form.row(action=`/translate/${chunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${chunk.chapter.id}/t/${chunk.index}`, method="post")
|
|
.col.s12.m6.input-field
|
|
textarea#original-text.materialize-textarea(name="originalText", readonly)= chunk.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
|
|
label(for="original-text") Translated Text
|
|
.col.s12
|
|
.center
|
|
button.btn.black(type="submit") save
|
|
|
|
//- TODO: Show next...
|
|
.row
|
|
.col.s12
|
|
ul.tabs#adjacent-tabs
|
|
if previousChunk
|
|
li.tab.col.s6
|
|
a(href="#previous-translation") Previous Translation
|
|
if nextChunk
|
|
li.tab.col.s6
|
|
a(href="#next-translation") Next Translation
|
|
if previousChunk
|
|
.col.s12#previous-translation
|
|
table
|
|
//- thead
|
|
tr
|
|
th #{chunk.chapter.entry.dialect.name}
|
|
th #{chunk.chapter.entry.translationEntryVersions[0].name}
|
|
th
|
|
tbody
|
|
tr
|
|
td= previousChunk.text
|
|
td
|
|
if previousChunk.translated
|
|
span= previousChunk.text
|
|
else if previousChunk.translation
|
|
span= previousChunk.translation.text
|
|
else
|
|
span.grey-text= previousChunk.text
|
|
td
|
|
if previousChunk.translated
|
|
span nothing
|
|
else if previousChunk.translation
|
|
a.btn.blue(href=`/translate/${previousChunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${previousChunk.chapter.id}/t/${previousChunk.index}`) edit
|
|
else
|
|
a.btn.black(href=`/translate/${previousChunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${previousChunk.chapter.id}/t/${previousChunk.index}`) previous translation
|
|
|
|
if nextChunk
|
|
.col.s12#next-translation
|
|
table
|
|
//- thead
|
|
tr
|
|
th #{chunk.chapter.entry.dialect.name}
|
|
th #{chunk.chapter.entry.translationEntryVersions[0].name}
|
|
th
|
|
tbody
|
|
tr
|
|
td= nextChunk.text
|
|
td
|
|
if nextChunk.translated
|
|
span= nextChunk.text
|
|
else if nextChunk.translation
|
|
span= nextChunk.translation.text
|
|
else
|
|
span.grey-text= nextChunk.text
|
|
td
|
|
if nextChunk.translated
|
|
span nothing
|
|
else if nextChunk.translation
|
|
a.btn.blue(href=`/translate/${nextChunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${nextChunk.chapter.id}/t/${nextChunk.index}`) edit
|
|
else
|
|
a.btn.black(href=`/translate/${nextChunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${nextChunk.chapter.id}/t/${nextChunk.index}`) next translation
|
|
|
|
|
|
block additionalScripts
|
|
script
|
|
include js/init-adjacent-tabs.js |