Sha256: d99499c25bdeb2307d51ff7679e5e7cd51a15e46f6b5ef346badbad474fe64c1

Contents?: true

Size: 1.83 KB

Versions: 1

Compression:

Stored size: 1.83 KB

Contents

<h3><%= @event.full_title %></h3>


<h4><%= @event.teams.count %> Teams</h4>

<table>
 <% @event.teams.each do |team| %>

 <tr>
 <td>
     <%= logo_for_team( team ) %>
     <%= link_to_team( team ) %>
     <%= "(#{team.code})" if team.code.present? %>

    <td>
       <%= team.title2  if team.title2.present? %>
    </td>
     <td>
      <%= render_team_world_tree( team ) %>
     </td>
 </tr>
<% end %><!-- teams.each -->
</table>


<% if @event.groups.count > 0 %>
<h4><%= @event.groups.count %> Groups</h4>

<p>
<% @event.groups.each_with_index do |group,i| %>
  <% if i > 0 %>
    &bull;
  <% end %>
  <%= group.title %>
<% end %>
</p>

<table>
<% @event.groups.each do |group| %>
<tr>
 <td>
  <%= group.title %> | 
 </td>
  <% group.teams.each do |team| %>

   <td>
    <%= logo_for_team( team ) %>
    <%= link_to_team( team ) %>
   </td>
  <% end %>
</tr>
<% end %>
</table>

<% end %> <!-- if event.groups.count > 0 -->

<!-- add games count -- how? --> 
<h4><%= @event.games.count %> Games</h4>

<p>
<!-- todo: add anchors for intra page links -->
<% @event.rounds.each_with_index do |round,i| %>
  <% if i > 0 %>
    &bull;
  <% end %>
  <%= round.title %>
<% end %>
</p>


<!-- todo: use different css class e.g. db?? -->
<table class='play'>
  
<% @event.rounds.each do |round| %>
<tr class='game-round'>
  <td colspan='6' class='game-round-title'>
     <%= round.title %>
     <%= "/ #{round.title2}" if round.title2.present? %>
  </td>
</tr>



   <% round.games.each do |game| %>
    <tr>
     
<%= render_game_date( game ) %>
<%= render_game_team1( game ) %>
<%= render_game_score( game ) %>
<%= render_game_team2( game ) %>

    <td>
      <!-- todo: move to partial -->
      <%= "(#{game.group.title})" if game.group.present? %>
    </td>

<%= render_game_flags( game ) %>
        
     </tr>
  <% end %> <!-- games -->
<% end %> <!-- rounds -->

</table>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sportdb-admin-0.2.0 app/views/sport_db_admin/events/show.html.erb