fix form language tab order
This commit is contained in:
parent
9b8febb80b
commit
535fff1a66
|
@ -4,9 +4,9 @@
|
||||||
<%= form_for @page_content, :url => {:action => :create}, :html => {:class => 'form-horizontal main-forms'} do |f| %>
|
<%= form_for @page_content, :url => {:action => :create}, :html => {:class => 'form-horizontal main-forms'} do |f| %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
<div class="nav-name"><strong>Language</strong></div>
|
<div class="nav-name"><strong><%= t(:language) %></strong></div>
|
||||||
<ul class="nav nav-pills language-nav">
|
<ul class="nav nav-pills language-nav">
|
||||||
<% I18n.available_locales.each_with_index do |locale, i| %>
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||||
<li <%= (i == 0 ? 'class=active' : '') %>>
|
<li <%= (i == 0 ? 'class=active' : '') %>>
|
||||||
<a href=".<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %></a>
|
<a href=".<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %></a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -14,12 +14,12 @@
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content language-area">
|
<div class="tab-content language-area">
|
||||||
<!-- Language Tabs -->
|
<!-- Language Tabs -->
|
||||||
<% I18n.available_locales.each_with_index do |locale, i| %>
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||||
|
|
||||||
<div class="tab-pane fade in <%= (i == 0 ? 'active' : '') %> <%= locale %>">
|
<div class="tab-pane fade in <%= (i == 0 ? 'active' : '') %> <%= locale %>">
|
||||||
<div class="control-group input-content">
|
<div class="control-group input-content">
|
||||||
<%= f.fields_for :content_translations do |con| %>
|
<%= f.fields_for :content_translations do |con| %>
|
||||||
<%= label_tag(locale, "Content", :class=>"control-label muted") %>
|
<%= label_tag(locale, t(:content), :class=>"control-label muted") %>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<%= con.text_area locale, :class => "ckeditor input-block-level", :value => (@page.page_contexts.last.content_translations[locale] rescue nil)%>
|
<%= con.text_area locale, :class => "ckeditor input-block-level", :value => (@page.page_contexts.last.content_translations[locale] rescue nil)%>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<%= f.hidden_field :page_id, :value=>@page.id.to_s %>
|
<%= f.hidden_field :page_id, :value=>@page.id.to_s %>
|
||||||
<%= f.hidden_field :version, :value=>((@page.page_contexts.last.version + 1) rescue 1)%>
|
<%= f.hidden_field :version, :value=>((@page.page_contexts.last.version + 1) rescue 1)%>
|
||||||
<%= f.submit t("page_content.save"), :class=> "btn btn-primary bt-form-save" %>
|
<%= f.submit t("save"), :class=> "btn btn-primary bt-form-save" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
Loading…
Reference in New Issue