REFACTOR: create component for navigation pills

This commit is contained in:
Sam 2015-06-22 10:54:50 +10:00
parent 283459e496
commit 701c23c8b7
5 changed files with 15 additions and 18 deletions

View file

@ -0,0 +1,5 @@
export default Ember.Component.extend({
tagName: 'ul',
classNameBindings: [':nav', ':nav-pills'],
id: 'navigation-bar'
});

View file

@ -0,0 +1,6 @@
<ul class="nav nav-pills" id='navigation-bar'>
{{#each navItem in navItems}}
{{navigation-item content=navItem filterMode=filterMode}}
{{/each}}
{{custom-html "extraNavItem"}}
</ul>

View file

@ -1,11 +1,6 @@
{{bread-crumbs categories=categories}}
<ul class="nav nav-pills" id='navigation-bar'>
{{#each navItem in navItems}}
{{navigation-item content=navItem filterMode=filterMode}}
{{/each}}
{{custom-html "extraNavItem"}}
</ul>
{{navigation-bar navItems=navItems filterMode=filterMode}}
{{#if canCreateCategory}}
<button class='btn btn-default' {{action "createCategory"}}><i class='fa fa-plus'></i>{{i18n 'category.create'}}</button>

View file

@ -3,12 +3,8 @@
noSubcategories=noSubcategories
hideSubcategories=showingSubcategoryList}}
<ul class="nav nav-pills" id='navigation-bar'>
{{#each navItem in navItems}}
{{navigation-item content=navItem filterMode=filterMode}}
{{/each}}
{{custom-html "extraNavItem"}}
</ul>
{{navigation-bar navItems=navItems filterMode=filterMode}}
{{#if currentUser}}
{{category-notifications-button category=category}}

View file

@ -6,12 +6,7 @@
{{else}}
{{bread-crumbs categories=categories}}
<ul class="nav nav-pills" id='navigation-bar'>
{{#each navItem in navItems}}
{{navigation-item content=navItem filterMode=filterMode}}
{{/each}}
{{custom-html "extraNavItem"}}
</ul>
{{navigation-bar navItems=navItems filterMode=filterMode}}
{{#if canCreateTopic}}
<button id="create-topic" class='btn btn-default' {{action "createTopic"}}><i class='fa fa-plus'></i>{{i18n 'topic.create'}}</button>