universal_table/app/views/admin/universal_tables/_index.html.erb

32 lines
934 B
Plaintext
Raw Normal View History

2015-11-13 13:10:00 +00:00
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @tables.each do |table| %>
<tr>
<td>
<a href="<%= admin_universal_table_path(table) %>"><%= table.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(table) %>
<li><a href="<%= edit_admin_universal_table_path(table) %>"><%= t(:edit) %></a></li>
<li><a href="<%= admin_universal_table_path(table) %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td>
<%= table.created_at.strftime("%Y-%m-%d") %>
</td>
<td>
<%= table.table_entries.count %>
</td>
</tr>
<% end %>
</tbody>
</table>