Use accessbility checks
This commit is contained in:
@@ -10,6 +10,9 @@ block content
|
||||
.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
|
||||
@@ -35,7 +38,7 @@ block content
|
||||
p.flow-text No chapters added
|
||||
else
|
||||
.row
|
||||
each chapter in artifactVersion.chapters
|
||||
each chapter in artifactVersion.chapters.sort((a, b) => a.index - b.index)
|
||||
.col.s12
|
||||
a(href=`/v/${artifactVersion.id}/chapters/${chapter.id}`)
|
||||
.card-panel
|
||||
|
||||
4
server/views/js/init-accessibility-select.js
Normal file
4
server/views/js/init-accessibility-select.js
Normal file
@@ -0,0 +1,4 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var elems = document.querySelectorAll('#accessibility-select');
|
||||
var instances = M.FormSelect.init(elems, {});
|
||||
});
|
||||
@@ -5,18 +5,37 @@ block content
|
||||
.center
|
||||
h1 Library
|
||||
|
||||
.row
|
||||
.col.s12
|
||||
form.row(action="/library/add", method="post")
|
||||
.row
|
||||
.col.s12
|
||||
form.row(action="/library/add", method="post")
|
||||
.col.s12.input-field
|
||||
input#name(type="text", name="name", value=artifact.name)
|
||||
label(for="name") Artifact Name
|
||||
.col.s12.input-field
|
||||
input#url(type="text", name="url", value=artifact.url)
|
||||
label(for="url") Artifact Url
|
||||
if artifact.id == null
|
||||
.col.s12.input-field
|
||||
input#name(type="text", name="name", value=artifact.name)
|
||||
label(for="name") Artifact Name
|
||||
.col.s12.input-field
|
||||
input#url(type="text", name="url", value=artifact.url)
|
||||
label(for="url") Artifact Url
|
||||
if artifact.id == null
|
||||
.col.s12.input-field
|
||||
input#version(type="text", name="version", value=artifact.version)
|
||||
label(for="version") First Version Number
|
||||
.col.s12
|
||||
button.btn.black(type="submit") add artifact
|
||||
input#version(type="text", name="version", value=artifact.version)
|
||||
label(for="version") First Version Number
|
||||
.col.s12.input-field
|
||||
p
|
||||
label
|
||||
input(type="radio", name="accessibility", value="public")
|
||||
span Public
|
||||
br
|
||||
small Anyone can see and add translations
|
||||
p
|
||||
label
|
||||
input(type="radio", name="accessibility", value="permissioned")
|
||||
span Permissioned
|
||||
br
|
||||
small Anyone can see but restrict translations
|
||||
p
|
||||
label
|
||||
input(type="radio", name="accessibility", value="private")
|
||||
span Private
|
||||
br
|
||||
small Restrict who can see and translate project
|
||||
.col.s12
|
||||
button.btn.black(type="submit") add artifact
|
||||
|
||||
@@ -58,7 +58,7 @@ block content
|
||||
//- TODO: Give summary of chapters...
|
||||
|
||||
h2 Chapters
|
||||
each translationChapter in translationArtifactVersion.translationChapters
|
||||
each translationChapter in translationArtifactVersion.translationChapters.sort((a,b) => a.index - b.index)
|
||||
p.flow-text
|
||||
small translate
|
||||
br
|
||||
|
||||
Reference in New Issue
Block a user