Change the admin-menu outlet to use a tagName of li

This commit is contained in:
Robin Ward 2015-01-21 16:20:43 -05:00
parent 9e82c41576
commit 7741e4dc02
2 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,7 @@
<li>{{#link-to 'admin.api'}}{{i18n 'admin.api.title'}}{{/link-to}}</li>
<li>{{#link-to 'admin.backups'}}{{i18n 'admin.backups.title'}}{{/link-to}}</li>
{{/if}}
{{plugin-outlet "admin-menu"}}
{{plugin-outlet "admin-menu" tagName="li"}}
</ul>
<div class='boxed white admin-content'>

View File

@ -88,20 +88,21 @@ export default function(connectionName, options) {
if (!_connectorCache) { buildConnectorCache(); }
if (_connectorCache[connectionName]) {
var view;
var viewClass;
var childViews = _connectorCache[connectionName];
// If there is more than one view, create a container. Otherwise
// just shove it in.
if (childViews.length > 1) {
view = Ember.ContainerView.extend({
viewClass = Ember.ContainerView.extend({
childViews: childViews
});
} else {
view = childViews[0];
viewClass = childViews[0];
}
delete options.fn; // we don't need the default template since we have a connector
return Ember.Handlebars.helpers.view.call(this, view, options);
return Ember.Handlebars.helpers.view.call(this, viewClass, options);
} else if (options.fn) {
// If a block is passed, render its content.
return Ember.Handlebars.helpers.view.call(this,