diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-01 15:17:45 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-01 15:17:45 +0000 |
commit | b5e90972d88c69a1ef2c9e90879e8926d192acff (patch) | |
tree | 9370cd677e484caf9ec4576d5e8f5ffcd04aab1f /app/views/files | |
parent | daa8eaa9aebcc284e2904d1258cbfdd78ea23876 (diff) | |
download | redmine-b5e90972d88c69a1ef2c9e90879e8926d192acff.tar.gz redmine-b5e90972d88c69a1ef2c9e90879e8926d192acff.zip |
Refactor: move method, ProjectsController#add_file to FilesController#new.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4052 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/files')
-rw-r--r-- | app/views/files/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/files/new.html.erb | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index 2b2e5e870..66f5d12b9 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -1,5 +1,5 @@ <div class="contextual"> -<%= link_to_if_authorized l(:label_attachment_new), {:controller => 'projects', :action => 'add_file', :id => @project}, :class => 'icon icon-add' %> +<%= link_to_if_authorized l(:label_attachment_new), {:controller => 'files', :action => 'new', :id => @project}, :class => 'icon icon-add' %> </div> <h2><%=l(:label_attachment_plural)%></h2> diff --git a/app/views/files/new.html.erb b/app/views/files/new.html.erb new file mode 100644 index 000000000..bbb3b1733 --- /dev/null +++ b/app/views/files/new.html.erb @@ -0,0 +1,16 @@ +<h2><%=l(:label_attachment_new)%></h2> + +<%= error_messages_for 'attachment' %> +<div class="box"> +<% form_tag({ :action => 'new', :id => @project }, :multipart => true, :class => "tabular") do %> + +<% 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 %> + +<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p> +</div> +<%= submit_tag l(:button_add) %> +<% end %> |