update config

This commit is contained in:
j 2018-12-26 15:53:05 +01:00
parent 89f2a97a80
commit d75b4a7b25

View file

@ -6,7 +6,8 @@
{
"annotations": {
"showUsers": true
"showUsers": true,
"separator": ","
},
"cantPlay": {
"icon": "NoCopyright",
@ -55,7 +56,15 @@
"canSeeItem": {"guest": 3, "member": 3, "researcher": 3, "staff": 3, "admin": 3},
"canSeeSize": {"researcher": true, "staff": true, "admin": true},
"canSeeSoftwareVersion": {"researcher": true, "staff": true, "admin": true},
"canSendMail": {"staff": true, "admin": true}
"canSendMail": {"staff": true, "admin": true},
"canAddDocuments": {"member": true, "admin": true, "staff": true},
"canEditFeaturedCollections": {"admin": true, "staff": true},
"canImportItems": {"member": true, "admin": true, "staff": true},
"canManageHome": {"admin": true, "staff": true},
"canManageTranslations": {"admin": true},
"canRemoveDocuments": {"admin": true, "staff": true},
"canSeeAllTasks": {"admin": true, "staff": true},
"canSeeDocument": {"member": 1, "admin": 4, "staff": 4, "guest": 1}
},
/*
clipKeys are the properties that clips can be sorted by.
@ -76,6 +85,303 @@
included in find annotations.
*/
"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", "Out of Copyright", "Under Copyright", "Private"]
]},
"sort": true,
"sortOperator": "+",
"values": ["Public", "Out of Copyright", "Under Copyright", "Private", "Unknown"]
}
],
/*
"documentRightsLevel" defines which initial rights level will be assigned to documents
created by users of these user levels.
*/
"documentRightsLevel": {"member": 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
annotations, info view, or elsewhere. Each entry defines a specific class
of entity object, its properties and their types (for example an "actor"
with "name", "biography", "portrait" etc). The HTML representation for
entities can be customized by adding "/static/js/entity.SITENAME.js".
Each entity has the following properties:
"id": Unique internal ID (can be referenced in "layers")
"title": Human-readable title
"keys": List of properties
"sortType": Optional. If set to "person" or "title", then the sort
order can be configured in "Manage Names" or "Manage Titles"
Each key has the properties "id", "title" and "type". "type" can be
"boolean", "number", "string", "text", "document" (reference to the id of a
document added via "Manage Documents") or ["string"] (list of strings).
"id" and "name" keys are required. If "alternativeNames" is present, these
will act as synonyms when autocompleting values entered as annotations.
*/
"entities": [
{
"id": "people",
"title": "People",
"keys": [
{"id": "id", "title": "ID", "type": "string"},
{"id": "name", "title": "Name", "type": "string"},
{"id": "additionalNames", "title": "Additional Names", "type": ["string"]},
{"id": "biography", "title": "Biography", "type": "text"},
{"id": "portrait", "title": "Portrait", "type": "document"}
],
"sortType": "person"
}
],
"flags": false,
"help": [
{"id": "help", "title": "Help"},
@ -715,6 +1021,7 @@
},
"folderdepth": 4,
"https": true,
"public": true,
"id": "turkishcinema",
"name": "turkishcine.ma",
"url": "turkishcine.ma",
@ -763,6 +1070,8 @@
"annotationsRange": "all",
"annotationsSize": 256,
"annotationsSort": "position",
"annotationsHighlight": "none",
"clipSize": 416,
"calendarFind": "",
"calendarSelection": "",
"clipColumns": 2,
@ -772,12 +1081,20 @@
"columnWidth": {}
}
},
"collectionColumnWidth": {},
"collectionColumns": ["title", "id", "extension", "dimensions", "size", "description", "matches", "user", "created", "modified"],
"collectionSelection": [],
"collectionSort": [{"key": "title", "operator": "+"}, {"key": "extension", "operator": "+"}],
"collectionView": "grid",
"collections": {},
"document": "",
"documents": {},
"documentSize": 256,
"documentsSelection": {},
"documentsSort": [{"key": "name", "operator": "+"}],
"documentsView": "grid",
"documentView": "view",
"edit": "",
"edits": {},
"editSelection": [],
@ -802,6 +1119,7 @@
],
"filtersSize": 176,
"find": {"conditions": [], "operator": "&"},
"findDocuments": {"conditions": [], "operator": "&"},
"followPlayer": true,
"help": "",
"icons": "posters",
@ -828,6 +1146,7 @@
"part": {
"api": "",
"documents": "",
"document": "",
"entities": "",
"faq": "",
"help": "",
@ -868,7 +1187,7 @@
"featured": true,
"volumes": true
},
"texts": {
"documents": {
"personal": true,
"favorite": true,
"featured": true
@ -898,6 +1217,7 @@
"username": "",
"volumes": []
},
"importMetadata": {"title": "{title}"},
// fixme: this should include colors
"userLevels": ["guest", "member", "researcher", "staff", "admin"],
"video": {