Update pages controller and views

Added new attribute `locale` to pages index list and form.
This commit is contained in:
María Checa
2017-07-02 14:49:56 +02:00
parent d5560ddabd
commit 720a2af046
3 changed files with 8 additions and 1 deletions

View File

@@ -38,7 +38,8 @@ class Admin::SiteCustomization::PagesController < Admin::SiteCustomization::Base
:content,
:more_info_flag,
:print_content_flag,
:status
:status,
:locale
)
end
end

View File

@@ -30,6 +30,10 @@
<br>
<% end %>
</div>
<div class="small-12 medium-4 column">
<%= f.label :locale %>
<%= f.select :locale, I18n.available_locales, { default: nil, label: false, include_blank: true } %>
</div>
<div class="small-12 medium-4 column">
<%= f.label :slug %>
<%= f.text_field :slug, label: false, size: 80, maxlength: 80 %>

View File

@@ -15,6 +15,7 @@
<th><%= t("admin.site_customization.pages.page.created_at") %></th>
<th><%= t("admin.site_customization.pages.page.updated_at") %></th>
<th><%= t("admin.site_customization.pages.page.status") %></th>
<th><%= t("admin.site_customization.pages.page.locale") %></th>
<th colspan="2"><%= t("admin.actions.actions") %></th>
</tr>
</thead>
@@ -27,6 +28,7 @@
<td><%= I18n.l page.created_at, format: :short %></td>
<td><%= I18n.l page.created_at, format: :short %></td>
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
<td><%= page.locale %></td>
<td class="small">
<span class="icon-eye"></span>
<% if page.status == "published" %>