From 6dacaf6bb528eefbd28669e89a4d084656e55456 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 25 Feb 2015 12:48:26 -0500 Subject: [PATCH] helpers.displayMenuItem --- public/src/modules/helpers.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index c4676a0e37..059e4445ab 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -13,6 +13,18 @@ return (config.loggedIn || !config.privateUserInfo); }; + helpers.displayMenuItem = function(data, index) { + var properties = data.navigation[index].properties; + + if (properties.loggedIn && !ldata.oggedIn || + properties.adminOnly && !data.isAdmin || + properties.installed && properties.installed.search && !data.searchEnabled) { + return false; + } + + return true; + }; + helpers.buildMetaTag = function(tag) { var name = tag.name ? 'name="' + tag.name + '" ' : '', property = tag.property ? 'property="' + tag.property + '" ' : '',