add category list label and state

This commit is contained in:
Arpit Jalan 2015-12-21 22:50:09 +05:30
parent 3e923c7a41
commit c87fff670d
3 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@ 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',

View File

@ -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}}

View File

@ -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"