NAVIGATION[plugin_name].allow = allow || '*';
}
+function addAdminFlag(plugin_name, admin_link) {
+ if (!NAVIGATION[plugin_name]) {
+ NAVIGATION[plugin_name] = {};
+ }
+ NAVIGATION[plugin_name].admin_link = admin_link || false;
+}
+
function getNavigation() {
return NAVIGATION;
}
addPriority(plugin_name, plugin.priority);
addLabel(plugin_name, plugin.name);
addAllow(plugin_name, plugin.allow);
+ addAdminFlag(plugin_name, plugin.admin_link);
}
function init() {
return (
<div className="app">
<h2>
- {userProfileLink}
+ USER: {userProfileLink}
<span className="oi" data-glyph="caret-bottom"></span>
</h2>
<ul className="menu">
let navList = [];
let navListHTML = [];
let secondaryNav = [];
+ let adminNav = [];
let self = this;
self.hasSubNav = {};
let secondaryNavHTML = (
<div className="secondaryNav" key="secondaryNav">
{secondaryNav}
+ <div className="app admin">
+ <h2>
+ <a>
+ ADMIN <span className="oi" data-glyph="caret-bottom"></span>
+ </a>
+ </h2>
+ <ul className="menu">
+ {
+ adminNav
+ }
+ </ul>
+ </div>
<SelectProject
onSelectProject={props.store.selectActiveProject}
projects={props.projects}
NavList = nav[k].routes.map(buildNavListItem.bind(self, k));
navItem.priority = nav[k].priority;
navItem.order = nav[k].order;
- navItem.html = (
+ if(nav[k].admin_link) {
+ adminNav.push((
+ <li key={nav[k].name}>
+ {dashboardLink}
+ </li>
+ ))
+ } else {
+ navItem.html = (
<SkyquakeRBAC allow={nav[k].allow || ['*']} key={k} className={navClass}>
<h2>{dashboardLink} {self.hasSubNav[k] ? <span className="oi" data-glyph="caret-bottom"></span> : ''}</h2>
<ul className="menu">
</SkyquakeRBAC>
);
navList.push(navItem)
+ }
+
}
}
//Sorts nav items by order and returns only the markup