app/views/admin/shared/_change_locale.html.haml in radiant-globalize2-extension-0.2.7 vs app/views/admin/shared/_change_locale.html.haml in radiant-globalize2-extension-0.2.8

- old
+ new

@@ -1,22 +1,23 @@ - @stylesheets << 'admin/globalize2' -#globalize - %input{:type => "hidden", :name => "locale", :value => Globalize2Extension.content_locale.to_s } - .edit - %span - - Globalize2Extension.locales.map do |locale| +- unless @page && @page.new_record? + #globalize + %input{:type => "hidden", :name => "locale", :value => I18n.locale.to_s } + .edit + %span + - Globalize2Extension.locales.map do |locale| - = link_to_unless(Globalize2Extension.content_locale == locale, "<img src='/images/admin/#{locale.downcase}.gif' alt='#{locale.upcase}' />", params.merge(:content_locale => locale)) - - if !@page.nil? && Globalize2Extension.content_locale == locale - - if Globalize2Extension.content_locale != Globalize2Extension.default_language - - if @page.translated_locales.include?(locale.to_sym) - %span.translated - %label{:for => "reset_translations"} - %input{:type => "checkbox", :value => "true", :name => "page[reset_translations]", :id => "reset_translations"} - Delete - =Globalize2Extension.content_locale.to_s.upcase - translation + = link_to_unless(Globalize2Extension.content_locale == locale, "<img src='/images/admin/#{locale.downcase}.gif' alt='#{locale.upcase}' />", params.merge(:content_locale => locale)) + - if !@page.nil? && Globalize2Extension.content_locale == locale + - if Globalize2Extension.content_locale != Globalize2Extension.default_language + - if @page.translated_locales.include?(locale.to_sym) + %span.translated + %label{:for => "reset_translations"} + %input{:type => "checkbox", :value => "true", :name => "page[reset_translations]", :id => "reset_translations"} + Delete + =Globalize2Extension.content_locale.to_s.upcase + translation + - else + %span.not-translated (not translated) - else - %span.not-translated (not translated) - - else - %span (default) + %span (default) \ No newline at end of file