32 lines
1.2 KiB
Plaintext
32 lines
1.2 KiB
Plaintext
<!-- Language Tabs -->
|
|
<ul class="nav nav-pills language-nav">
|
|
<% @site_in_use_locales.each_with_index do |locale| %>
|
|
<% id = "table_entry_column_entries_#{i}_content_translations_#{locale.to_s}" %>
|
|
<% active = (locale == @site_in_use_locales.first ? "active in" : "") %>
|
|
<li class="<%= active %>">
|
|
<a data-toggle="tab" href=".<%= id %>"><%= t(locale) %></a>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<div class="tab-content language-area">
|
|
<% @site_in_use_locales.each_with_index do |locale| %>
|
|
<% id = "table_entry_column_entries_#{i}_content_translations_#{locale.to_s}" %>
|
|
<% active = (locale == @site_in_use_locales.first ? "active in" : "") %>
|
|
<div class="<%= id %> tab-pane fade <%= active %>">
|
|
<div class="control-group">
|
|
<%= f.label :content, column.title, :class => "control-label" %>
|
|
<div class="controls">
|
|
<%= f.fields_for :content_translations do |f| %>
|
|
<%= f.text_area locale, :value => editor_field.content_translations[locale.to_s], :class => "ckeditor" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% if !editor_field.new_record? %>
|
|
<%= f.hidden_field :id %>
|
|
<% else %>
|
|
<%= f.hidden_field :table_column_id, :value => column.id %>
|
|
<% end %>
|
|
</div>
|