Add importing spreadsheet ability
This commit is contained in:
@@ -29,7 +29,15 @@ block content
|
||||
each val, key in query
|
||||
if key != "sheets"
|
||||
input(type="hidden", name=key, value=val)
|
||||
button.btn.black(type="submit") export to spreadsheets
|
||||
button.btn.black(type="submit")
|
||||
i.material-icons.left file_download
|
||||
span export to spreadsheets
|
||||
.row
|
||||
.col.s12
|
||||
a.btn.black(href=`/projects/${project.id}/import`)
|
||||
i.material-icons.left file_upload
|
||||
span import spreadsheets
|
||||
|
||||
.divider
|
||||
|
||||
table.highlight
|
||||
|
||||
31
server/views/project-translation-importer.pug
Normal file
31
server/views/project-translation-importer.pug
Normal file
@@ -0,0 +1,31 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
-
|
||||
const isOwnedByUser = project.owner.ownerEntities.some(ownerEntity => {
|
||||
return ownerEntity.entity.entityUsers.some(entityUser => {
|
||||
return entityUser.userId == user?.id
|
||||
})
|
||||
})
|
||||
.container
|
||||
.center
|
||||
h1
|
||||
small import
|
||||
span= project.name
|
||||
small translations
|
||||
p.flow-text= project.description
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
form.row(action=`/projects/${project.id}/import`, method="post", encType="multipart/form-data")
|
||||
//- .col.s12.input-field
|
||||
textarea#textarea.materialize-textarea(name="text")
|
||||
label(for="textarea") Entire chapter text (markdown)
|
||||
.file-field.input-field.col.s12
|
||||
.btn
|
||||
span File
|
||||
input#file-input(type="file", name="translations")
|
||||
.file-path-wrapper
|
||||
input.file-path.validate(type="text", placeholder="Import translations")
|
||||
.col.s12
|
||||
button.btn.black(type="submit") import translations
|
||||
Reference in New Issue
Block a user