Created
April 23, 2013 10:05
-
-
Save acuizon/5442347 to your computer and use it in GitHub Desktop.
sample change..
This file contains 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
- @data.each do |row| | |
- if row[:teams].present? | |
.row | |
.span12 | |
%h3= row[:sport].name | |
- row[:teams].each do |team| | |
- rosters = team.rosters_from_hsg_or_community(@opts[:community]) | |
- upcoming_games = team.upcoming_games(@opts) | |
- if rosters.present? | |
- rosters.each do |roster| | |
.row | |
- person = roster.person | |
.span2 | |
- if person && person.image.present? | |
= image_tag person.image_url | |
- else | |
= image_tag '140x140.gif' | |
.span6 | |
%p= show_to_link_or_text(person, {:if_none_text => "No person data"}) | |
%p= show_to_link_or_text(team) | |
%p | |
= render :partial => 'athletes_upcoming_games', :locals => {:upcoming_games => upcoming_games, :team => team} | |
%p | |
%b Graduate of: | |
- hsg = person.high_school_graduates.first if person | |
- if hsg.present? | |
= show_to_link_or_text(hsg.organization) | |
= "(Class of #{hsg.graduation_date})" | |
- else | |
= "N/A" | |
%p= person.description if person | |
%br | |
- else | |
.row | |
.span2 | |
= image_tag '140x140.gif' | |
.span6 | |
%p No rosters | |
%p= show_to_link_or_text(team) | |
%p | |
= render :partial => 'athletes_upcoming_games', :locals => {:upcoming_games => upcoming_games, :team => team} | |
%br |
This file contains 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
- @data.each do |row| | |
- if row[:teams].present? | |
%h3= row[:sport].name | |
- row[:teams].each do |team| | |
- rosters = team.rosters_from_hsg_or_community(@community) | |
- upcoming_games = team.upcoming_games(@opts) | |
- if rosters.present? | |
- rosters.each do |roster| | |
%p= show_to_link_or_text(roster.person, {:if_none_text => "No person data"}) | |
%p= show_to_link_or_text(team) | |
%p | |
= render :partial => 'athletes_upcoming_games', :locals => {:upcoming_games => upcoming_games, :team => team} | |
%p | |
%b Graduate of: | |
- hsg = roster.person.high_school_graduates.first if roster.person | |
- if hsg.present? | |
= show_to_link_or_text(hsg.organization) | |
= "(Class of #{hsg.graduation_date})" | |
- else | |
= "N/A" | |
%p= roster.person.description if roster.person | |
%hr | |
- else | |
%p No rosters | |
%p= show_to_link_or_text(team) | |
%p | |
= render :partial => 'athletes_upcoming_games', :locals => {:upcoming_games => upcoming_games, :team => team} |
This file contains 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
%b Upcoming schedule: | |
%br | |
- upcoming_games.each do |game| | |
- next unless game.home_team.present? | |
%p | |
= ap_style_date_time(game.time) | |
= "-" | |
- if team.id == game.home_id | |
= "Home" | |
versus | |
= show_to_link_or_text(game.away_team) | |
- else | |
= "Away" | |
versus | |
= show_to_link_or_text(game.home_team) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment