From 89eb86c0c7f1d696f7154ee65a2b36c59a86c121 Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Tue, 8 Dec 2015 13:54:33 -0200 Subject: [PATCH] Add 'archived' icon at categories (themes) --- src/app/components/category-list/category-list.html | 3 +++ src/app/components/category-list/category-list.scss | 18 ++++++++++++++++++ src/app/pages/respostas/respostas.controller.js | 12 +++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/app/components/category-list/category-list.html b/src/app/components/category-list/category-list.html index fffa7a6..26d057f 100644 --- a/src/app/components/category-list/category-list.html +++ b/src/app/components/category-list/category-list.html @@ -18,6 +18,9 @@ {{::category.name}} +
+ +
diff --git a/src/app/components/category-list/category-list.scss b/src/app/components/category-list/category-list.scss index 65d2322..90116b2 100644 --- a/src/app/components/category-list/category-list.scss +++ b/src/app/components/category-list/category-list.scss @@ -77,6 +77,24 @@ } } + &--icon-archived { + position: absolute; + width: 15px; + height: 15px; + font-size: 12px; + bottom: 8px; + left: 41px; + + .glyphicon { + position: relative; + top: -2px; + color: #fff; + background-color: #3FC869; + padding: 3px; + border-radius: 100%; + } + } + .category-list--icon { position: absolute; top: 6px; diff --git a/src/app/pages/respostas/respostas.controller.js b/src/app/pages/respostas/respostas.controller.js index 8e7286f..7084157 100644 --- a/src/app/pages/respostas/respostas.controller.js +++ b/src/app/pages/respostas/respostas.controller.js @@ -64,7 +64,17 @@ // 1. Load themes vm.loadingThemes = true; vm.DialogaService.getThemes(function(themes) { - vm.themes = themes; + var archivedThemes = []; + + for (var i = themes.length - 1; i >= 0; i--) { + var theme = themes[i]; + + if(theme.archived){ + archivedThemes.push(theme); + } + } + + vm.themes = archivedThemes; vm.loadingThemes = false; vm.loading = false; -- libgit2 0.21.2