Sha256: 198935632d225d7e62d8f4568cdafb3bceebd17687024993255123ff2fbc0c19
Contents?: true
Size: 1.22 KB
Versions: 41
Compression:
Stored size: 1.22 KB
Contents
<h1><%= @title.pluralize %></h1> <section> <% unless @records.empty? %> <table> <% @records.each do |record| %> <tr> <td> <a href="<%= url_prefix %>admin/<%= @plural %>/<%= record.id %>"><%= record.name %></a> </td> <td> <% if !record.respond_to?(:can_delete?) || record.can_delete? %> <form class="delete-row" action="<%= url_prefix %>admin/<%= @plural %>/<%= record.id %>" method="POST"> <input type="hidden" name="_method" value="DELETE"> <input type="submit" value="Delete"> </form> <% end %> </td> </tr> <% end %> </table> <% else %> <p>No <%= @plural %></p> <% end %> </section> <p class="actions"><a href="<%= url_prefix %>admin/<%= @plural %>/new">New <%= @title.downcase %></a></p> <script> $('form.delete-row').submit(function(event) { if (!confirm('Are you sure you want to delete this <%= @singular %>?')) event.preventDefault(); }); </script>
Version data entries
41 entries across 41 versions & 1 rubygems