Adding url strip and re-construction of http

This commit is contained in:
Will Marshall
2014-05-28 15:06:01 +10:00
parent 0c8ee2488b
commit 50c7bd55be

View File

@@ -7,14 +7,11 @@
.row
.columns.small-12.large-6{"ng-bind-html" => "producer.long_description"}
.columns.small-12.large-6
/ Will needs logic to add in following only if data is available for each type:
/ Will needs better formatting of URLs printed on-screen (minus http://www.)
/ Will needs formatting of URLs driving %a regardless of user input (plus http://www.)
%img.producer-logo{"ng-src" => "{{producer.logo}}"}
%h4 Stay in touch with {{ producer.name }}
%ul.small-block-grid-1{bindonce: true}
%li{"ng-if" => "producer.website"}
%a{"ng-href" => "{{producer.website}}", target: "_blank" }
%a{"ng-href" => "http://{{producer.website | stripUrl}}", target: "_blank" }
%i.fi-web
{{ producer.website | stripUrl }}
@@ -24,12 +21,12 @@
{{ producer.twitter }}
%li{"ng-if" => "producer.facebook"}
%a{"ng-href" => "{{producer.facebook}}", target: "_blank"}
%a{"ng-href" => "http://{{producer.facebook | stripUrl}}", target: "_blank"}
%i.fi-social-facebook
{{ producer.facebook | stripUrl }}
%li{"ng-if" => "producer.linkedin"}
%a{"ng-href" => "{{producer.linkedin}}", target: "_blank"}
%a{"ng-href" => "http://{{producer.linkedin | stripUrl}}", target: "_blank"}
%i.fi-social-linkedin
{{ producer.linkedin | stripUrl }}