Rename entries to artifacts
This commit is contained in:
@@ -9,11 +9,11 @@ module.exports = function (options) {
|
|||||||
.get(function(request, response, next) {
|
.get(function(request, response, next) {
|
||||||
db.Artifact.findAll({
|
db.Artifact.findAll({
|
||||||
|
|
||||||
}).then(entries => {
|
}).then(artifacts => {
|
||||||
response.display("library", {
|
response.display("library", {
|
||||||
user: request.user,
|
user: request.user,
|
||||||
pageTitle: "Library - Mantra",
|
pageTitle: "Library - Mantra",
|
||||||
entries: entries
|
artifacts: artifacts
|
||||||
})
|
})
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
next(error)
|
next(error)
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ module.exports = function (options) {
|
|||||||
]
|
]
|
||||||
}).then(async (project) => {
|
}).then(async (project) => {
|
||||||
if (project) {
|
if (project) {
|
||||||
const entries = await db.Artifact.findAll({
|
const artifacts = await db.Artifact.findAll({
|
||||||
// Narrow it down to entries this user has admin ownership off...,
|
// Narrow it down to artifacts this user has admin ownership off...,
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
association: db.Artifact.ArtifactVersions,
|
association: db.Artifact.ArtifactVersions,
|
||||||
@@ -123,7 +123,7 @@ module.exports = function (options) {
|
|||||||
user: request.user,
|
user: request.user,
|
||||||
pageTitle: "Projects - Mantra",
|
pageTitle: "Projects - Mantra",
|
||||||
project: project,
|
project: project,
|
||||||
entries: entries
|
artifacts: artifacts
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
@@ -171,7 +171,7 @@ module.exports = function (options) {
|
|||||||
if (project) {
|
if (project) {
|
||||||
// TODO: Fi
|
// TODO: Fi
|
||||||
const artifactVersion = await db.ArtifactVersion.findByPk(request.body.artifactVersionId, {
|
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) {
|
if (artifactVersion) {
|
||||||
@@ -209,7 +209,7 @@ module.exports = function (options) {
|
|||||||
}).then(async (project) => {
|
}).then(async (project) => {
|
||||||
if (project) {
|
if (project) {
|
||||||
const translationArtifactVersions = await db.TranslationArtifactVersion.findAll({
|
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: [
|
include: [
|
||||||
{
|
{
|
||||||
association: db.TranslationArtifactVersion.ArtifactVersion,
|
association: db.TranslationArtifactVersion.ArtifactVersion,
|
||||||
@@ -250,7 +250,7 @@ module.exports = function (options) {
|
|||||||
if (project) {
|
if (project) {
|
||||||
// TODO: Fi
|
// TODO: Fi
|
||||||
const translationArtifactVersion = await db.TranslationArtifactVersion.findByPk(request.body.translationArtifactVersionId, {
|
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: [
|
include: [
|
||||||
{
|
{
|
||||||
association: db.TranslationArtifactVersion.ArtifactVersion,
|
association: db.TranslationArtifactVersion.ArtifactVersion,
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ block content
|
|||||||
h1 Library
|
h1 Library
|
||||||
|
|
||||||
a.btn.black(href="/library/add") add artifact
|
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
|
p.flow-text No Literature currently on the system
|
||||||
else
|
else
|
||||||
.row
|
.row
|
||||||
each artifact in entries
|
each artifact in artifacts
|
||||||
.col.s12
|
.col.s12
|
||||||
a(href=`/library/${artifact.id}`)
|
a(href=`/library/${artifact.id}`)
|
||||||
.card-panel
|
.card-panel
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ block content
|
|||||||
th Version
|
th Version
|
||||||
th
|
th
|
||||||
tbody
|
tbody
|
||||||
each artifact in entries
|
each artifact in artifacts
|
||||||
tr
|
tr
|
||||||
td= artifact.name
|
td= artifact.name
|
||||||
td= artifact.artifactVersions[0].tag
|
td= artifact.artifactVersions[0].tag
|
||||||
|
|||||||
Reference in New Issue
Block a user