refine menu

This commit is contained in:
j 2018-08-10 15:00:09 +01:00
parent 9c89b6747a
commit d7fd474c58
2 changed files with 6 additions and 6 deletions

View File

@ -1082,8 +1082,8 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"title": "Subtitles", "title": "Subtitles",
"canAddAnnotations": {"staff": true, "admin": true}, "canAddAnnotations": {"staff": true, "admin": true},
"canPlayClips": true, "canPlayClips": true,
"hasEvents": true, "hasEvents": false,
"hasPlaces": true, "hasPlaces": false,
"isSubtitles": true, "isSubtitles": true,
"item": "Subtitle", "item": "Subtitle",
"type": "text" "type": "text"

View File

@ -2,9 +2,7 @@
pandora.localInit = function() { pandora.localInit = function() {
var plugins = []; var plugins = [];
if (pandora.user.level == 'admin') {
plugins.push(ExtrasMenu()); plugins.push(ExtrasMenu());
}
plugins.length && load(); plugins.length && load();
@ -29,11 +27,13 @@ pandora.localInit = function() {
}, },
$item = Ox.MenuButton({ $item = Ox.MenuButton({
items: [ items: [
].concat(pandora.user.level == 'admin' ? [
{id: 'rename', title: 'Rename Keyword...'}, {id: 'rename', title: 'Rename Keyword...'},
{id: 'manage', title: 'Manage Keywords...'}, {id: 'manage', title: 'Manage Keywords...'},
] : [], [
{id: 'correlations', title: 'Show Correlations...'}, {id: 'correlations', title: 'Show Correlations...'},
{id: 'ontology', title: 'Open Ontology Graph'}, {id: 'ontology', title: 'Open Ontology Graph'},
], ]),
style: 'rounded', style: 'rounded',
title: 'set', title: 'set',
tooltip: Ox._('Extras'), tooltip: Ox._('Extras'),