diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index c1f9cf750..173e5fabc 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -608,7 +608,7 @@ private @attachment.container.board.course) @course = @attachment.container.board.course else - unless @attachment.container_type == 'Bid' || @attachment.container_type == 'Organization' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork' + unless @attachment.container_type == 'Bid'|| @attachment.container_type == 'Organization' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork' @project = @attachment.project end end @@ -660,8 +660,10 @@ private end def has_login - 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) + unless@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 end end end diff --git a/app/views/files/_org_upload_attachment_list.html.erb b/app/views/files/_org_upload_attachment_list.html.erb new file mode 100644 index 000000000..973aeddd6 --- /dev/null +++ b/app/views/files/_org_upload_attachment_list.html.erb @@ -0,0 +1,34 @@ + + + <%= 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}" + } %> + + + + + <%= l(:label_no_file_uploaded)%> + +(<%= l(:label_max_size) %>:<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) +

建议上传高度不超过52px的图片

+
+
+ + +
\ No newline at end of file diff --git a/app/views/files/_upload_org_new_files.html.erb b/app/views/files/_upload_org_new_files.html.erb index 111354c1a..cd460e328 100644 --- a/app/views/files/_upload_org_new_files.html.erb +++ b/app/views/files/_upload_org_new_files.html.erb @@ -2,12 +2,11 @@

更换Logo

-

尺寸最好55*33

<%= error_messages_for 'attachment' %> <%= form_tag(organization_files_path(org, :in_org => params[:in_org], :logo => true), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %> - <%= render :partial => 'files/org_subfield_upload_attachment_list', :locals => {:container => org}%> + <%= render :partial => 'files/org_upload_attachment_list', :locals => {:container => org}%>
<%= l(:button_cancel)%> <%= l(:button_confirm)%> diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index f2426d9f1..38fb49d8d 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -12,7 +12,7 @@ <%= stylesheet_link_tag 'org_new_style','jquery/jquery-ui-1.9.2' %> <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> <%= javascript_include_tag 'attachments' %> - <%= call_hook :view_layouts_base_html_head %> + <%#= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> @@ -77,14 +77,24 @@
- + <% if User.current.admin_of_org?(@organization) %> + + <% else %> + <% if @org_logo_attchment.blank? %> + + <% else %> + + <% end %> + + <% end %> + <%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %>
@@ -382,7 +392,7 @@ - + <%#= call_hook :view_layouts_base_body_bottom %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index d36117556..e67ca806d 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -679,6 +679,7 @@ zh: label_repository: 版本库 label_course_repository: 代码库 label_browse: 上传文件 + label_browse_org: 上传图片 label_branch: 分支 label_tag: 标签 label_revision: 修订 diff --git a/public/images/org_new_style/default-img.jpg b/public/images/org_new_style/default-img.jpg index e345ca3d7..e9aead6ed 100644 Binary files a/public/images/org_new_style/default-img.jpg and b/public/images/org_new_style/default-img.jpg differ diff --git a/public/images/org_new_style/default-img2.jpg b/public/images/org_new_style/default-img2.jpg new file mode 100644 index 000000000..8d194d605 Binary files /dev/null and b/public/images/org_new_style/default-img2.jpg differ diff --git a/public/images/org_new_style/default-img2.png b/public/images/org_new_style/default-img2.png deleted file mode 100644 index 3a824b1f6..000000000 Binary files a/public/images/org_new_style/default-img2.png and /dev/null differ diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index 442ca9ce3..8fca32cb1 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -192,6 +192,73 @@ a:hover.more-btn-center{ background:#29146f; color:#fff;} .note-box p{display:block; width:515px; color:#888; font-size:12px; line-height:2.5;} .right-info2{background:url(../images/org_new_style/icons.png) no-repeat -41px -540px ; width:15px; line-height:1.9; height:16px; padding-left:20px; color:#888; margin-top:5px;} +.upload_con h2 { + display: block; + background: #eaeaea; + font-size: 14px; + color: #343333; + height: 31px; + width: auto; + margin-top: 25px; + padding-left: 20px; + padding-top: 5px; +} +a.blue_btn { + background: #64bdd9; + color: #fff; + font-size: 14px; + font-weight: normal; + padding: 2px 8px; + text-align: center; + cursor: pointer; +} +a.grey_btn { + background: #d9d9d9; + color: #656565; + font-size: 14px; + font-weight: normal; + text-align: center; + margin-left: 10px; + margin-bottom: 10px; + padding: 2px 10px; +} +span.add_attachment { + font-size: 80%; + line-height: 2.5em; +} +.c_dark { + color: #2d2d2d; +} +.upload_filename { + background: url(../images/pic_file.png) 0 -20px no-repeat; + color: #7f7f7f; + width: 270px; + border: none; + padding-left: 20px; + margin-right: 10px; + margin-bottom: 5px; + white-space: nowrap; + text-overflow: ellipsis; +} +.profiler-results.profiler-left { + left: 0px; +} +.profiler-results { + z-index: 2147483643; + position: fixed; + top: 0px; +} + +.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +.ajax-waiting input.upload_filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} +.ajax-loading input.upload_filename {background:url(../images/loading.gif) no-repeat 0px 50%;} +div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } +.upload_filename{ background: url(../images/pic_file.png) 0 -20px no-repeat;color: #7f7f7f;width: 270px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} +.evaluation{position: relative;} +.evaluation_submit{position: absolute;right: 0px;bottom: 0px;} +.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; } + +