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('_', '-') } ]