Files
mantra.press/server/views/project-tracker.pug

48 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-02-18 01:28:23 +02:00
extend templates/layout.pug
block content
-
const isOwnedByUser = project.owner.ownerEntities.some(ownerEntity => {
return ownerEntity.entity.entityUsers.some(entityUser => {
return entityUser.userId == user?.id
})
})
.container
.center
h1= project.name
p.flow-text= project.description
2022-06-19 03:38:27 +02:00
p.flow-text
-
const wordCount = translationChapters.reduce((totalWordCount, translationChapter) => totalWordCount+translationChapter.chapter.wordCount, 0)
span.chip #{wordCount.toLocaleString()} words
2022-02-18 01:28:23 +02:00
if isOwnedByUser
.row
.col.s12
a.btn.black(href=`/projects/${project.id}/tracker/trail`) audit trail
.divider
2022-06-19 03:38:27 +02:00
table.highlight
2022-02-18 01:28:23 +02:00
thead
tr
th Title Text
2022-06-19 03:38:27 +02:00
th language
2022-02-18 01:28:23 +02:00
th Artifact
th Chapter
th translator
th proof reader
2022-06-19 03:38:27 +02:00
th editor
2022-02-18 01:28:23 +02:00
tbody
each translationChapter in translationChapters.sort((a, b) => a.index - b.index)
2022-06-19 03:38:27 +02:00
tr(onclick=`window.location='/projects/${project.id}/tracker/${translationChapter.id}'`)
//- TODO: link to the translationChapter...
2022-06-19 03:41:50 +02:00
td(title=translationChapter.chapter.name)= translationChapter.chapter.name
2022-02-18 01:28:23 +02:00
td
2022-06-19 03:38:27 +02:00
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}
2022-02-18 01:28:23 +02:00
td= translationChapter.index
td
2022-06-19 03:38:27 +02:00
td
2022-02-18 01:28:23 +02:00
td