47 lines
2.1 KiB
Plaintext
47 lines
2.1 KiB
Plaintext
<div class="control-group">
|
|
<ul class="nav nav-pills language-nav">
|
|
<% @site_valid_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>
|
|
<% @site_valid_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 %>
|
|
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label muted">Tag</label>
|
|
<div class="controls" data-toggle="buttons-checkbox">
|
|
<% @tags.each do |tag| %>
|
|
<label class="checkbox inline btn <%= 'active' if @asset.tag_ids.include?(tag.id) %>">
|
|
<%= check_box_tag 'asset[tag_ids][]', tag.id, @asset.tag_ids.include?(tag.id)%>
|
|
<%= tag.name %>
|
|
</label>
|
|
<% end %>
|
|
</div>
|
|
</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> |