Skip to content

Instantly share code, notes, and snippets.

@house9
Created March 23, 2010 15:28
Show Gist options
  • Save house9/341295 to your computer and use it in GitHub Desktop.
Save house9/341295 to your computer and use it in GitHub Desktop.
<%-
# see http://gist.github.com/341278 (sort_index.rb)
# see http://gist.github.com/341290 (sort_index_controller_usage.rb)
-%>
<table style="width:100%">
<thead>
<tr>
<%= @sortable.header_link('full_name', 'Name') %>
<%= @sortable.header_link('email', 'Email') %>
<%= @sortable.header_link('updated_at', 'Updated at') %>
<%= @sortable.header_link('manage', 'Manage', false) %>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4">
&nbsp;
</td>
</tr>
</tfoot>
<tbody>
<% for employee in @employees %>
<tr class="<%= cycle('oddrow', 'evenrow') %>">
<td><%= employee.full_name %></td>
<td><%= employee.email %></td>
<td><%= employee.updated_at.to_s %></td>
<td>
<%= link_to 'Edit', edit_employee_path(employee) %>
</td>
</tr>
<% end %>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment