Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Move athletes table to partial #10

Merged
merged 1 commit into from over 1 year ago

2 participants

Dave Kroondyk Mike Munroe
Dave Kroondyk

We don't want update this table in two spots every time.

Mike Munroe mikepmunroe merged commit be5d0fd into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 20, 2013
Dave Kroondyk move athletes table to partial 321bea6
This page is out of date. Refresh to see the latest.
32 app/views/shared/_athletes.html.erb
... ... @@ -0,0 +1,32 @@
  1 +<h1>Athletes</h1>
  2 +<table class="table table-striped">
  3 + <thead>
  4 + <tr>
  5 + <th>Name</th>
  6 + <th>Affiliate</th>
  7 + <th>Age</th>
  8 + <th>13.1</th>
  9 + <th>13.2</th>
  10 + <th>13.3</th>
  11 + <th>13.4</th>
  12 + <th>13.5</th>
  13 + <th>Total</th>
  14 + </tr>
  15 + </thead>
  16 + <tbody>
  17 + <% athletes.each do |athlete| %>
  18 + <tr>
  19 + <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
  20 + <td><%= athlete.affiliate %></td>
  21 + <td><%= athlete.age %></td>
  22 + <td><%= athlete.w1 %></td>
  23 + <td><%= athlete.w2 %></td>
  24 + <td><%= athlete.w3 %></td>
  25 + <td><%= athlete.w4 %></td>
  26 + <td><%= athlete.w5 %></td>
  27 + <td><%= athlete.total %></td>
  28 + </tr>
  29 + <% end %>
  30 + </tbody>
  31 +</table>
  32 +
32 app/views/southie/index.html.erb
... ... @@ -1,32 +1,2 @@
1   -<h1>Athletes</h1>
2   -<table class="table table-striped">
3   - <thead>
4   - <tr>
5   - <th>Name</th>
6   - <th>Affiliate</th>
7   - <th>Age</th>
8   - <th>13.1</th>
9   - <th>13.2</th>
10   - <th>13.3</th>
11   - <th>13.4</th>
12   - <th>13.5</th>
13   - <th>Total</th>
14   - </tr>
15   - </thead>
16   - <tbody>
17   - <% @athletes.each do |athlete| %>
18   - <tr>
19   - <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
20   - <td><%= athlete.affiliate %></td>
21   - <td><%= athlete.age %></td>
22   - <td><%= athlete.w1 %></td>
23   - <td><%= athlete.w2 %></td>
24   - <td><%= athlete.w3 %></td>
25   - <td><%= athlete.w4 %></td>
26   - <td><%= athlete.w5 %></td>
27   - <td><%= athlete.total %></td>
28   - </tr>
29   - <% end %>
30   - </tbody>
31   -</table>
  1 +<%= render :partial => 'shared/athletes', :object => @athletes %>
32 2
32 app/views/wicked/index.html.erb
... ... @@ -1,32 +1,2 @@
1   -<h1>Athletes</h1>
2   -<table class="table table-striped">
3   - <thead>
4   - <tr>
5   - <th>Name</th>
6   - <th>Affiliate</th>
7   - <th>Age</th>
8   - <th>13.1</th>
9   - <th>13.2</th>
10   - <th>13.3</th>
11   - <th>13.4</th>
12   - <th>13.5</th>
13   - <th>Total</th>
14   - </tr>
15   - </thead>
16   - <tbody>
17   - <% @athletes.each do |athlete| %>
18   - <tr>
19   - <td><%= link_to athlete.name, "http://games.crossfit.com#{athlete.url}" %></td>
20   - <td><%= athlete.affiliate %></td>
21   - <td><%= athlete.age %></td>
22   - <td><%= athlete.w1 %></td>
23   - <td><%= athlete.w2 %></td>
24   - <td><%= athlete.w3 %></td>
25   - <td><%= athlete.w4 %></td>
26   - <td><%= athlete.w5 %></td>
27   - <td><%= athlete.total %></td>
28   - </tr>
29   - <% end %>
30   - </tbody>
31   -</table>
  1 +<%= render :partial => 'shared/athletes', :object => @athletes %>
32 2

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.