<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %>
<% @site_valid_locales.each do |locale|%>
<%#= raise @site_valid_locales.inspect %>
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => (active_when_current_locale_eq locale) %>
<% end %>
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<%= t 'admin.site_title' %>
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
<% end %>
<%= (t 'admin.site_title_help').html_safe %>
<% end %>
<% end %>
<%= t 'search.site_search' %>
<%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%>
<%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%>
<%= (t 'search.site_setting_help').html_safe %>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<%= t 'admin.site_keywords' %>
<% #TODO: set keywords into meta %>
<%= f.fields_for :keywords, @site.keywords do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s" %>
<% end %>
<%= (t 'admin.site_keywords_help').html_safe %>
<%= t 'admin.site_description' %>
<%= f.fields_for :description_translations do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description_translations[locale] %>
<% end %>
<%= (t 'admin.site_description_help').html_safe %>
<%= t 'admin.site_footer' %>
<%= f.fields_for :footer_translations do |f| %>
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] %>
<% end %>
<%= (t 'admin.site_footer_help').html_safe %>
<%= t 'admin.site_sub_menu' %>
<%= f.fields_for :sub_menu_translations do |f| %>
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] %>
<% end %>
<% end %>
<% end %>
<%= f.submit t("submit"), :class => "btn btn-primary" %>
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
<% end %>