<% # encoding: utf-8 %>

  <%= f.error_messages %>
  <%#= debugger %>
  
 <div class="field">
  <%= f.label :name %>
  <%= @page_context.page.i18n_variable[I18n.locale] %>
 </div>

 <div class="field">
  <%= f.label :context %>
  <%= f.fields_for :context, (@page_context.new_record? ? @page_context.build_context : @page_context.context ) do |f| %>
   <% @site_valid_locales.each do |locale| %>
    <td>
     <%= I18nVariable.from_locale(locale) %>
     <%= f.text_area locale, :rows => 10, :cols => 40 %>
    </td>
   <% end %>
  <% end %>
 </div>
  
  <br />
  <br />
  
  <div class="actions">
    <%= f.submit %>
  </div>


<% content_for :page_specific_javascript do %>
	<script type="text/javascript">
	  $(function() {
	    $('textarea').tinymce({
	      theme: 'advanced'
	    });
	  });
	</script>
<% end %>