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,15 +9,15 @@ ProfileTabDirective = () ->
scope.tab.icon = attrs.tabIcon scope.tab.icon = attrs.tabIcon
scope.tab.active = !!attrs.tabActive scope.tab.active = !!attrs.tabActive
ctrl.addTab(scope.tab) if scope.$eval(attrs.tabDisabled) != false
ctrl.addTab(scope.tab)
return { return {
templateUrl: "profile/profile-tab/profile-tab.html", templateUrl: "profile/profile-tab/profile-tab.html",
scope: {}, scope: {},
require: "^tgProfileTabs", require: "^tgProfileTabs",
link: link, link: link,
transclude: true, transclude: true
replace: true
} }
angular.module("taigaProfile") angular.module("taigaProfile")

View File

@ -7,6 +7,8 @@ class ProfilePageController extends taiga.Controller
] ]
constructor: (@appTitle, @currentUserService, @routeParams, @userService) -> constructor: (@appTitle, @currentUserService, @routeParams, @userService) ->
@.isCurrentUser = false
if @routeParams.slug if @routeParams.slug
@userService @userService
.getUserByUserName(@routeParams.slug) .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-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-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-projects, userId="vm.user.get('id')")
div(tg-profile-tab="contacts", tab-title="{{'USER.PROFILE.CONTACTS_TAB' | translate}}", tab-icon="icon-team") div(tg-profile-tab="contacts", tab-title="{{'USER.PROFILE.CONTACTS_TAB' | translate}}", tab-icon="icon-team")