Pass the service url to tribe on send-to-tribe link
parent
5ca24aa37b
commit
e233736aea
|
@ -17,11 +17,16 @@
|
|||
# File: tribe-button.directive.coffee
|
||||
###
|
||||
|
||||
TribeButtonDirective = (configService) ->
|
||||
TribeButtonDirective = (configService, locationService) ->
|
||||
link = (scope, el, attrs) ->
|
||||
|
||||
scope.vm = {}
|
||||
scope.vm.tribeHost = configService.config.tribeHost
|
||||
scope.vm.url = "#{locationService.protocol()}://#{locationService.host()}"
|
||||
if (locationService.protocol() == "http" and locationService.port() != 80)
|
||||
scope.vm.url = "#{scope.vm.url}:#{locationService.port()}"
|
||||
else if (locationService.protocol() == "https" and locationService.port() != 443)
|
||||
scope.vm.url = "#{scope.vm.url}:#{locationService.port()}"
|
||||
|
||||
return {
|
||||
scope: {usId: "=", projectSlug: "="}
|
||||
|
@ -31,7 +36,7 @@ TribeButtonDirective = (configService) ->
|
|||
}
|
||||
|
||||
TribeButtonDirective.$inject = [
|
||||
"$tgConfig"
|
||||
"$tgConfig", "$tgLocation"
|
||||
]
|
||||
|
||||
angular.module("taigaComponents").directive("tgTribeButton", TribeButtonDirective)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
a.button-tribe(
|
||||
ng-href="{{::vm.tribeHost}}/taiga-integration/receive?project={{projectSlug}}&us={{usId}}",
|
||||
ng-href="{{::vm.tribeHost}}/taiga-integration/receive?url={{::vm.url}}&project={{projectSlug}}&us={{usId}}",
|
||||
title="{{ 'US.TRIBE.PUBLISH' | translate }}"
|
||||
target="_blank"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue