Skip to content

Commit

Permalink
add some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Mar 11, 2012
1 parent 61ba883 commit 5471f11
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 29 deletions.
13 changes: 13 additions & 0 deletions TODO.markdown
Expand Up @@ -2,9 +2,22 @@
## Major

* Use de locale
* add knockout flag to game
* add score3,4,5,6 if knockout (verlaengerung, elfmeter)
* add next player/previous player nav

## Minor

* all tips - add bingo class to score in td if match, use .smaller (80%) eg .bingo.smaller and keep .bingo 100%
* add google analytics to layout
* add forms for teams
* use class buttons plus div for buttons to remove in print

## Cleanup

* Rename module Euro2012 to Wettpool (to match new project name)
* Move error_messages to shared partial
* Use fmt_date helper for date display
* Remove [] from view for calculated teams (is now part of team name)

* Use autofocus and :focus (HTML5) instead of class .focus (does it work?)
9 changes: 8 additions & 1 deletion app/views/players/index.html.erb
Expand Up @@ -44,11 +44,18 @@
<% if tip.present? %>
<td>
<% if tip.bingo? %>
<span class='bingo'>
<% end %>
<b>
<%= if tip.score1.blank? then "-" else "#{tip.score1}" end %>
:
<%= if tip.score2.blank? then "-" else "#{tip.score2}" end %>
</b> |
</b>
<% if tip.bingo? %>
</span>
<% end %>
|
</td>
<% else %>
<td>###<!-- fehler: datensatz fehlt! --> | </td>
Expand Down
55 changes: 27 additions & 28 deletions db/seeds.rb
Expand Up @@ -7,6 +7,9 @@
# note: timezone for games (play_at) is CET (central european time)


#################################
### Champions League 2012

e2 = Event.create!( :title => 'Champions League 2012' )

t100 = Team.create!( :title => 'FC Internazionale Milano', :img => 'internazionale.png' )
Expand All @@ -19,26 +22,22 @@
t106 = Team.create!( :title => 'Real Madrid CF', :img => 'madrid.png' )
t107 = Team.create!( :title => 'PFC CSKA Moskva', :img => 'moskva.png' )

# fix: change pos to 1

group99 = GameGroup.create!( :event => e2, :pos => 0, :title => 'Achtelfinale' )

g90 = Game.create!( :pos=>1, :game_group=>group99, :team1=>t107, :team2=>t106, :play_at => '2012-02-21 20:45', :score1 => 1, :score2 => 1 )
g91 = Game.create!( :pos=>2, :game_group=>group99, :team1=>t105, :team2=>t104, :play_at => '2012-02-21 20:45', :score1 => 3, :score2 => 1 )

g92 = Game.create!( :pos=>3, :game_group=>group99, :team1=>t101, :team2=>t100, :play_at => '2012-02-22 20:45', :score1 => 1, :score2 => 0 )
g93 = Game.create!( :pos=>4, :game_group=>group99, :team1=>t103, :team2=>t102, :play_at => '2012-02-22 20:45', :score1 => 1, :score2 => 0 )
group99 = GameGroup.create!( :event => e2, :pos => 1, :title => 'Achtelfinale' )

Game.create!( :pos=>1, :game_group=>group99, :team1=>t105, :team2=>t104, :play_at => '2012-02-21 20:45', :score1 => 3, :score2 => 1 )
Game.create!( :pos=>2, :game_group=>group99, :team1=>t107, :team2=>t106, :play_at => '2012-02-21 20:45', :score1 => 1, :score2 => 1 )

# fix: change pos to 2 (or fold rueckspiele into achtelfinale)
Game.create!( :pos=>3, :game_group=>group99, :team1=>t101, :team2=>t100, :play_at => '2012-02-22 20:45', :score1 => 1, :score2 => 0 )
Game.create!( :pos=>4, :game_group=>group99, :team1=>t103, :team2=>t102, :play_at => '2012-02-22 20:45', :score1 => 1, :score2 => 0 )

group100 = GameGroup.create!( :event => e2, :pos => 1, :title => 'Achtelfinale Rückspiele' )
group100 = GameGroup.create!( :event => e2, :pos => 2, :title => 'Achtelfinale Rückspiele' )

g100 = Game.create!( :pos=>1, :game_group=>group100, :team1=>t100, :team2=>t101, :play_at => '2012-03-13 20:45' )
g101 = Game.create!( :pos=>2, :game_group=>group100, :team1=>t102, :team2=>t103, :play_at => '2012-03-13 20:45' )
Game.create!( :pos=>1, :game_group=>group100, :team1=>t100, :team2=>t101, :play_at => '2012-03-13 20:45' )
Game.create!( :pos=>2, :game_group=>group100, :team1=>t102, :team2=>t103, :play_at => '2012-03-13 20:45' )

g102 = Game.create!( :pos=>3, :game_group=>group100, :team1=>t104, :team2=>t105, :play_at => '2012-03-14 20:45' )
g103 = Game.create!( :pos=>4, :game_group=>group100, :team1=>t106, :team2=>t107, :play_at => '2012-03-14 20:45' )
Game.create!( :pos=>3, :game_group=>group100, :team1=>t104, :team2=>t105, :play_at => '2012-03-14 20:45' )
Game.create!( :pos=>4, :game_group=>group100, :team1=>t106, :team2=>t107, :play_at => '2012-03-14 20:45' )


#################################
Expand Down Expand Up @@ -129,17 +128,17 @@
################################################################
# Viertelfinale

t20 = Team.create!( :title => '1. Gruppe A', :calc => true )
t21 = Team.create!( :title => '2. Gruppe A', :calc => true )
t20 = Team.create!( :title => '[1. Gruppe A]', :calc => true )
t21 = Team.create!( :title => '[2. Gruppe A]', :calc => true )

t22 = Team.create!( :title => '1. Gruppe B', :calc => true )
t23 = Team.create!( :title => '2. Gruppe B', :calc => true )
t22 = Team.create!( :title => '[1. Gruppe B]', :calc => true )
t23 = Team.create!( :title => '[2. Gruppe B]', :calc => true )

t24 = Team.create!( :title => '1. Gruppe C', :calc => true )
t25 = Team.create!( :title => '2. Gruppe C', :calc => true )
t24 = Team.create!( :title => '[1. Gruppe C]', :calc => true )
t25 = Team.create!( :title => '[2. Gruppe C]', :calc => true )

t26 = Team.create!( :title => '1. Gruppe D', :calc => true )
t27 = Team.create!( :title => '2. Gruppe D', :calc => true )
t26 = Team.create!( :title => '[1. Gruppe D]', :calc => true )
t27 = Team.create!( :title => '[2. Gruppe D]', :calc => true )

group5 = GameGroup.create!( :event => e1, :pos => 5, :title => 'Viertelfinale' )

Expand All @@ -151,10 +150,10 @@
##############################################
# Halbfinale

t30 = Team.create!( :title => 'Sieger Viertelfinale 1', :calc => true ) # Sieger Spiel 25
t31 = Team.create!( :title => 'Sieger Viertelfinale 2', :calc => true ) # Sieger Spiel 26
t32 = Team.create!( :title => 'Sieger Viertelfinale 3', :calc => true ) # Sieger Spiel 27
t33 = Team.create!( :title => 'Sieger Viertelfinale 4', :calc => true ) # Sieger Spiel 28
t30 = Team.create!( :title => '[Sieger Viertelfinale 1]', :calc => true ) # Sieger Spiel 25
t31 = Team.create!( :title => '[Sieger Viertelfinale 2]', :calc => true ) # Sieger Spiel 26
t32 = Team.create!( :title => '[Sieger Viertelfinale 3]', :calc => true ) # Sieger Spiel 27
t33 = Team.create!( :title => '[Sieger Viertelfinale 4]', :calc => true ) # Sieger Spiel 28

group6 = GameGroup.create!( :event => e1, :pos => 6, :title => 'Halbfinale' )

Expand All @@ -165,8 +164,8 @@
################################################
# Finale

t40 = Team.create!( :title => 'Sieger Halbfinale 1', :calc => true ) # Sieger Spiel 29
t41 = Team.create!( :title => 'Sieger Halbfinale 2', :calc => true ) # Sieger Spiel 30
t40 = Team.create!( :title => '[Sieger Halbfinale 1]', :calc => true ) # Sieger Spiel 29
t41 = Team.create!( :title => '[Sieger Halbfinale 2]', :calc => true ) # Sieger Spiel 30

group7 = GameGroup.create!( :event => e1, :pos => 7, :title => 'Finale' )

Expand Down

0 comments on commit 5471f11

Please sign in to comment.