app/views/administrate/application/index.html.erb in administrate-0.1.1 vs app/views/administrate/application/index.html.erb in administrate-0.1.2
- old
+ new
@@ -19,11 +19,13 @@
A string containing the term the user has searched for, if any.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Table
%>
-<% content_for(:title) { page.resource_name.pluralize.titleize } %>
+<% content_for(:title) do %>
+ <%= display_resource_name(page.resource_name) %>
+<% end %>
<% content_for(:search) do %>
<form class="search">
<span class="search__icon">
<%= inline_svg "administrate/search.svg" %>
@@ -41,14 +43,16 @@
</form>
<% end %>
<header class="header">
<h1 class="header-heading"><%= content_for(:title) %></h1>
- <%= link_to(
- "New #{page.resource_name.titleize.downcase}",
- [:new, Administrate::NAMESPACE, page.resource_name],
- class: "button",
- ) %>
+ <div class="header-actions">
+ <%= link_to(
+ "New #{page.resource_name.titleize.downcase}",
+ [:new, Administrate::NAMESPACE, page.resource_name],
+ class: "button",
+ ) %>
+ </div>
</header>
<%= render "collection", collection_presenter: page, resources: resources %>
<%= paginate resources %>