Show More
Commit Description:
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info...
Commit Description:
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@359 6386c4cd-e34a-4fa8-8920-d93eb39b512e
File last commit:
Show/Diff file:
Action:
app/views/sites/index.html.erb | 29 lines | 806 B | text/plain | TextLexer |
<h1>Listing sites</h1>
<table>
<tr>
<th>Name</th>
<th>Password</th>
<th>Started</th>
<th>Start time</th>
</tr>
<% 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) %>
<tr style="background: <%= background %>;">
<td><%=h site.name %></td>
<td><%=h site.password %></td>
<td><%=h site.started %></td>
<td><%=h site.start_time %></td>
<td><%= link_to 'Show', site %></td>
<td><%= link_to 'Edit', edit_site_path(site) %></td>
<td><%= link_to 'Destroy', site, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New site', new_site_path %>