add user-menu options with plugins
parent
a5a80bb9a8
commit
c9da356c98
|
@ -18,7 +18,7 @@
|
||||||
###
|
###
|
||||||
|
|
||||||
DropdownUserDirective = (authService, configService, locationService,
|
DropdownUserDirective = (authService, configService, locationService,
|
||||||
navUrlsService, feedbackService) ->
|
navUrlsService, feedbackService, $rootScope) ->
|
||||||
|
|
||||||
link = (scope, el, attrs, ctrl) ->
|
link = (scope, el, attrs, ctrl) ->
|
||||||
scope.vm = {}
|
scope.vm = {}
|
||||||
|
@ -33,6 +33,8 @@ DropdownUserDirective = (authService, configService, locationService,
|
||||||
scope.vm.sendFeedback = ->
|
scope.vm.sendFeedback = ->
|
||||||
feedbackService.sendFeedback()
|
feedbackService.sendFeedback()
|
||||||
|
|
||||||
|
scope.vm.userSettingsPlugins = _.filter($rootScope.userSettingsPlugins, {userMenu: true})
|
||||||
|
|
||||||
directive = {
|
directive = {
|
||||||
templateUrl: "navigation-bar/dropdown-user/dropdown-user.html"
|
templateUrl: "navigation-bar/dropdown-user/dropdown-user.html"
|
||||||
scope: {}
|
scope: {}
|
||||||
|
@ -46,7 +48,8 @@ DropdownUserDirective.$inject = [
|
||||||
"$tgConfig",
|
"$tgConfig",
|
||||||
"$tgLocation",
|
"$tgLocation",
|
||||||
"$tgNavUrls",
|
"$tgNavUrls",
|
||||||
"tgFeedbackService"
|
"tgFeedbackService",
|
||||||
|
"$rootScope"
|
||||||
]
|
]
|
||||||
|
|
||||||
angular.module("taigaNavigationBar").directive("tgDropdownUser", DropdownUserDirective)
|
angular.module("taigaNavigationBar").directive("tgDropdownUser", DropdownUserDirective)
|
||||||
|
|
|
@ -22,6 +22,15 @@ div.navbar-dropdown.dropdown-user
|
||||||
tg-nav="user-settings-user-profile",
|
tg-nav="user-settings-user-profile",
|
||||||
title="{{'PROJECT.NAVIGATION.EDIT_PROFILE_TITLE' | translate}}",
|
title="{{'PROJECT.NAVIGATION.EDIT_PROFILE_TITLE' | translate}}",
|
||||||
translate="PROJECT.NAVIGATION.EDIT_PROFILE")
|
translate="PROJECT.NAVIGATION.EDIT_PROFILE")
|
||||||
|
|
||||||
|
li(ng-repeat="plugin in vm.userSettingsPlugins")
|
||||||
|
a(
|
||||||
|
href=""
|
||||||
|
tg-nav="user-settings-contrib:plugin=plugin.slug"
|
||||||
|
ng-class="{active: plugin.slug == currentPlugin.slug}"
|
||||||
|
)
|
||||||
|
span.title {{ plugin.name }}
|
||||||
|
|
||||||
li
|
li
|
||||||
a(
|
a(
|
||||||
href="#",
|
href="#",
|
||||||
|
|
Loading…
Reference in New Issue