Add approval creation things
This commit is contained in:
29
server/views/artifact-version-approval-form.pug
Normal file
29
server/views/artifact-version-approval-form.pug
Normal file
@@ -0,0 +1,29 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
.container
|
||||
.center
|
||||
h1 License Approval for #{artifactVersion.artifact.name} - #{artifactVersion.tag}
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
form.row(action=`/v/${artifactVersion.id}/approval/add`, method="post")
|
||||
.col.s12.input-field
|
||||
input#name(type="text", name="name", value=artifactVersionApproval.name, placeholder="Creative Commons/Copyright agreement")
|
||||
label(for="name") Name of license/approval for the content to be translated
|
||||
.col.s12.input-field
|
||||
input#conditions(type="text", name="conditions", value=artifactVersionApproval.conditions, placeholder="The following dictate how the produced translations shall be treated")
|
||||
label(for="conditions") Summary of the conditions required to get approval (optional)
|
||||
.col.s12.input-field
|
||||
textarea#description.materialize-textarea(name="description", placeholder="Describe the approval being given in sufficient detail.")= artifactVersionApproval.description
|
||||
label(for="description") Detailed description of license/approval
|
||||
.col.s12.input-field
|
||||
input(id="satoshis",type="number", name="satoshis", placeholder="100000 satoshis", step=1, min=1, max=2100000000000000)
|
||||
label(for="satoshis") Satoshis required to unlock the approval
|
||||
.col.s12.input-field
|
||||
p
|
||||
label
|
||||
input#isApproved(type="checkbox", name="isApproved", checked=artifactVersionApproval.approvedAt!=null)
|
||||
span Approval already granted
|
||||
.col.s12
|
||||
button.btn.black(type="submit") add approval
|
||||
37
server/views/artifact-version-approval.pug
Normal file
37
server/views/artifact-version-approval.pug
Normal file
@@ -0,0 +1,37 @@
|
||||
extend templates/layout.pug
|
||||
|
||||
block content
|
||||
-
|
||||
const isOwnedByUser = artifactVersion.artifact.owner.ownerEntities.some(ownerEntity => {
|
||||
return ownerEntity.entity.entityUsers.some(entityUser => {
|
||||
return entityUser.userId == user?.id
|
||||
})
|
||||
})
|
||||
.container
|
||||
.center
|
||||
h1 #{artifactVersion.artifact.name}
|
||||
if artifactVersion.artifact.accessibility == "private"
|
||||
i.right.medium.material-icons lock
|
||||
|
||||
h2 #{artifactVersion.tag}
|
||||
p.flow-text
|
||||
each ownerEntity, index in artifactVersion.artifact.owner.ownerEntities
|
||||
small
|
||||
if index > 0
|
||||
span and
|
||||
span.chip #{ownerEntity.entity.name}
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
if artifactVersion.artifactVersionApproval
|
||||
p.flow-text Approval: #{artifactVersion.artifactVersionApproval.name}
|
||||
p.flow-text= artifactVersion.artifactVersionApproval.conditions
|
||||
p.flow-text= artifactVersion.artifactVersionApproval.description
|
||||
if artifactVersion.artifactVersionApproval.approvedAt
|
||||
p.flow-text.green-text(title=artifactVersion.artifactVersionApproval.approvedAt.toLocaleString()) approval has already been given to translate the work.
|
||||
else
|
||||
p.flow-text Pending approval
|
||||
else
|
||||
p.flow-text No digital rights approval information has been provided for this content.
|
||||
if isOwnedByUser
|
||||
a.btn.black(href=`/v/${artifactVersion.id}/approval/add`) add approval information
|
||||
@@ -28,6 +28,15 @@ block content
|
||||
.col.s12
|
||||
a.btn.black(href=`/v/${artifactVersion.id}/campaign/create`) funding campaign
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
if artifactVersion.artifactVersionApproval
|
||||
p.flow-text Approval:
|
||||
a(href=`/v/${artifactVersion.id}/approval`) #{artifactVersion.artifactVersionApproval.name}
|
||||
else
|
||||
p.flow-text No digital rights approval information has been provided for this content.
|
||||
if isOwnedByUser
|
||||
a.btn.black(href=`/v/${artifactVersion.id}/approval/add`) add approval information
|
||||
|
||||
if isOwnedByUser
|
||||
.divider
|
||||
|
||||
Reference in New Issue
Block a user