Sha256: f665c29b9a2e8fe09a9c120dbfc63900e6db55a4f4be43df2e283a2c432ad851
Contents?: true
Size: 1.28 KB
Versions: 1
Compression:
Stored size: 1.28 KB
Contents
<div class="flex justify-between"> <h1><%= resource.friendly_name.pluralize %></h1> <%= link_to "New #{resource.friendly_name}", resource.new_path %> </div> <div> <% if resource.scopes.any? %> <%= link_to "All", resource.index_path %> <% end %> <% resource.scopes.each do |scope| %> <%= link_to scope.to_s.humanize, resource.index_path(scope: scope) %> <% end %> </div> <table class="table-auto"> <thead> <tr> <% resource.attributes.each do |attribute| %> <% next if attribute[:field].nil? %> <% next unless attribute[:field].visible?(action_name) %> <th><%= sortable attribute[:name], attribute[:name].to_s.titleize %></th> <% end %> <th>Actions</th> </tr> </thead> <tbody> <% @records.each do |record| %> <tr> <% resource.attributes.each do |attribute| %> <% next if attribute[:field].nil? %> <% next unless attribute[:field].visible?(action_name) %> <% field = attribute[:field] %> <td><%= render partial: field.to_partial_path("index"), locals: { field: field, record: record } %></td> <% end %> <td><%= link_to "View", resource.show_path(record) %></td> </tr> <% end %> </tbody> </table> <%== pagy_nav(@pagy) if @pagy.pages > 1 %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
madmin-1.2.0 | app/views/madmin/application/index.html.erb |