Issue 2772 - projects tab mustn't appear in your profile

stable
Juanfran 2015-06-01 08:24:18 +02:00
parent e5106c830d
commit 00070ebc24
3 changed files with 6 additions and 4 deletions

View File

@ -9,6 +9,7 @@ ProfileTabDirective = () ->
scope.tab.icon = attrs.tabIcon
scope.tab.active = !!attrs.tabActive
if scope.$eval(attrs.tabDisabled) != false
ctrl.addTab(scope.tab)
return {
@ -16,8 +17,7 @@ ProfileTabDirective = () ->
scope: {},
require: "^tgProfileTabs",
link: link,
transclude: true,
replace: true
transclude: true
}
angular.module("taigaProfile")

View File

@ -7,6 +7,8 @@ class ProfilePageController extends taiga.Controller
]
constructor: (@appTitle, @currentUserService, @routeParams, @userService) ->
@.isCurrentUser = false
if @routeParams.slug
@userService
.getUserByUserName(@routeParams.slug)

View File

@ -6,7 +6,7 @@ div.profile.centered(ng-if="vm.user")
div(tg-profile-tab="activity", tab-title="{{'USER.PROFILE.ACTIVITY_TAB' | translate}}", tab-icon="icon-timeline", tab-active)
div(tg-user-timeline, userId="vm.user.get('id')")
div(tg-profile-tab="projects", tab-title="{{'USER.PROFILE.PROJECTS_TAB' | translate}}", tab-icon="icon-project")
div(tab-disabled="{{vm.isCurrentUser}}", tg-profile-tab="projects", tab-title="{{'USER.PROFILE.PROJECTS_TAB' | translate}}", tab-icon="icon-project")
div(tg-profile-projects, userId="vm.user.get('id')")
div(tg-profile-tab="contacts", tab-title="{{'USER.PROFILE.CONTACTS_TAB' | translate}}", tab-icon="icon-team")