diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 19e85bdc4..1dacffb6f 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -660,7 +660,7 @@ class AttachmentsController < ApplicationController
end
def has_login
- unless @attachment.container_type == "Organization"
+ unless @attachment && @attachment.container_type == "Organization"
unless @attachment && @attachment.container_type == "PhoneAppVersion"
render_403 if !User.current.logged? && !(@attachment.container_type == 'OrgSubfield' && @attachment.container.organization.allow_guest_download) && !(@attachment.container_type == 'OrgDocumentComment' && @attachment.container.organization.allow_guest_download)
end
diff --git a/app/views/files/_org_upload_attachment_list.html.erb b/app/views/files/_org_upload_attachment_list.html.erb
index 973aeddd6..06fa23387 100644
--- a/app/views/files/_org_upload_attachment_list.html.erb
+++ b/app/views/files/_org_upload_attachment_list.html.erb
@@ -23,10 +23,8 @@
- <%= l(:label_no_file_uploaded)%>
+ 建议上传高度不超过52px的图片
-(<%= l(:label_max_size) %>:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
-
建议上传高度不超过52px的图片
diff --git a/app/views/files/_org_upload_attachment_list_banner.html.erb b/app/views/files/_org_upload_attachment_list_banner.html.erb
new file mode 100644
index 000000000..5388afb5b
--- /dev/null
+++ b/app/views/files/_org_upload_attachment_list_banner.html.erb
@@ -0,0 +1,32 @@
+
+ <%= l(:label_browse_org) %>
+ <%= file_field_tag 'attachments[dummy][file]',
+ :id => "_file#{container.id}",
+ :class => ie8? ? '':'file_selector',
+ :multiple => true,
+ :onchange => "addInputFiles_board(this, '#{container.id}','"+"submit_resource"+"');",
+ :style => ie8? ? '': 'display:none',
+ :data => {
+ :max_file_size => Setting.attachment_max_size.to_i.kilobytes,
+ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
+ :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
+ :upload_path => uploads_path(:format => 'js'),
+ :description_placeholder => l(:label_optional_description),
+ :field_is_public => l(:field_is_public),
+ :are_you_sure => l(:text_are_you_sure),
+ :file_count => l(:label_file_count),
+ :delete_all_files => l(:text_are_you_sure_all),
+ :lebel_file_uploding => l(:lebel_file_uploding),
+ :containerid => "#{container.id}"
+ } %>
+
+
+
+
+ 建议上传 长度为1452px/高度为304px 的图片
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/files/_upload_org_new_files_banner.html.erb b/app/views/files/_upload_org_new_files_banner.html.erb
index cf044e089..0cb767bf2 100644
--- a/app/views/files/_upload_org_new_files_banner.html.erb
+++ b/app/views/files/_upload_org_new_files_banner.html.erb
@@ -6,7 +6,7 @@
<%= l(:label_file_upload_error_messages)%>
<%= form_tag(organization_files_path(org, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
- <%= render :partial => 'files/org_upload_attachment_list', :locals => {:container => org}%>
+ <%= render :partial => 'files/org_upload_attachment_list_banner', :locals => {:container => org}%>
<%= l(:button_cancel)%>
<%= l(:button_confirm)%>