From c6f9bb5cac79f1a6ec5c818db92799fb80d0b102 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 4 Jul 2017 08:28:15 +0000 Subject: [PATCH] new config --- config.jsonc | 296 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 294 insertions(+), 2 deletions(-) diff --git a/config.jsonc b/config.jsonc index 6bd1afd..afdafc6 100644 --- a/config.jsonc +++ b/config.jsonc @@ -35,11 +35,13 @@ */ "capabilities": { "canAddItems": {"member": true, "staff": true, "admin": true}, + "canAddDocuments": {"member": true, "staff": true, "admin": true}, "canDownloadVideo": {"guest": 0, "member": 0, "staff": 4, "admin": 4}, "canEditAnnotations": {"staff": true, "admin": true}, "canEditEntities": {"staff": true, "admin": true}, "canEditDocuments": {"staff": true, "admin": true}, "canEditEvents": {"staff": true, "admin": true}, + "canEditFeaturedCollections": {"staff": true, "admin": true}, "canEditFeaturedEdits": {"staff": true, "admin": true}, "canEditFeaturedLists": {"staff": true, "admin": true}, "canEditFeaturedTexts": {"staff": true, "admin": true}, @@ -51,8 +53,10 @@ "canEditUsers": {"admin": true}, "canExportAnnotations": {"member": true, "staff": true, "admin": true}, "canImportAnnotations": {"member": true, "staff": true, "admin": true}, + "canImportItems": {"member": true, "staff": true, "admin": true}, "canManageDocuments": {"member": true, "staff": true, "admin": true}, "canManageEntities": {"member": true, "staff": true, "admin": true}, + "canManageHome": {"staff": true, "admin": true}, "canManagePlacesAndEvents": {"member": true, "staff": true, "admin": true}, "canManageTitlesAndNames": {"member": true, "staff": true, "admin": true}, "canManageUsers": {"staff": true, "admin": true}, @@ -60,10 +64,13 @@ "canPlayVideo": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, "canReadText": {"guest": 0, "member": 0, "staff": 1, "admin": 1}, "canRemoveItems": {"admin": true}, + "canRemoveDocuments": {"staff": true, "admin": true}, "canSeeAccessed": {"staff": true, "admin": true}, + "canSeeAllTasks": {"staff": true, "admin": true}, "canSeeDebugMenu": {"staff": true, "admin": true}, "canSeeExtraItemViews": {"staff": true, "admin": true}, "canSeeMedia": {"staff": true, "admin": true}, + "canSeeDocument": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, "canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, "canSeeSize": {"staff": true, "admin": true}, "canSeeSoftwareVersion": {"staff": true, "admin": true}, @@ -90,6 +97,271 @@ */ "clipLayers": ["subtitles", "keywords", "notes"], /* + "documentKeys" defines the metadata associated with each document. Required keys + are "*", "id" and "title". + A documentKey must have the following properties: + "id": The unique id of the key (as used by the server) + "title": The title of the key (as displayed by the client) + "type": Can be "boolean", "date", "enum", "float", "hue", "integer", + "layer", "string", "text", "time" or ["..."] (list of values of + this type). If type is "layer", this is a reference to the + annotations layer with the same id. + and can have any of the following properties: + "additionalSort": Ordered list of {key, operator} objects, where key is + another itemKey and operator is "+" or "-". This can be used to + override user.ui.listSort when results are sorted by this key. + "autocomplete": If true, the find element will provide autocomplete + "autocompleteSort": Sort order of autocomplete suggestions + "capability": A capability required to see data for this key + "columnRequired": If true, the column can't be removed from list view + "columnWidth": Default column width in px. If absent, no column for + this key can be added in list view. + "filter": If true, one can filter results by this key + "find": If true, this key will appear as an option in the find element + "flag": Can be "country" or "language". If set (and filter is true), a + flag icon corresponding to the field's value will be displayed. + "format": {type: string, args: [value, value, ...]}, used for special + formatting. This will invoke Ox.formatType(args). For details, see + https://oxjs.org/#doc/Ox.formatArea etc. + "secondaryId": If true, loading the URL "/value" will redirect to the + corresponding item, in case there is an exact match for this key + "sort": If true, one can sort results by this key + "sortOperator": Sort order ("+" or "-"), in case it differs from the + default for the key's type ("+" for strings, "-" for numbers) + "sortType": Special sort type ("person" or "title") which can be + further configured in "Manage Names" or "Manage Titles" + "value": {key: string, type: string} or {layer: string, type: string}, + for keys whose value is derived from other keys or layers (like + "number of actors" or "words per minute"). Possible values for type + are "length", "lengthperminute", "words", and "wordsperminute". + Alternatively, "value" can be set to the string "capability", which + results in an itemKey whose boolean value indicates the presence or + absence of a userLevel-dependent capability. This can be used to + create queries and lists like "all items this user can play" etc. + "values": [value, value, ...] Ordered list of values, in case "type" is + "enum" + */ + "documentKeys": [ + { + "id": "*", + "title": "All", + "type": "text", + "find": true + }, + { + "id": "title", + "operator": "+", + "title": "Title", + "type": "string", + "find": true, + "sort": true, + "sortType": "title", + "autocomplete": true, + "columnWidth": 256 + }, + { + "id": "type", + "operator": "+", + "title": "Type", + "type": "string", + "filter": true, + "find": true, + "sort": true, + "autocomplete": true, + "columnWidth": 128 + }, + { + "id": "author", + "operator": "+", + "title": "Author", + "type": ["string"], + "filter": true, + "find": true, + "sort": true, + "sortType": "person", + "autocomplete": true, + "columnWidth": 256 + }, + { + "id": "publisher", + "operator": "+", + "title": "Publisher", + "type": "string", + "filter": true, + "find": true, + "sort": true, + "autocomplete": true, + "columnWidth": 256 + }, + { + "id": "place", + "title": "Place", + "type": ["string"], + "columnWidth": 128, + "filter": true, + "find": true, + "sort": true + }, + { + "id": "date", + "title": "Date", + "type": "string", + "columnWidth": 120, + //"format": {"type": "date", "args": ["%a, %b %e, %Y"]}, + "sort": true + }, + { + "id": "series", + "title": "Series", + "type": "string", + "columnWidth": 128, + "find": true, + "sort": true + }, + { + "id": "edition", + "title": "Edition", + "type": "string", + "columnWidth": 128, + "find": true + }, + { + "id": "language", + "title": "Language", + "type": ["string"], + "columnWidth": 128, + "filter": true, + "find": true, + "sort": true + }, + { + "id": "id", + "operator": "+", + "title": "ID", + "type": "string", + "sort": true, + "columnWidth": 64 + }, + { + "id": "extension", + "operator": "+", + "title": "Extension", + "type": "string", + "filter": true, + "find": true, + "sort": true, + "autocomplete": true, + "columnWidth": 64 + }, + { + "id": "dimensions", + "operator": "-", + "title": "Dimensions", + "type": "integer", + "sort": true, + "columnWidth": 128 + }, + { + "id": "size", + "operator": "-", + "title": "Size", + "type": "integer", + "sort": true, + "format": {"type": "value", "args": ["B"]}, + "columnWidth": 64 + }, + { + "id": "description", + "operator": "+", + "title": "Description", + "type": "text", + "find": true, + "sort": true, + "columnWidth": 256 + }, + { + "id": "matches", + "operator": "-", + "title": "Matches", + "type": "integer", + "sort": true, + "columnWidth": 64 + }, + { + "id": "user", + "operator": "+", + "title": "User", + "type": "string", + "filter": true, + "find": true, + "sort": true, + "autocomplete": true, + "columnWidth": 128 + }, + { + "id": "created", + "operator": "-", + "title": "Created", + "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]}, + "type": "date", + "sort": true, + "columnWidth": 144 + }, + { + "id": "modified", + "operator": "-", + "title": "Modified", + "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]}, + "type": "date", + "sort": true, + "columnWidth": 144 + }, + { + "id": "accessed", + "title": "Last Accessed", + "type": "date", + "capability": "canSeeAccessed", + "columnWidth": 150, + "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]}, + "sort": true + }, + { + "id": "timesaccessed", + "title": "Times Accessed", + "type": "integer", + "capability": "canSeeAccessed", + "columnWidth": 60, + "format": {"type": "number", "args": []}, + "sort": true + }, + { + "id": "rightslevel", + "title": "Rights Level", + "type": "enum", + "columnWidth": 90, + "format": {"type": "ColorLevel", "args": [ + ["Public", "Restricted", "Private"] + ]}, + "sort": true, + "sortOperator": "+", + "values": ["Public", "Restricted", "Private", "Unknown"] + } + ], + /* + "documentRightsLevel" defines which initial rights level will be assigned to documents + created by users of these user levels. + */ + "documentRightsLevel": {"member": 2, "staff": 2, "admin": 2}, + /* + "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 annotations, info view, or elsewhere. Each entry defines a specific class of entity object, its properties and their types (for example an "actor" @@ -135,6 +407,12 @@ {"id": "texts", "title": "Texts"}, {"id": "embeds", "title": "Embeds"} ], + "importMetadata": { + "date": "{date}", + "topic": "{tags}", + "summary": "{description}", + "title": "{title}" + }, /* "itemKeys" defines the metadata associated with each item. Required keys are "*", "id" and "title". Annotation layers can be referenced too, which @@ -910,18 +1188,31 @@ "calendarFind": "", "calendarSelection": "", "clipColumns": 2, + "clipSize": 416, + "collectionColumns": ["title", "id", "extension", "dimensions", "size", "description", "matches", "user", "created", "modified"], + "collectionColumnWidth": {}, + "collectionSelection": [], + "collectionSort": [ + {"key": "title", "operator": "+"}, + {"key": "extension", "operator": "+"} + ], + "collectionView": "grid", + "collections": {}, "columns": { "Colors": { "columns": ["title", "depositor", "themes", "language", "hue", "saturation", "brightness"], "columnWidth": {} } }, + "document": "", + "documentView": "view", "documents": {}, "documentSize": 256, "documentsSelection": {}, "documentsSort": [{"key": "name", "operator": "+"}], "documentsView": "grid", "edit": "", + "edit": "", "edits": {}, "editSelection": [], "editSort": [ @@ -944,6 +1235,7 @@ ], "filtersSize": 176, "find": {"conditions": [], "operator": "&"}, + "findDocuments": {"conditions": [], "operator": "&"}, "followPlayer": true, "help": "", "icons": "frames", @@ -964,7 +1256,7 @@ "page": "", "part": { "api": "", - "documents": "", + "document": "", "entities": "", "faq": "", "help": "", @@ -1007,7 +1299,7 @@ "featured": true, "volumes": true }, - "texts": { + "documents": { "personal": true, "favorite": true, "featured": true