From 1baec5457eb91d0da03bc1893b31f827e0ab3d20 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 26 Dec 2014 12:30:43 +0000 Subject: [PATCH] manage entities dialog broken if no entites are defined, disable in menu --- static/js/mainMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index bb6f131e..802bb66b 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -197,7 +197,7 @@ pandora.ui.mainMenu = function() { getFindMenu(), { id: 'dataMenu', title: Ox._('Data'), items: [ { id: 'documents', title: Ox._('Manage Documents...'), disabled: !pandora.site.capabilities.canManageDocuments[pandora.user.level] }, - { id: 'entities', title: Ox._('Manage Entities...'), disabled: !pandora.site.capabilities.canManageEntities[pandora.user.level] }, + { id: 'entities', title: Ox._('Manage Entities...'), disabled: !pandora.site.entities.length || !pandora.site.capabilities.canManageEntities[pandora.user.level] }, {}, { id: 'titles', title: Ox._('Manage Titles...'), disabled: !pandora.site.capabilities.canManageTitlesAndNames[pandora.user.level] }, { id: 'names', title: Ox._('Manage Names...'), disabled: !pandora.site.capabilities.canManageTitlesAndNames[pandora.user.level] },