Listing sites

<% for site in @sites %> <% background = "white" %> <% background = "grey" if (site.started==true) and (site.finished? == true) %> <% background = "lightgreen" if (site.started==true) and (site.finished? != true) %> <% end %>
Name Password Started Start time
<%=h site.name %> <%=h site.password %> <%=h site.started %> <%=h site.start_time %> <%= link_to 'Show', site %> <%= link_to 'Edit', edit_site_path(site) %> <%= link_to 'Destroy', site, :confirm => 'Are you sure?', :method => :delete %>

<%= link_to 'New site', new_site_path %>