manage entities dialog broken if no entites are defined, disable in menu

This commit is contained in:
j 2014-12-26 12:30:43 +00:00
parent 913599697e
commit 1baec5457e

View file

@ -197,7 +197,7 @@ pandora.ui.mainMenu = function() {
getFindMenu(), getFindMenu(),
{ id: 'dataMenu', title: Ox._('Data'), items: [ { id: 'dataMenu', title: Ox._('Data'), items: [
{ id: 'documents', title: Ox._('Manage Documents...'), disabled: !pandora.site.capabilities.canManageDocuments[pandora.user.level] }, { 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: '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] }, { id: 'names', title: Ox._('Manage Names...'), disabled: !pandora.site.capabilities.canManageTitlesAndNames[pandora.user.level] },