Edition of page part for multiple languages.

This commit is contained in:
chris2tof committed 2011-05-27 11:27:54 +08:00
1 parent 0969f6b6cc
commit 2522cde2f5
13 files changed
+70 -18

No files matched your search

-10
View File
@@ -1,10 +0,0 @@
<%= flash_messages %>
<%= form_for @part, :url => admin_page_part_path(@part), :html => { :class => 'form' } do |f| %>
<%= render :partial => "admin/page_parts/form", :locals => { :f => f } %>
<p>
<%= f.submit t(:update) %> <%= link_back %>
</p>
<% end %>
@@ -0,0 +1,17 @@
<%= flash_messages %>
<%= render 'language_bar' %>
<%= form_for @part, :url => admin_page_part_path(@part), :html => { :class => 'form' } do |f| %>
<%= fields_for "page_part[i18n_variable]", @i18n_variable, :index => nil do |f| %>
<% @site_valid_locales.each do |locale| %>
<div class="ckeditor_locale" style="display:<%= @part_locale.eql?(locale) ? 'block' : 'none' %>">
<%= render :partial => "admin/page_parts/form", :locals => { :f => f, :locale => locale } %>
</div>
<% end %>
<% end %>
<p>
<%= f.submit t(:update) %> <%= link_back %>
</p>
<% end %>
+1 -1
View File
@@ -1,3 +1,3 @@
<%= f.error_messages %>
<%= f.cktext_area :content, :toolbar=>'Full', :width=>'700px', :height=>'200px' %>
<%= f.cktext_area locale, :toolbar=>'Full', :width=>'700px', :height=>'200px'%>
@@ -0,0 +1,7 @@
<%= raw(VALID_LOCALES.map{ |locale|
if @part_locale.to_s.eql?(locale)
t(:_locale, :locale => locale)
else
link_to t(:_locale, :locale => locale), edit_admin_page_part_path(@part, :part_locale => locale), :class => 'reload'
end
}.join(' | ')) %>
+1 -1
View File
@@ -2,4 +2,4 @@
<div id='sidebar'><%= render 'admin/items/site_map_left_bar' %></div>
<% end -%>
<%= render 'edit' %>
<%= render @partial %>
+1 -1
View File
@@ -1 +1 @@
$('#main').html("<%= escape_javascript(render(:partial => 'edit')) %>");
$('#main').html("<%= escape_javascript(render(:partial => @partial)) %>");