This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-11-03 21:56:29 +00:00
|
|
|
<% values ||=[]%>
|
|
|
|
<%= content_tag :div,:class=>"control-group language-swich #{class_ext rescue "" }" do%>
|
2012-11-27 03:15:15 +00:00
|
|
|
<label class="control-label" for=""><%= (defined? label_ext) ? label_ext : t(:placeholder) %></label>
|
2012-11-03 21:56:29 +00:00
|
|
|
<div class="controls">
|
|
|
|
<div class="tabbable">
|
|
|
|
<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%>
|
|
|
|
<%= text_field(field_name, locale,:value=>locale_value,:placeholder=>t("langs.#{locale}")) %>
|
2012-11-03 21:56:29 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<ul class="nav nav-pills ">
|
|
|
|
<% @site_valid_locales.each do |locale| %>
|
|
|
|
<% active = (locale == @site_valid_locales.first ? "active" : "'") %>
|
|
|
|
<%=content_tag :li,:class=>active do %>
|
|
|
|
<%= link_to t("langs.#{locale}"),"##{name_to_id(field_name)}_#{locale}",:data=>{:toggle=>"tab"}%>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|