diff --git a/admin/client/App/screens/Home/components/Section.js b/admin/client/App/screens/Home/components/Section.js index 28d5ad1222..0472181ade 100644 --- a/admin/client/App/screens/Home/components/Section.js +++ b/admin/client/App/screens/Home/components/Section.js @@ -3,7 +3,7 @@ import getRelatedIconClass from '../utils/getRelatedIconClass'; class Section extends React.Component { render () { - const iconClass = this.props.icon || getRelatedIconClass(this.props.id); + const iconClass = this.props.icon ? `octicon octicon-${this.props.icon}` : getRelatedIconClass(this.props.id); return (
diff --git a/admin/client/App/screens/Home/index.js b/admin/client/App/screens/Home/index.js index a2d4c0dc99..acdf239701 100644 --- a/admin/client/App/screens/Home/index.js +++ b/admin/client/App/screens/Home/index.js @@ -62,7 +62,7 @@ var HomeView = React.createClass({ {/* Render nav with sections */} {Keystone.nav.sections.map((navSection) => { return ( -
+
csv field delimiter Allow you to choose a custom field delimiter to be used for CSV export instead of the default comma. diff --git a/lib/core/initNav.js b/lib/core/initNav.js index 0c6c40fb1e..79a31a3177 100644 --- a/lib/core/initNav.js +++ b/lib/core/initNav.js @@ -28,14 +28,25 @@ module.exports = function initNav (sections) { }); } - _.forEach(sections, function (section, key) { - if (typeof section === 'string') { - section = [section]; + _.forEach(sections, function (spec, key) { + var lists; + if (typeof spec === 'string') { + lists = [spec]; } - section = { - lists: section, - label: nav.flat ? keystone.list(section[0]).label : utils.keyToLabel(key), + else if (Array.isArray(spec)) { + lists = spec; + } + else { + lists = spec.paths; + } + + var section = { + lists: lists, + label: nav.flat ? keystone.list(spec[0]).label : utils.keyToLabel(key), }; + if (spec.icon) { + section.icon = spec.icon; + } section.key = key; section.lists = _.map(section.lists, function (i) { if (typeof i === 'string') {