Profile - Edit And Delete Buttons Visible Only If Permitted

This commit is contained in:
Sagi Dayan 2015-06-26 15:34:07 +03:00
parent cc3d65037d
commit 1d5cbb18cd
2 changed files with 4 additions and 6 deletions

View file

@ -91,9 +91,7 @@ angular.module('SeHub')
[28, 48, 40, 3]
];
$scope.isUser = function() {
return $scope.$parent.user.id.toString() /*The Actual User*/ === $routeParams.id /*The Profile User*/;
}
$scope.isUser = $scope.$parent.user.id.toString() /*The Actual User*/ === $routeParams.id /*The Profile User*/;
}
]);

View file

@ -17,7 +17,7 @@
<img ng-src="{{user.avatar_url}}" alt="" style="width:20%">
</div>
<div flex="70%">
<md-button class="md-raised" ng-click="changeProfileMode()" ng-if="isUser()">
<md-button class="md-raised" ng-click="changeProfileMode()" ng-if="isUser">
<i ng-class="profileModeIcon"></i> {{profileMode}}
</md-button>
</div>
@ -80,7 +80,7 @@
</div>
<div class="spacer"></div>
<div>
<md-button class="">
<md-button class="" ng-if="isUser">
X
</md-button>
</div>
@ -102,7 +102,7 @@
</div>
<div class="spacer"></div>
<div>
<md-button class="">
<md-button class="" ng-if="isUser">
X
</md-button>
</div>