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

62 lines
2.8 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
2022-06-19 22:12:45 +02:00
th
p
label
input#overview-checkbox(type="checkbox")
span
2022-06-19 23:31:16 +02:00
th Name
2022-06-19 22:12:45 +02:00
th
a.dropdown-trigger language ▼
2022-02-18 01:28:23 +02:00
th Artifact
th Chapter
2022-06-19 22:12:45 +02:00
th
a.dropdown-trigger translator ▼
th
a.dropdown-trigger proof reader ▼
th
a.dropdown-trigger editor ▼
2022-02-18 01:28:23 +02:00
tbody
each translationChapter in translationChapters.sort((a, b) => a.index - b.index)
2022-06-19 23:31:16 +02:00
tr(onclick=`window.location='/translate/${translationChapter.translationArtifactVersion.id}/chapter/${translationChapter.id}'`)
2022-06-19 03:38:27 +02:00
//- TODO: link to the translationChapter...
2022-06-19 22:12:45 +02:00
td
p
label
input(type="checkbox")
span
2022-06-19 23:31:16 +02:00
td.truncate(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