Commit 89eb86c0c7f1d696f7154ee65a2b36c59a86c121
1 parent
df26e0f0
Exists in
master
and in
4 other branches
Add 'archived' icon at categories (themes)
Showing
3 changed files
with
32 additions
and
1 deletions
Show diff stats
src/app/components/category-list/category-list.html
@@ -18,6 +18,9 @@ | @@ -18,6 +18,9 @@ | ||
18 | <span class="category-list--label">{{::category.name}}</span> | 18 | <span class="category-list--label">{{::category.name}}</span> |
19 | <span class="category-list--icon--right glyphicon glyphicon-chevron-right hidden-xs" ng-hide="vm.selectedCategory.slug === category.slug"></span> | 19 | <span class="category-list--icon--right glyphicon glyphicon-chevron-right hidden-xs" ng-hide="vm.selectedCategory.slug === category.slug"></span> |
20 | <span class="category-list--icon--right glyphicon glyphicon-remove hidden-xs" ng-show="vm.selectedCategory.slug === category.slug"></span> | 20 | <span class="category-list--icon--right glyphicon glyphicon-remove hidden-xs" ng-show="vm.selectedCategory.slug === category.slug"></span> |
21 | + <div ng-if="category.archived" class="category-list--icon-archived"> | ||
22 | + <span class="glyphicon glyphicon-ok" aria-hidden="true"></span> | ||
23 | + </div> | ||
21 | </button> | 24 | </button> |
22 | </div> | 25 | </div> |
23 | </nav> | 26 | </nav> |
src/app/components/category-list/category-list.scss
@@ -77,6 +77,24 @@ | @@ -77,6 +77,24 @@ | ||
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | + &--icon-archived { | ||
81 | + position: absolute; | ||
82 | + width: 15px; | ||
83 | + height: 15px; | ||
84 | + font-size: 12px; | ||
85 | + bottom: 8px; | ||
86 | + left: 41px; | ||
87 | + | ||
88 | + .glyphicon { | ||
89 | + position: relative; | ||
90 | + top: -2px; | ||
91 | + color: #fff; | ||
92 | + background-color: #3FC869; | ||
93 | + padding: 3px; | ||
94 | + border-radius: 100%; | ||
95 | + } | ||
96 | + } | ||
97 | + | ||
80 | .category-list--icon { | 98 | .category-list--icon { |
81 | position: absolute; | 99 | position: absolute; |
82 | top: 6px; | 100 | top: 6px; |
src/app/pages/respostas/respostas.controller.js
@@ -64,7 +64,17 @@ | @@ -64,7 +64,17 @@ | ||
64 | // 1. Load themes | 64 | // 1. Load themes |
65 | vm.loadingThemes = true; | 65 | vm.loadingThemes = true; |
66 | vm.DialogaService.getThemes(function(themes) { | 66 | vm.DialogaService.getThemes(function(themes) { |
67 | - vm.themes = themes; | 67 | + var archivedThemes = []; |
68 | + | ||
69 | + for (var i = themes.length - 1; i >= 0; i--) { | ||
70 | + var theme = themes[i]; | ||
71 | + | ||
72 | + if(theme.archived){ | ||
73 | + archivedThemes.push(theme); | ||
74 | + } | ||
75 | + } | ||
76 | + | ||
77 | + vm.themes = archivedThemes; | ||
68 | vm.loadingThemes = false; | 78 | vm.loadingThemes = false; |
69 | vm.loading = false; | 79 | vm.loading = false; |
70 | 80 |