2014-03-11 10:45:01 +08:00
|
|
|
<h3><%=l(:label_attachment_new)%></h3>
|
|
|
|
<% versions = project.versions.sort %>
|
2014-05-09 15:45:21 +08:00
|
|
|
<% attachmenttypes = project.attachmenttypes %>
|
2014-03-11 10:45:01 +08:00
|
|
|
<%= error_messages_for 'attachment' %>
|
|
|
|
<%= form_tag(project_files_path(project), :multipart => true, :class => "tabular") do %>
|
|
|
|
<div class="box">
|
|
|
|
|
|
|
|
<% if versions.any? %>
|
|
|
|
<p><label for="version_id"><%=l(:field_version)%></label>
|
|
|
|
<%= select_tag "version_id", content_tag('option', '') +
|
|
|
|
options_from_collection_for_select(versions, "id", "name") %></p>
|
|
|
|
<% end %>
|
|
|
|
|
2014-05-09 15:45:21 +08:00
|
|
|
<% if attachmenttypes.any? %>
|
|
|
|
<p> <label for="attachment_type"><%=l(:attachment_type)%></label>
|
|
|
|
<%= select_tag "attachment_type", content_tag('option', '') +
|
|
|
|
options_from_collection_for_select(attachmenttypes, "id",
|
|
|
|
"typeName") %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2014-03-11 10:45:01 +08:00
|
|
|
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
|
|
|
</div>
|
|
|
|
<%= submit_tag l(:button_add) %>
|
|
|
|
<% end %>
|
|
|
|
<div class="line_under" style="margin:20px 0px;"></div>
|