Tracker with filter ability
This commit is contained in:
@@ -1151,6 +1151,9 @@ module.exports = function (options) {
|
||||
if (project) {
|
||||
db.TranslationChapter.findAll({
|
||||
include: [
|
||||
{
|
||||
association: db.TranslationChapter.Chapter,
|
||||
},
|
||||
{
|
||||
association: db.TranslationChapter.TranslationChunks,
|
||||
include: [
|
||||
@@ -1186,9 +1189,16 @@ module.exports = function (options) {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
association: db.TranslationArtifactVersion.Dialect
|
||||
},
|
||||
request.query.dialectId ? {
|
||||
association: db.TranslationArtifactVersion.Dialect,
|
||||
required: true,
|
||||
where: {
|
||||
id: request.query.dialectId
|
||||
}
|
||||
} : {
|
||||
association: db.TranslationArtifactVersion.Dialect,
|
||||
}
|
||||
,
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -13,6 +13,10 @@ block content
|
||||
|
||||
p.flow-text= project.description
|
||||
|
||||
p.flow-text
|
||||
-
|
||||
const wordCount = translationChapters.reduce((totalWordCount, translationChapter) => totalWordCount+translationChapter.chapter.wordCount, 0)
|
||||
span.chip #{wordCount.toLocaleString()} words
|
||||
if isOwnedByUser
|
||||
.row
|
||||
.col.s12
|
||||
@@ -20,22 +24,27 @@ block content
|
||||
|
||||
.divider
|
||||
|
||||
table
|
||||
table.highlight
|
||||
thead
|
||||
tr
|
||||
th Title Text
|
||||
th language
|
||||
th Artifact
|
||||
th Chapter
|
||||
th translator
|
||||
th proof reader
|
||||
th editor
|
||||
tbody
|
||||
each translationChapter in translationChapters.sort((a, b) => a.index - b.index)
|
||||
tr
|
||||
tr(onclick=`window.location='/projects/${project.id}/tracker/${translationChapter.id}'`)
|
||||
//- TODO: link to the translationChapter...
|
||||
-
|
||||
const title = translationChapter.translationChunks.length > 0 ? translationChapter.translationChunks.sort((a, b) => a.index - b.index)[0].text : "N/A"
|
||||
const title = translationChapter.chapter.name
|
||||
td(title=title)= title
|
||||
td
|
||||
a.tracker-title-cell(href=`/projects/${project.id}/tracker/${translationChapter.id}`, title=title)= title
|
||||
td #{translationChapter.translationArtifactVersion.artifactVersion.artifact.name} - #{translationChapter.translationArtifactVersion.name} - #{translationChapter.translationArtifactVersion.artifactVersion.tag}
|
||||
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}
|
||||
td= translationChapter.index
|
||||
td
|
||||
td
|
||||
td
|
||||
Reference in New Issue
Block a user