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

39 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-05-16 22:28:29 +00:00
<div class="control-group">
<label for="title" class="control-label"><%= t 'admin.title' %></label>
<div class="controls">
2012-07-25 21:58:09 +00:00
<%= f.fields_for :title_translations do |f| %>
2012-05-16 22:28:29 +00:00
<% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
2012-07-25 21:58:09 +00:00
<%= f.text_field locale, :class => "input-large", :value => (@asset.title_translations[locale] rescue nil) %>
2012-05-16 22:28:29 +00:00
</div>
<% end %>
<% end %>
<% end %>
</div>
</div>
<div class="control-group">
<label class="control-label"><%= f.label :category, t('admin.category') %></label>
<div class="controls">
2012-07-25 21:58:09 +00:00
<%= f.select :asset_category_id, @asset_categories.collect{|t| [ t.title, t.id ]}, {}, :class => "input-large" %>
2012-05-16 22:28:29 +00:00
</div>
</div>
<div class="control-group">
<label class="control-label"><%= t 'admin.tags' %></label>
<div class="controls">
<% @tags.each do |tag| %>
<%= content_tag :label, :class => "checkbox inline" do -%>
<%= check_box_tag 'asset[tag_ids][]', tag.id, @asset.tag_ids.include?(tag.id) %>
<%= tag[I18n.locale] %>
<%= hidden_field_tag 'asset[tag_ids][]', '' %>
2012-05-16 22:28:29 +00:00
<% end %>
<% end %>
</div>
</div>
<div class="control-group">
<label class="control-label"><%= f.label :data, t('admin.data') %></label>
<div class="controls">
<%= f.file_field :data, :class => 'upload' %>
</div>
</div>