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">
2012-09-12 11:12:50 +00:00
<label for="title" class="control-label"><%= t :title %></label>
2012-05-16 22:28:29 +00:00
<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">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= f.label :category, t(:category) %></label>
2012-05-16 22:28:29 +00:00
<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">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t :tags %></label>
2012-05-16 22:28:29 +00:00
<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.name %>
<%= hidden_field_tag 'asset[tag_ids][]', '' %>
2012-05-16 22:28:29 +00:00
<% end %>
<% end %>
</div>
</div>
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= 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>