<% # encoding: utf-8 %>

<%= f.error_messages %>

<div id="post-body">
	<div id="post-body-content">
		<div class="title">
		  <%= f.label :name, t(:name) %>
		  <%= @page_context.page.title %>
		</div>

		<ul class="nav nav-tabs">
			<% @site_valid_locales.each_with_index do |locale, i| %>
			<li <%= ( i == 0 ) ? "class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
			<% end %>
		</ul>
				
		<div class="tab-content">
		
			<% @site_valid_locales.each_with_index do |locale, i| %>
			
			<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">

				<div class="title">
					<%= f.label :context, t(:content) %>
					<%= f.fields_for :context_translations do |f| %>
						<%= I18nVariable.from_locale(locale) %>
						<%= f.text_area locale, :style => "width:100%;", :class => 'tinymce_textarea', :value => (@page_context.context_translations[locale] rescue nil) %>
					<% end %>
				</div>
				
			</div>
			<% end %>
			
		</div>
	</div>
</div>

<div class="form-actions">
	<%= f.submit t('submit'), :class=>'btn btn-primary' %>
	<%= link_to t('cancel'), get_go_back, :class=>"btn" %> 
</div>
