Permalink
Browse files

move td game and tip views to shared for easier reuse

  • Loading branch information...
1 parent f188e22 commit 424c759f5bdfd767590c66b7328e6aac72107cb7 @geraldb geraldb committed Oct 1, 2012
@@ -10,29 +10,29 @@
<% if tip.present? %>
<% if game.over? || tip.locked? %>
<!-- fix/todo: add a flag/icon for locked? game over? -->
- <%= render :partial => 'td_tip_toto12x', :locals => { :tip => tip } %>
- <%= render :partial => 'td_tip_bingo', :locals => { :tip => tip } %>
- <%= render :partial => 'td_game_team1', :locals => { :game => game } %>
- <%= render :partial => 'td_tip_score', :locals => { :tip => tip } %>
- <%= render :partial => 'td_game_score', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_tip_toto12x', :locals => { :tip => tip } %>
+ <%= render :partial => 'shared/td_tip_bingo', :locals => { :tip => tip } %>
+ <%= render :partial => 'shared/td_game_team1', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_tip_score', :locals => { :tip => tip } %>
+ <%= render :partial => 'shared/td_game_score', :locals => { :game => game } %>
<% else %>
<td><!-- no tip.toto12x yet --></td>
<td><!-- no tip.bingo yet --></td>
- <%= render :partial => 'td_game_team1', :locals => { :game => game } %>
- <%= render :partial => 'td_tip_score_input',
+ <%= render :partial => 'shared/td_game_team1', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_tip_score_input',
:locals => { :tip => tip,
:tabindex => tabindex,
:f => f } %>
<td><!-- no game.score yet --></td>
<% end %>
- <%= render :partial => 'td_game_team2', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_team2', :locals => { :game => game } %>
<% else %> <!-- no tip present -->
<td><!-- no tip.toto12x yet --></td>
<td><!-- no tip.bingo yet --></td>
- <%= render :partial => 'td_game_team1', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_team1', :locals => { :game => game } %>
<td class='tip-score'>♦<!-- fehler: tip datensatz fehlt! --></td>
- <%= render :partial => 'td_game_score', :locals => { :game => game } %>
- <%= render :partial => 'td_game_team2', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_score', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_team2', :locals => { :game => game } %>
<% end %>
@@ -67,6 +67,6 @@
<% end %>
</td>
- <%= render :partial => 'td_game_date', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_date', :locals => { :game => game } %>
</tr>
@@ -151,7 +151,7 @@
<% end %>
</td>
- <%= render :partial => 'td_game_team1', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_team1', :locals => { :game => game } %>
<% @users.each do |user| %>
<% tip = Tip.find_by_user_and_pool_and_game( user, @pool, game ) %>
@@ -186,9 +186,9 @@
<% end %><!-- users.each -->
- <%= render :partial => 'td_game_score', :locals => { :game => game } %>
- <%= render :partial => 'td_game_team2', :locals => { :game => game } %>
- <%= render :partial => 'td_game_date', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_score', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_team2', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_date', :locals => { :game => game } %>
</tr>
<% end %> <!-- games.each -->
<% end %> <!-- if pool.flex? && round.calc? -->
@@ -111,13 +111,13 @@
%>
<tr>
- <%= render :partial => 'td_tip_toto12x', :locals => { :tip => tip } %>
- <%= render :partial => 'td_tip_bingo', :locals => { :tip => tip } %>
- <%= render :partial => 'td_game_team1', :locals => { :game => game } %>
- <%= render :partial => 'td_tip_score', :locals => { :tip => tip } %>
- <%= render :partial => 'td_game_score', :locals => { :game => game } %>
- <%= render :partial => 'td_game_team2', :locals => { :game => game } %>
- <%= render :partial => 'td_game_date', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_tip_toto12x', :locals => { :tip => tip } %>
+ <%= render :partial => 'shared/td_tip_bingo', :locals => { :tip => tip } %>
+ <%= render :partial => 'shared/td_game_team1', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_tip_score', :locals => { :tip => tip } %>
+ <%= render :partial => 'shared/td_game_score', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_team2', :locals => { :game => game } %>
+ <%= render :partial => 'shared/td_game_date', :locals => { :game => game } %>
</tr>
<% end %> <!-- games -->

0 comments on commit 424c759

Please sign in to comment.