Commit 0aae6e92e1ea2eb8feef52e4235b3711ec659926

Authored by Victor Costa
1 parent b4c9d406
Exists in master and in 1 other branch dev-fixes

Fix content viewer navbar action

src/app/content-viewer/content-viewer-actions.controller.js
... ... @@ -7,14 +7,18 @@
7 7  
8 8  
9 9 /** @ngInject */
10   - function ContentViewerActionsController(noosfero) {
  10 + function ContentViewerActionsController(noosfero, $scope) {
11 11 var vm = this;
12 12 vm.article = null;
13 13 vm.profile = null;
14 14 activate();
15 15  
16 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 1 <ul class="nav navbar-nav navbar-right">
2   - <li>
  2 + <li ng-show="vm.profile">
3 3 <a href="#" role="button" ui-sref="main.profile.cms({profile: vm.profile.identifier})">
4 4 <span class="fa-stack">
5 5 <i class="fa fa-file-o fa-stack-2x"></i>
... ...