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.
orbit-4-1/app/views/shared/attribute_field/_placeholder_block.html.erb

25 lines
1.6 KiB
Plaintext
Raw Normal View History

<% 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>
<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%>
<% locale_value = values[locale.to_s] rescue nil%>
<%= text_field(field_name, locale,:value=>locale_value,:placeholder=>t("langs.#{locale}")) %>
<% 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 %>