aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorMarek Labos <keraml@gmail.com>2012-09-11 01:55:54 +0200
committerPhilip Arndt <parndt@gmail.com>2012-11-23 09:57:35 +1300
commit09371c1ad5c73a2fe292f16d98987ba74550f9f9 (patch)
tree639a4a07c38980b7f70794eb16d66a57e6ef53cd /app/views
parent3e7d884dc2d7cac2efb27a291115b96c4b8b1c06 (diff)
downloadrefinerycms-blog-09371c1ad5c73a2fe292f16d98987ba74550f9f9.tar.gz
refinerycms-blog-09371c1ad5c73a2fe292f16d98987ba74550f9f9.tar.bz2
refinerycms-blog-09371c1ad5c73a2fe292f16d98987ba74550f9f9.zip
use global locale_picker partial
Diffstat (limited to 'app/views')
-rw-r--r--app/views/refinery/blog/admin/categories/_form.html.erb4
-rw-r--r--app/views/refinery/blog/admin/posts/_form.html.erb6
-rw-r--r--app/views/refinery/blog/admin/shared/_locale_picker.html.erb11
3 files changed, 5 insertions, 16 deletions
diff --git a/app/views/refinery/blog/admin/categories/_form.html.erb b/app/views/refinery/blog/admin/categories/_form.html.erb
index f2148ea..472f5d7 100644
--- a/app/views/refinery/blog/admin/categories/_form.html.erb
+++ b/app/views/refinery/blog/admin/categories/_form.html.erb
@@ -3,8 +3,8 @@
:object => f.object,
:include_object_name => true %>
- <%= render "/refinery/blog/admin/shared/locale_picker",
- :current_locale => Thread.current[:globalize_locale] %>
+ <%= render '/refinery/admin/locale_picker',
+ :current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %>
<div class='field'>
<%= f.label :title -%>
diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb
index 7b63520..5245e17 100644
--- a/app/views/refinery/blog/admin/posts/_form.html.erb
+++ b/app/views/refinery/blog/admin/posts/_form.html.erb
@@ -3,14 +3,14 @@
:object => f.object,
:include_object_name => true %>
- <%= render "/refinery/blog/admin/shared/locale_picker",
- :current_locale => Thread.current[:globalize_locale] %>
+ <%= render '/refinery/admin/locale_picker',
+ :current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %>
<div class='field'>
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
-
+
<div class='field'>
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
<ul id='page_parts'>
diff --git a/app/views/refinery/blog/admin/shared/_locale_picker.html.erb b/app/views/refinery/blog/admin/shared/_locale_picker.html.erb
deleted file mode 100644
index e162364..0000000
--- a/app/views/refinery/blog/admin/shared/_locale_picker.html.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-<input type='hidden' name='switch_locale' id='switch_locale' value='<%= local_assigns[:current_locale] %>' />
-<% if (locales ||= Refinery::I18n.frontend_locales).present? and locales.many? %>
- <ul id='switch_locale_picker' class='clearfix'>
- <% locales.each do |locale| %>
- <li<%= " class='selected'" if locale.to_s == local_assigns[:current_locale].to_s %>>
- <%= link_to refinery_icon_tag("flags/#{locale}.png", :size => "32x22"),
- refinery.url_for(:switch_locale => locale) %>
- </li>
- <% end %>
- </ul>
-<% end %>