Commit 0aae6e92e1ea2eb8feef52e4235b3711ec659926
1 parent
b4c9d406
Exists in
master
and in
1 other branch
Fix content viewer navbar action
Showing
2 changed files
with
7 additions
and
3 deletions
Show diff stats
src/app/content-viewer/content-viewer-actions.controller.js
| @@ -7,14 +7,18 @@ | @@ -7,14 +7,18 @@ | ||
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | /** @ngInject */ | 9 | /** @ngInject */ |
| 10 | - function ContentViewerActionsController(noosfero) { | 10 | + function ContentViewerActionsController(noosfero, $scope) { |
| 11 | var vm = this; | 11 | var vm = this; |
| 12 | vm.article = null; | 12 | vm.article = null; |
| 13 | vm.profile = null; | 13 | vm.profile = null; |
| 14 | activate(); | 14 | activate(); |
| 15 | 15 | ||
| 16 | function activate() { | 16 | function activate() { |
| 17 | - vm.profile = noosfero.currentProfile; | 17 | + $scope.$watch(function() { return noosfero.currentProfile }, |
| 18 | + function() { | ||
| 19 | + vm.profile = noosfero.currentProfile; | ||
| 20 | + } | ||
| 21 | + ); | ||
| 18 | } | 22 | } |
| 19 | } | 23 | } |
| 20 | })(); | 24 | })(); |
src/app/content-viewer/navbar-actions.html
| 1 | <ul class="nav navbar-nav navbar-right"> | 1 | <ul class="nav navbar-nav navbar-right"> |
| 2 | - <li> | 2 | + <li ng-show="vm.profile"> |
| 3 | <a href="#" role="button" ui-sref="main.profile.cms({profile: vm.profile.identifier})"> | 3 | <a href="#" role="button" ui-sref="main.profile.cms({profile: vm.profile.identifier})"> |
| 4 | <span class="fa-stack"> | 4 | <span class="fa-stack"> |
| 5 | <i class="fa fa-file-o fa-stack-2x"></i> | 5 | <i class="fa fa-file-o fa-stack-2x"></i> |