diff options
Diffstat (limited to 'app/views/refinery/blog/admin/shared')
-rw-r--r-- | app/views/refinery/blog/admin/shared/_locale_picker.html.erb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/views/refinery/blog/admin/shared/_locale_picker.html.erb b/app/views/refinery/blog/admin/shared/_locale_picker.html.erb new file mode 100644 index 0000000..e162364 --- /dev/null +++ b/app/views/refinery/blog/admin/shared/_locale_picker.html.erb @@ -0,0 +1,11 @@ +<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 %> |