Add versioning

This commit is contained in:
2021-12-25 01:35:32 +02:00
parent 1a539e673f
commit da9d91502c
14 changed files with 388 additions and 261 deletions

View File

@@ -3,10 +3,10 @@ extend templates/layout.pug
block content
.container
.center
h1 Translate into #{chunk.chapter.entry.translationEntries[0].name}
h1 Translate into #{chunk.chapter.entryVersion.translationEntryVersions[0].name}
//- TODO: Show previous...
form.row(action=`/translate/${chunk.chapter.entry.translationEntries[0].id}/chapter/${chunk.chapter.id}/t/${chunk.id}`)
form.row(action=`/translate/${chunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${chunk.chapter.id}/t/${chunk.id}`)
.col.s12.m6.input-field
textarea#original-text.materialize-textarea(name="originalText")= chunk.text
label(for="original-text") Original Text
@@ -30,7 +30,7 @@ block content
//- thead
tr
th #{chunk.chapter.entry.dialect.name}
th #{chunk.chapter.entry.translationEntries[0].name}
th #{chunk.chapter.entry.translationEntryVersions[0].name}
th
tbody
tr
@@ -48,7 +48,7 @@ block content
else if previousChunk.translation
a.btn.blue review
else
a.btn.black(href=`/translate/${previousChunk.chapter.entry.translationEntries[0].id}/chapter/${previousChunk.chapter.id}/t/${previousChunk.index}`) previous translation
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
@@ -56,7 +56,7 @@ block content
//- thead
tr
th #{chunk.chapter.entry.dialect.name}
th #{chunk.chapter.entry.translationEntries[0].name}
th #{chunk.chapter.entry.translationEntryVersions[0].name}
th
tbody
tr
@@ -74,7 +74,7 @@ block content
else if nextChunk.translation
a.btn.blue review
else
a.btn.black(href=`/translate/${nextChunk.chapter.entry.translationEntries[0].id}/chapter/${nextChunk.chapter.id}/t/${nextChunk.index}`) next translation
a.btn.black(href=`/translate/${nextChunk.chapter.entryVersion.translationEntryVersions[0].id}/chapter/${nextChunk.chapter.id}/t/${nextChunk.index}`) next translation
block additionalScripts