From 1506d3ddab555f3efd7cbd86c4512ea1873cb0a7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 9 Apr 2007 17:59:31 +0000 Subject: [PATCH] Form to add an attachment on document view is now togglable. git-svn-id: http://redmine.rubyforge.org/svn/trunk@437 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/documents/show.rhtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/documents/show.rhtml b/app/views/documents/show.rhtml index 730cbbb11..7a72e2bd2 100644 --- a/app/views/documents/show.rhtml +++ b/app/views/documents/show.rhtml @@ -28,7 +28,8 @@ <% if authorize_for('documents', 'add_attachment') %> - <% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %> +

<%= toggle_link l(:label_attachment_new), "add_attachment_form" %>

+ <% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>

<%= file_field_tag 'attachments[]', :size => 30 %> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)