app/views/administrate/application/_collection.html.erb in administrate-0.13.0 vs app/views/administrate/application/_collection.html.erb in administrate-0.14.0
- old
+ new
@@ -53,22 +53,24 @@
</thead>
<tbody>
<% resources.each do |resource| %>
<tr class="js-table-row"
- tabindex="0"
- <% if valid_action? :show, collection_presenter.resource_name %>
- <%= %(role=link data-url=#{polymorphic_path([namespace, resource])}) %>
+ <% if show_action? :show, resource %>
+ <%= %(tabindex=0 role=link data-url=#{polymorphic_path([namespace, resource])}) %>
<% end %>
>
<% collection_presenter.attributes_for(resource).each do |attribute| %>
<td class="cell-data cell-data--<%= attribute.html_class %>">
<% if show_action? :show, resource -%>
<a href="<%= polymorphic_path([namespace, resource]) -%>"
+ tabindex="-1"
class="action-show"
>
<%= render_field attribute %>
</a>
+ <% else %>
+ <%= render_field attribute %>
<% end -%>
</td>
<% end %>
<% if valid_action? :edit, collection_presenter.resource_name %>