mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
REFACTOR: create component for navigation pills
This commit is contained in:
parent
283459e496
commit
701c23c8b7
5 changed files with 15 additions and 18 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
export default Ember.Component.extend({
|
||||||
|
tagName: 'ul',
|
||||||
|
classNameBindings: [':nav', ':nav-pills'],
|
||||||
|
id: 'navigation-bar'
|
||||||
|
});
|
|
@ -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>
|
|
@ -1,11 +1,6 @@
|
||||||
{{bread-crumbs categories=categories}}
|
{{bread-crumbs categories=categories}}
|
||||||
|
|
||||||
<ul class="nav nav-pills" id='navigation-bar'>
|
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
||||||
{{#each navItem in navItems}}
|
|
||||||
{{navigation-item content=navItem filterMode=filterMode}}
|
|
||||||
{{/each}}
|
|
||||||
{{custom-html "extraNavItem"}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{{#if canCreateCategory}}
|
{{#if canCreateCategory}}
|
||||||
<button class='btn btn-default' {{action "createCategory"}}><i class='fa fa-plus'></i>{{i18n 'category.create'}}</button>
|
<button class='btn btn-default' {{action "createCategory"}}><i class='fa fa-plus'></i>{{i18n 'category.create'}}</button>
|
||||||
|
|
|
@ -3,12 +3,8 @@
|
||||||
noSubcategories=noSubcategories
|
noSubcategories=noSubcategories
|
||||||
hideSubcategories=showingSubcategoryList}}
|
hideSubcategories=showingSubcategoryList}}
|
||||||
|
|
||||||
<ul class="nav nav-pills" id='navigation-bar'>
|
|
||||||
{{#each navItem in navItems}}
|
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
||||||
{{navigation-item content=navItem filterMode=filterMode}}
|
|
||||||
{{/each}}
|
|
||||||
{{custom-html "extraNavItem"}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{{#if currentUser}}
|
{{#if currentUser}}
|
||||||
{{category-notifications-button category=category}}
|
{{category-notifications-button category=category}}
|
||||||
|
|
|
@ -6,12 +6,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{bread-crumbs categories=categories}}
|
{{bread-crumbs categories=categories}}
|
||||||
|
|
||||||
<ul class="nav nav-pills" id='navigation-bar'>
|
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
||||||
{{#each navItem in navItems}}
|
|
||||||
{{navigation-item content=navItem filterMode=filterMode}}
|
|
||||||
{{/each}}
|
|
||||||
{{custom-html "extraNavItem"}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{{#if canCreateTopic}}
|
{{#if canCreateTopic}}
|
||||||
<button id="create-topic" class='btn btn-default' {{action "createTopic"}}><i class='fa fa-plus'></i>{{i18n 'topic.create'}}</button>
|
<button id="create-topic" class='btn btn-default' {{action "createTopic"}}><i class='fa fa-plus'></i>{{i18n 'topic.create'}}</button>
|
||||||
|
|
Loading…
Reference in a new issue