document rightslevels

This commit is contained in:
j 2017-01-25 16:38:38 +01:00
parent ee4d00eaaf
commit 6e698cf32f
3 changed files with 30 additions and 2 deletions

View file

@ -350,6 +350,20 @@
} }
], ],
/* /*
"documentRightsLevel" defines which initial rights level will be assigned to documents
created by users of these user levels.
*/
"documentRightsLevel": {"member": 0, "researcher": 0, "staff": 0, "admin": 0},
/*
"documentRightsLevels" is an ordered list of rights levels, one of which will be
assigned to each document.
*/
"documentRightsLevels": [
{"name": "Public", "color": [128, 255, 128]},
{"name": "Restricted", "color": [255, 212, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
/*
"entities" can be used to store arbitrary data. They can be referenced in "entities" can be used to store arbitrary data. They can be referenced in
annotations, info view, or elsewhere. Each entry defines a specific class annotations, info view, or elsewhere. Each entry defines a specific class
of entity object, its properties and their types (for example an "actor" of entity object, its properties and their types (for example an "actor"

View file

@ -352,6 +352,20 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
} }
], ],
/* /*
"documentRightsLevel" defines which initial rights level will be assigned to documents
created by users of these user levels.
*/
"documentRightsLevel": {"member": 0, "researcher": 0, "staff": 0, "admin": 0},
/*
"documentRightsLevels" is an ordered list of rights levels, one of which will be
assigned to each document.
*/
"documentRightsLevels": [
{"name": "Public", "color": [128, 255, 128]},
{"name": "Restricted", "color": [255, 212, 128]},
{"name": "Private", "color": [255, 128, 128]}
],
/*
"entities" can be used to store arbitrary data. They can be referenced in "entities" can be used to store arbitrary data. They can be referenced in
annotations, info view, or elsewhere. Each entry defines a specific class annotations, info view, or elsewhere. Each entry defines a specific class
of entity object, its properties and their types (for example an "actor" of entity object, its properties and their types (for example an "actor"

View file

@ -375,7 +375,7 @@ pandora.ui.documentInfoView = function(data) {
function getRightsLevelElement(rightsLevel) { function getRightsLevelElement(rightsLevel) {
return Ox.Theme.formatColorLevel( return Ox.Theme.formatColorLevel(
rightsLevel, rightsLevel,
pandora.site.rightsLevels.map(function(rightsLevel) { pandora.site.documentRightsLevels.map(function(rightsLevel) {
return rightsLevel.name; return rightsLevel.name;
}) })
); );
@ -501,7 +501,7 @@ pandora.ui.documentInfoView = function(data) {
$rightsLevel.empty(); $rightsLevel.empty();
if (canEdit) { if (canEdit) {
$rightsLevelSelect = Ox.Select({ $rightsLevelSelect = Ox.Select({
items: pandora.site.rightsLevels.map(function(rightsLevel, i) { items: pandora.site.documentRightsLevels.map(function(rightsLevel, i) {
return {id: i, title: rightsLevel.name}; return {id: i, title: rightsLevel.name};
}), }),
width: 128, width: 128,