<% # encoding: utf-8 %>

<%= f.error_messages %>

<div id="post-body">
	<div id="post-body-content">
		<div class="title">
		  <%= f.label :name %>
		  <%= @page_context.page.i18n_variable[I18n.locale] %>
		</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 %>
					<%= f.fields_for :context, (@page_context.new_record? ? @page_context.build_context : @page_context.context ) do |f| %>
						<%= I18nVariable.from_locale(locale) %>
						<%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea' %>
					<% 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>
