Created
July 29, 2013 18:12
-
-
Save anonymous/6106347 to your computer and use it in GitHub Desktop.
Player html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- player_url = URI.encode('http://'+request.host_with_port + player.url) | |
- player_title = "AmericanSoccerNow: #{player.title}" | |
- player_description = player.dek | |
.detail | |
.left | |
- if player.hero_image and player.hero_image.attached | |
= image_tag player.hero_image.attached.url, :height => 240, :width => 200 | |
%span.imageCaption | |
= player.hero_image.credit.try(:html_safe) | |
- else | |
= image_tag "http://placehold.it/200x240", :height => 240, :width => 200 | |
- unless player.relatables.external_videos.empty? | |
- player.relatables.external_videos.each do |video| | |
.block | |
= image_tag video.preview_image, :class => 'video_preview', :width => 200, :height => 150, :data => {'youtube-id' => video.youtube_id, :player_id => player.slug, :player_rank => @rank} | |
.video_embed{:style => 'display:none;', :data => {'youtube-id' => video.youtube_id}} | |
= video.movie_embed.html_safe | |
%p.meta | |
= video.title | |
#secretSocial | |
%ul.socialIcons | |
= render '/shared/player_addthis', :url => player_url, :title => player_title, :description => player_description, :show_print => true | |
.right.arct | |
%h2.player | |
- unless @rank.nil? | |
%span.red | |
= "##{@rank}" | |
= player.title | |
%ul | |
%li | |
%span | |
DOB | |
= player.birth_date.try(:strftime, '%B %e, %Y') | |
%li | |
%span | |
Age | |
= player.age | |
- if player.birth_place.present? | |
%li | |
%span | |
Place of birth | |
= player.birth_place | |
%li | |
%span POSITION | |
= player.human_readable_position | |
%li | |
%span HEIGHT | |
= display_feet(player.height) | |
%li | |
%span WEIGHT | |
= player.weight | |
%li | |
%span U.S. CAPS | |
= player.us_caps | |
- if player.club.present? | |
%li | |
%span CLUB | |
= player.club.name | |
- if player.twitter_handle.present? | |
%li | |
%span | |
= link_to "@#{player.twitter_handle}", "http://twitter.com/#{player.twitter_handle}", :target => '_blank' | |
= "(#{humanize_twitter_followers(player.twitter_followers)} followers)" | |
- @asns.each do |asn| | |
- if rank = asn.player_rank(player) | |
- if rank > 100 | |
- ranking = 'unranked' | |
- else | |
- ranking = "ranked #{rank}" | |
- else | |
- ranking = 'unranked' | |
%li | |
%span= "#{asn.asn_month.strftime('%b %Y')}: #{ranking}" | |
- if player.youth_experience.present? | |
%li | |
%span Youth Experience | |
= player.youth_experience | |
- if player.contract_status.present? | |
%li | |
%span Contract Status | |
= player.contract_status | |
- if player.questionnaire.present? | |
%li | |
%span ASN QUESTIONNAIRE | |
= link_to "Read now", player.questionnaire.url | |
= player.body.try(:html_safe) | |
- unless player.relatables.external_links.empty? | |
%h4 Noteworthy Reads | |
- player.relatables.external_links.each do |external_link| | |
= link_to external_link.title, external_link.url, :target => '_blank' | |
%br | |
.clear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment