add category list label and state
This commit is contained in:
parent
3e923c7a41
commit
c87fff670d
|
@ -2,8 +2,9 @@ import { setting } from 'discourse/lib/computed';
|
||||||
var get = Ember.get;
|
var get = Ember.get;
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
classNameBindings: ['category::no-category', 'categories:has-drop','categoryStyle'],
|
classNameBindings: ['category::no-category', 'categories:has-drop', 'categoryStyle'],
|
||||||
categoryStyle: setting('category_style'),
|
categoryStyle: setting('category_style'),
|
||||||
|
expanded: false,
|
||||||
|
|
||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{#if category}}
|
{{#if category}}
|
||||||
<a href {{action "expand"}} class="badge-category" style={{badgeStyle}}>
|
<a href {{action "expand"}} class="badge-category" style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>
|
||||||
<span class="badge-category-bg" style={{categoryColor}}></span>
|
<span class="badge-category-bg" style={{categoryColor}}></span>
|
||||||
{{#if category.read_restricted}}
|
{{#if category.read_restricted}}
|
||||||
{{fa-icon "lock"}}
|
{{fa-icon "lock"}}
|
||||||
|
@ -8,9 +8,9 @@
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if noSubcategories}}
|
{{#if noSubcategories}}
|
||||||
<a href {{action "expand"}} class='badge-category home' style={{badgeStyle}}>{{i18n 'categories.no_subcategory'}}</a>
|
<a href {{action "expand"}} class='badge-category home' style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>{{i18n 'categories.no_subcategory'}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href {{action "expand"}} class='badge-category home' style={{badgeStyle}}>{{allCategoriesLabel}}</a>
|
<a href {{action "expand"}} class='badge-category home' style={{badgeStyle}} aria-label={{i18n 'categories.category_list'}} aria-expanded={{expanded}}>{{allCategoriesLabel}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -388,6 +388,7 @@ en:
|
||||||
all_subcategories: "all"
|
all_subcategories: "all"
|
||||||
no_subcategory: "none"
|
no_subcategory: "none"
|
||||||
category: "Category"
|
category: "Category"
|
||||||
|
category_list: "Display category list"
|
||||||
reorder:
|
reorder:
|
||||||
title: "Reorder Categories"
|
title: "Reorder Categories"
|
||||||
title_long: "Reorganize the category list"
|
title_long: "Reorganize the category list"
|
||||||
|
|
Loading…
Reference in New Issue