orbit-4-2/app/views/admin/assets/_form.html.erb

40 lines
1.7 KiB
Plaintext

<div class="input-area form-horizontal">
<div class="nav-name">
<strong>Language</strong>
</div>
<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>
<% end %>
</ul>
<div class="tab-content">
<% @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=>"height:100px", :class => '', :value => (@asset.description_translations[locale] rescue nil) %>
</div>
</div>
<% end %>
</div>
</div>
<% end %>
</div>
<div class="control-group">
<label class="control-label muted"><%= f.label :data, t(:data) %></label>
<div class="controls">
<%= f.file_field :data, :class => 'upload' %>
</div>
</div>
</div>