2012-11-03 21:56:29 +00:00
|
|
|
<% values ||=[]%>
|
2013-08-09 07:07:05 +00:00
|
|
|
<%= content_tag :div,:class=>"control-group" do%>
|
|
|
|
<label class="control-label muted" for=""><%= (defined? label_ext) ? label_ext : t(:placeholder) %></label>
|
2012-11-03 21:56:29 +00:00
|
|
|
<div class="controls">
|
2013-08-09 07:07:05 +00:00
|
|
|
<div class="input-append">
|
2012-11-03 21:56:29 +00:00
|
|
|
<div class="tab-content">
|
|
|
|
<% @site_valid_locales.each do |locale| %>
|
|
|
|
<% active = (locale == @site_valid_locales.first ? "active in" : "'") %>
|
|
|
|
<%= content_tag :div,:class=>"tab-pane fade #{active}",:id=>"#{name_to_id(field_name)}_#{locale}" do%>
|
2012-11-22 09:49:44 +00:00
|
|
|
<% locale_value = values[locale.to_s] rescue nil%>
|
2013-08-09 07:07:05 +00:00
|
|
|
<%= text_field(field_name, locale,:value=>locale_value,:placeholder=>I18nVariable.from_locale(locale),:data=>{:type=>"lang_#{locale}"}) %>
|
2012-11-03 21:56:29 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2013-08-09 07:07:05 +00:00
|
|
|
|
|
|
|
<div class="btn-group" data-toggle="buttons-radio">
|
|
|
|
<% @site_valid_locales.each do |locale| %>
|
|
|
|
<% active = (locale == @site_valid_locales.first ? "active" : "") %>
|
|
|
|
<%= link_to I18nVariable.from_locale(locale),"##{name_to_id(field_name)}_#{locale}",:class=>"btn #{active}",:data=>{:toggle=>"tab"}%>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2012-11-03 21:56:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|