app/views/administrate/application/show.html.erb in semantic-administrate-0.1.0 vs app/views/administrate/application/show.html.erb in semantic-administrate-0.1.1
- old
+ new
@@ -14,22 +14,22 @@
should be displayed.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Show
%>
-<% content_for(:title) { "#{t("administrate.actions.show")} #{page.page_title}" } %>
+<% content_for(:title) { t("administrate.actions.show_resource", name: page.page_title) } %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
<div>
<%= link_to(
- "#{t("administrate.actions.edit")} #{page.page_title}",
+ t("administrate.actions.edit_resource", name: page.page_title),
[:edit, namespace, page.resource],
class: "button",
- ) if valid_action? :edit %>
+ ) if valid_action?(:edit) && show_action?(:edit, page.resource) %>
</div>
</header>
<section class="main-content__body">
<dl>