mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
24 lines
678 B
Plaintext
24 lines
678 B
Plaintext
Application.Directives.directive 'socialLink', [ ->
|
|
{
|
|
restrict: 'E'
|
|
scope:
|
|
network: '@?'
|
|
user: '='
|
|
templateUrl: '<%= asset_path "shared/_social_link.html" %>'
|
|
link: (scope, element, attributes) ->
|
|
if scope.network == 'dailymotion'
|
|
scope.image = "<%= asset_path('social/dailymotion.png') %>"
|
|
scope.altText = 'd'
|
|
else if scope.network == 'echosciences'
|
|
scope.image = "<%= asset_path('social/echosciences.png') %>"
|
|
scope.altText = 'E)'
|
|
else
|
|
if scope.network == 'website'
|
|
scope.faClass = 'fa-globe'
|
|
else
|
|
scope.faClass = 'fa-'+scope.network.replace('_', '-')
|
|
}
|
|
]
|
|
|
|
|