diff --git a/packages/accounts/accounts-tab/admin.js b/packages/accounts/accounts-tab/admin.js index 0c1210f..bf1bb9a 100644 --- a/packages/accounts/accounts-tab/admin.js +++ b/packages/accounts/accounts-tab/admin.js @@ -24,6 +24,7 @@ if (Meteor.isClient) { index: 80, identifier: 'accounts-index', title: i18n('accounts.index.title'), + iconClass: 'fa fa-user', routeName: 'accounts.index', activeRouteRegex: 'accounts', permission: 'accounts.index' diff --git a/packages/base/links.js b/packages/base/links.js index f2ec4b9..d7cdc34 100644 --- a/packages/base/links.js +++ b/packages/base/links.js @@ -18,6 +18,10 @@ orion.links.attachSchema(new SimpleSchema({ title: { type: String }, + iconClass: { + type: String, + optional: true + }, routeName: { type: String, optional: true @@ -38,6 +42,9 @@ orion.links.add = function(options) { if (_.isFunction(options.title)) { options.title = options.title(); } + if (_.isFunction(options.iconClass)) { + options.iconClass = options.iconClass(); + } self.upsert({ identifier: options.identifier }, { $set: options }); }); }; diff --git a/packages/bootstrap/views/sidebar/sidebar.html b/packages/bootstrap/views/sidebar/sidebar.html index d2f32c6..22522df 100644 --- a/packages/bootstrap/views/sidebar/sidebar.html +++ b/packages/bootstrap/views/sidebar/sidebar.html @@ -19,11 +19,11 @@ - {{ title }} + {{>orionBootstrapSidebarLinkIcon}} {{ title }} {{ else }} - {{ title }} + {{>orionBootstrapSidebarLinkIcon}} {{ title }} {{/ if }} @@ -37,7 +37,13 @@ {{ else }}
  • - {{ title }} + {{>orionBootstrapSidebarLinkIcon}} {{ title }}
  • {{/ if }} + + \ No newline at end of file diff --git a/packages/bootstrap/views/sidebar/sidebar.less b/packages/bootstrap/views/sidebar/sidebar.less index d84724f..b2b02a6 100644 --- a/packages/bootstrap/views/sidebar/sidebar.less +++ b/packages/bootstrap/views/sidebar/sidebar.less @@ -11,4 +11,8 @@ padding-right: 20px; cursor: pointer; } + .sidebar-icon { + display: inline; + padding-right: 4px; + } } diff --git a/packages/collections/collections_client.js b/packages/collections/collections_client.js index 9d531a4..5d2f34b 100644 --- a/packages/collections/collections_client.js +++ b/packages/collections/collections_client.js @@ -10,6 +10,7 @@ orion.collections.onCreated(function() { activeRouteRegex: 'collections.' + self.name, permission: 'collections.' + self.name + '.index', title: self.name[0].toUpperCase() + self.name.slice(1), + iconClass: 'fa fa-table', index: 30 }, self.link); orion.links.add(linkOptions); diff --git a/packages/config/admin.js b/packages/config/admin.js index d913bc6..326611d 100644 --- a/packages/config/admin.js +++ b/packages/config/admin.js @@ -28,6 +28,7 @@ if (Meteor.isClient) { index: 100, identifier: 'config-update', title: i18n('config.update.title'), + iconClass: 'fa fa-wrench', routeName: 'config.update', activeRouteRegex: 'config', permission: 'config.update' diff --git a/packages/dictionary/admin.js b/packages/dictionary/admin.js index ed173fb..43bdc0c 100644 --- a/packages/dictionary/admin.js +++ b/packages/dictionary/admin.js @@ -28,6 +28,7 @@ Tracker.autorun(function () { index: 10, identifier: 'dictionary-update', title: i18n('dictionary.update.title'), + iconClass: 'fa fa-at', routeName: 'dictionary.update', activeRouteRegex: 'dictionary', permission: 'dictionary.update', diff --git a/packages/pages/admin.js b/packages/pages/admin.js index 1dcafc4..dc3a7c5 100644 --- a/packages/pages/admin.js +++ b/packages/pages/admin.js @@ -47,6 +47,7 @@ if (Meteor.isClient) { index: 40, identifier: 'pages-index', title: i18n('pages.index.title'), + iconClass: 'fa fa-file-o', routeName: 'pages.index', activeRouteRegex: 'pages', permission: 'pages.index',