diff --git a/core/app/views/refinery/admin/_locale_picker.html.erb b/core/app/views/refinery/admin/_locale_picker.html.erb new file mode 100644 index 0000000000..cf0ed4c427 --- /dev/null +++ b/core/app/views/refinery/admin/_locale_picker.html.erb @@ -0,0 +1,11 @@ + +<% if (locales ||= Refinery::I18n.frontend_locales).present? and locales.many? %> + +<% end %> diff --git a/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb b/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb index 73d49431d5..2cc30a8e99 100644 --- a/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +++ b/core/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb @@ -8,9 +8,8 @@ :include_object_name => true %> <% if localized? -%> - <%%= render "locale_picker", - :current_locale => Globalize.locale if Refinery.i18n_enabled? -%> - + <%%= render '/refinery/admin/locale_picker', + :current_locale => Globalize.locale if Refinery.i18n_enabled? %> <% end -%> <% attributes.each_with_index do |attribute, index| -%> <% if attribute.type.to_s == 'image' -%> diff --git a/core/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb b/core/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb index 927ea46ff6..1d25cff3f2 100644 --- a/core/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb +++ b/core/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb @@ -41,7 +41,6 @@ module Refinery directory "admin" do directory "rspec_product_tests" do file "_form.html.erb" - file "_locale_picker.html.erb" file "_sortable_list.html.erb" file "edit.html.erb" file "index.html.erb" diff --git a/pages/app/views/refinery/admin/pages/_form.html.erb b/pages/app/views/refinery/admin/pages/_form.html.erb index bf70809d29..25d8f63671 100644 --- a/pages/app/views/refinery/admin/pages/_form.html.erb +++ b/pages/app/views/refinery/admin/pages/_form.html.erb @@ -3,7 +3,7 @@ <%= render '/refinery/admin/error_messages', :object => @page, :include_object_name => true %> - <%= render 'locale_picker', :current_locale => Globalize.locale if Refinery.i18n_enabled? %> + <%= render '/refinery/admin/locale_picker', :current_locale => Globalize.locale if Refinery.i18n_enabled? %>
<%= f.label :title %> diff --git a/pages/app/views/refinery/admin/pages/_locale_picker.html.erb b/pages/app/views/refinery/admin/pages/_locale_picker.html.erb deleted file mode 100644 index 797c00fa25..0000000000 --- a/pages/app/views/refinery/admin/pages/_locale_picker.html.erb +++ /dev/null @@ -1,11 +0,0 @@ - -<% if (locales ||= (Refinery::I18n.frontend_locales if Refinery.i18n_enabled?)).present? && locales.many? %> - -<% end %>