diff --git a/server/router/library/index.js b/server/router/library/index.js index 4a982ac..30136c5 100644 --- a/server/router/library/index.js +++ b/server/router/library/index.js @@ -9,11 +9,11 @@ module.exports = function (options) { .get(function(request, response, next) { db.Artifact.findAll({ - }).then(entries => { + }).then(artifacts => { response.display("library", { user: request.user, pageTitle: "Library - Mantra", - entries: entries + artifacts: artifacts }) }).catch(error => { next(error) diff --git a/server/router/projects/index.js b/server/router/projects/index.js index 12082c4..d5b3660 100644 --- a/server/router/projects/index.js +++ b/server/router/projects/index.js @@ -108,8 +108,8 @@ module.exports = function (options) { ] }).then(async (project) => { if (project) { - const entries = await db.Artifact.findAll({ - // Narrow it down to entries this user has admin ownership off..., + const artifacts = await db.Artifact.findAll({ + // Narrow it down to artifacts this user has admin ownership off..., include: [ { association: db.Artifact.ArtifactVersions, @@ -123,7 +123,7 @@ module.exports = function (options) { user: request.user, pageTitle: "Projects - Mantra", project: project, - entries: entries + artifacts: artifacts }) } else { next() @@ -171,7 +171,7 @@ module.exports = function (options) { if (project) { // TODO: Fi const artifactVersion = await db.ArtifactVersion.findByPk(request.body.artifactVersionId, { - // Narrow it down to entries this user has admin ownership off..., + // Narrow it down to artifacts this user has admin ownership off..., }) if (artifactVersion) { @@ -209,7 +209,7 @@ module.exports = function (options) { }).then(async (project) => { if (project) { const translationArtifactVersions = await db.TranslationArtifactVersion.findAll({ - // Narrow it down to entries this user has admin ownership off..., + // Narrow it down to artifacts this user has admin ownership off..., include: [ { association: db.TranslationArtifactVersion.ArtifactVersion, @@ -250,7 +250,7 @@ module.exports = function (options) { if (project) { // TODO: Fi const translationArtifactVersion = await db.TranslationArtifactVersion.findByPk(request.body.translationArtifactVersionId, { - // Narrow it down to entries this user has admin ownership off..., + // Narrow it down to artifacts this user has admin ownership off..., include: [ { association: db.TranslationArtifactVersion.ArtifactVersion, diff --git a/server/views/library.pug b/server/views/library.pug index 825934d..f24377f 100644 --- a/server/views/library.pug +++ b/server/views/library.pug @@ -6,11 +6,11 @@ block content h1 Library a.btn.black(href="/library/add") add artifact - if entries.length == 0 + if artifacts.length == 0 p.flow-text No Literature currently on the system else .row - each artifact in entries + each artifact in artifacts .col.s12 a(href=`/library/${artifact.id}`) .card-panel diff --git a/server/views/project-add-artifact.pug b/server/views/project-add-artifact.pug index 2a70df3..7119440 100644 --- a/server/views/project-add-artifact.pug +++ b/server/views/project-add-artifact.pug @@ -12,7 +12,7 @@ block content th Version th tbody - each artifact in entries + each artifact in artifacts tr td= artifact.name td= artifact.artifactVersions[0].tag