Skip to content

Instantly share code, notes, and snippets.

@maiha
Created December 25, 2008 00:31
Show Gist options
  • Save maiha/39829 to your computer and use it in GitHub Desktop.
Save maiha/39829 to your computer and use it in GitHub Desktop.
<%- require_css "active_scaffold/default/stylesheet" -%>
<div class="active-scaffold">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<%- list_columns.each do |p| -%>
<th><%= column_header(p) %></th>
<%- end -%>
<th colspan="3">Actions</th>
</tr>
</thead>
<tbody class="records">
<%- records.each_with_index do |record, i| -%>
<%-
tr_class = (i % 2 == 0) ? "even-record" : ""
tr_class += " #{list_row_class(record)}" if respond_to? :list_row_class
-%>
<tr class="record <%=tr_class%>">
<%- list_columns.each do |p| -%>
<td><%=h column_value(record, p) %></td>
<%- end -%>
<td><%# link_to 'Show', resource(article) %></td>
<td><%# link_to 'Edit', resource(article, :edit) %></td>
<td><%# delete_button(article, "Delete #{article.title}") %></td>
</tr>
<%- end -%>
</tbody>
</table>
<%# link_to_new 'New' %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment