Add projects to the system
This commit is contained in:
@@ -11,6 +11,9 @@ block content
|
||||
.col.s12.input-field
|
||||
input#name(type="text", name="name", value=campaign.name)
|
||||
label(for="name") Campaign Name
|
||||
if project
|
||||
.col.s12
|
||||
span project...
|
||||
each translationEntryVersion in translationEntryVersions
|
||||
input(type="hidden", name="translationEntryVersions", value=translationEntryVersion.id)
|
||||
.col.s12.input-field
|
||||
|
||||
22
server/views/project-add-entry.pug
Normal file
22
server/views/project-add-entry.pug
Normal file
@@ -0,0 +1,22 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1 Add Entry to Project
|
||||
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th Name
|
||||
th Version
|
||||
th
|
||||
tbody
|
||||
each entry in entries
|
||||
tr
|
||||
td= entry.name
|
||||
td= entry.entryVersions[0].tag
|
||||
td
|
||||
form(action=`/projects/${project.id}/add-entry`, method="post")
|
||||
input(type="hidden", name="entryVersionId", value=entry.entryVersions[0].id)
|
||||
button.btn.black(type="submit") add to project
|
||||
22
server/views/project-add-translation.pug
Normal file
22
server/views/project-add-translation.pug
Normal file
@@ -0,0 +1,22 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1 Add Translation to #{project.name}
|
||||
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th Name
|
||||
th Version
|
||||
th
|
||||
tbody
|
||||
each translationEntryVersion in translationEntryVersions
|
||||
tr
|
||||
td #{translationEntryVersion.entryVersion.entry.name} - #{translationEntryVersion.name}
|
||||
td= translationEntryVersion.entryVersion.tag
|
||||
td
|
||||
form(action=`/projects/${project.id}/add-translation`, method="post")
|
||||
input(type="hidden", name="translationEntryVersionId", value=translationEntryVersion.id)
|
||||
button.btn.black(type="submit") add to project
|
||||
18
server/views/project-form.pug
Normal file
18
server/views/project-form.pug
Normal file
@@ -0,0 +1,18 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1 Create Project
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
form.row(action=`/projects/create`, method="post")
|
||||
.col.s12.input-field
|
||||
input#name(type="text", name="name", value=project.name)
|
||||
label(for="name") Project Name
|
||||
.col.s12.input-field
|
||||
input#description(type="text", name="description", value=project.description)
|
||||
label(for="description") Description
|
||||
.col.s12
|
||||
button.btn.black(type="submit") create project
|
||||
25
server/views/project.pug
Normal file
25
server/views/project.pug
Normal file
@@ -0,0 +1,25 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1= project.name
|
||||
|
||||
p.flow-text= project.description
|
||||
|
||||
.divider
|
||||
h2 Entries
|
||||
each projectEntryVersion in project.projectEntryVersions
|
||||
p.flow-text= projectEntryVersion.entryVersion.entry.name
|
||||
.row
|
||||
.col.s12
|
||||
a.btn.black(href=`/projects/${project.id}/add-entry`) add from library
|
||||
.divider
|
||||
h2 Translation
|
||||
each projectTranslationEntryVersion in project.projectTranslationEntryVersions
|
||||
p.flow-text #{projectTranslationEntryVersion.translationEntryVersion.name} - #{projectTranslationEntryVersion.translationEntryVersion.entryVersion.entry.name}
|
||||
.row
|
||||
.col.s12
|
||||
a.btn.black(href=`/projects/${project.id}/add-translation`) add translation
|
||||
//- TODO: Show project translation entry versions
|
||||
//- TODO: Show project entry versions
|
||||
14
server/views/projects.pug
Normal file
14
server/views/projects.pug
Normal file
@@ -0,0 +1,14 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1 Projects
|
||||
|
||||
a.btn.black(href=`/projects/create`) add project
|
||||
|
||||
row
|
||||
each project in projects
|
||||
.col.s12
|
||||
p.flow-text
|
||||
a(href=`projects/${project.id}`)= project.name
|
||||
@@ -39,11 +39,14 @@ html(lang="en" dir="ltr")
|
||||
a(href="/library")
|
||||
i.material-icons.black-text person
|
||||
span library
|
||||
li
|
||||
a(href="/projects")
|
||||
i.material-icons.black-text person
|
||||
span Projects
|
||||
li
|
||||
a(href="/campaigns")
|
||||
i.material-icons.black-text person
|
||||
span campaigns
|
||||
|
||||
span campaigns
|
||||
li
|
||||
a(href="/pledges")
|
||||
i.material-icons.black-text person
|
||||
|
||||
Reference in New Issue
Block a user