Rename entries to artifacts

This commit is contained in:
2022-01-07 00:28:07 +02:00
parent 0d0468e45c
commit a9f9b63904
4 changed files with 11 additions and 11 deletions

View File

@@ -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)

View File

@@ -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,

View File

@@ -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

View File

@@ -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