Orbit/app/views/admin/assets/_form.html.erb

47 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2012-05-16 22:28:29 +00:00
<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>
2012-05-16 22:28:29 +00:00
<% 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 %>
2012-05-16 22:28:29 +00:00
</div>
<div class="control-group">
<label class="control-label muted">Tag</label>
<div class="controls" data-toggle="buttons-checkbox">
2012-05-16 22:28:29 +00:00
<% @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)%>
2013-04-26 03:18:57 +00:00
<%= tag.name %>
</label>
2012-05-16 22:28:29 +00:00
<% end %>
</div>
</div>
2012-05-16 22:28:29 +00:00
<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>