orbit-basic/app/views/admin/assets/_form.html.erb

36 lines
1.7 KiB
Plaintext
Raw Normal View History

2012-05-16 22:28:29 +00:00
<div class="control-group">
<ul class="nav nav-pills language-nav">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? "class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
2012-05-16 22:28:29 +00:00
<% end %>
</ul>
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="control-group input-title">
<%= f.label :title , t('asset.title'), :class=>"control-label muted" %>
<div class="controls">
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class=>'post-title', :value => (@asset.title_translations[locale] rescue nil) %>
<% end %>
</div>
</div>
<div class="control-group input-content">
<%= f.label :description ,t('asset.description'), :class => "control-label muted" %>
<%= f.fields_for :description_translations do |f| %>
<div class="controls">
<div class="textarea">
<%= f.text_area locale, :style=>"width:100%;height:100px", :class => '', :value => (@asset.description_translations[locale] rescue nil) %>
</div>
</div>
<% end %>
</div>
</div>
<% end %>
2012-05-16 22:28:29 +00:00
</div>
<div class="control-group">
<label class="control-label muted"><%= f.label :data, t(:data) %></label>
2012-05-16 22:28:29 +00:00
<div class="controls">
<%= f.file_field :data, :class => 'upload' %>
</div>
</div>