Asset-Tracker/app/views/softwares/new.html.erb
2011-06-14 18:08:28 -07:00

48 lines
1.0 KiB
Plaintext
Executable File

<h1>New software</h1>
<% form_for(@software) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :company %><br />
<%= f.text_field :company %>
</p>
<p>
<%= f.label :version %><br />
<%= f.text_field :version %>
</p>
<p>
<%= f.label :key %><br />
<%= f.text_field :key %>
</p>
<p>
<%= f.label :platform %><br />
<%= f.text_field :platform %>
</p>
<p>
<%= f.label :asset_id %><br />
<%= select(:software, :asset_id, options_from_collection_for_select(Asset.find (:all, :order => "tag").sort {|x,y| x.tag.to_i <=> y.tag.to_i }, :id, :tag_with_name ) ) %>
</p>
<p>
<%= f.label :media_location %><br />
<%= f.text_field :media_location %>
</p>
<p>
<%= f.label :installed %><br />
<%= f.date_select :installed %>
</p>
<p>
<%= f.label :installed_by %><br />
<%= f.text_field :installed_by %>
</p>
<p>
<%= f.label :note %><br />
<%= f.text_field :note %>
</p>
<p>
<%= f.submit 'Create' %>
</p>
<% end %>
<%= link_to 'Back', softwares_path %>