diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b225c3099..942016976 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2169,7 +2169,7 @@ module ApplicationHelper candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 elsif attachment.container.is_a?(OrgSubfield) org = attachment.container.organization - candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 + candown = User.current.member_of_org?(org) || ((attachment.is_public == 1 || attachment.get_status_by_attach(User.current.id) == 2) && org.allow_guest_download == true) elsif attachment.container.is_a?(OrgDocumentComment) org = attachment.container.organization candown = User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1) diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb index 3cc429185..b37c80dad 100644 --- a/app/views/attachments/_activity_attach.html.erb +++ b/app/views/attachments/_activity_attach.html.erb @@ -3,7 +3,7 @@
- <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw380', :download => true -%> + <%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw380', :download => true %> ( diff --git a/app/views/files/_org_subfield_list.html.erb b/app/views/files/_org_subfield_list.html.erb index 1bbdc0e93..e567435a5 100644 --- a/app/views/files/_org_subfield_list.html.erb +++ b/app/views/files/_org_subfield_list.html.erb @@ -11,9 +11,9 @@
<%# 如果有历史版本则提供历史版本下载 %> <% if file.attachment_histories.count == 0 %> - <%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'), - download_named_attachment_path(file.id, file.filename), - :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %> + <%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'), + download_named_attachment_path(file.id, file.filename), + :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %> <% else %> <%= link_to truncate(file.filename,length: 35, omission: '...'), attachment_history_download_path(file.id), :title => file.filename+"\n"+file.description.to_s, diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index a2f8a8f29..f1a8da8e4 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -47,52 +47,52 @@ <%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %> <%= labelled_form_for @organization do |f|%> - <%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %> - - -
组织名称: -
-
+ <%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %> + + +
组织名称: +
+
-
组织描述: -
-
-
-
组织URL: -
http:// - - .trustie.net申请 - <% record = OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first %> - <% if domain.present? and record.present? and record.content == domain.subname %> - (已批准) - <% elsif record %> - (您申请了子域名<%= OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first.content %>,还未批准) - <% end %> -

- -
-
-
- 显示模式 : - /> - - /> - -
-
公开 : - class="ml3" /> -
-
下载支持 : - name="organization[allow_guest_download]" <%= @organization.allow_guest_download ? 'checked': ''%> class="ml3" /> -  允许游客下载 - <%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %> -
- - - - - - 保存 +
组织描述: +
+
+
+
组织URL: +
http:// + + .trustie.net申请 + <% record = OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first %> + <% if domain.present? and record.present? and record.content == domain.subname %> + (已批准) + <% elsif record %> + (您申请了子域名<%= OrgMessage.where("organization_id=? and message_type='ApplySubdomain'", @organization.id).order("updated_at desc").first.content %>,还未批准) + <% end %> +

+ +
+
+
+ 显示模式 : + /> + + /> + +
+
公开 : + class="ml3" /> +
+
下载支持 : + name="organization[allow_guest_download]" <%= @organization.allow_guest_download ? 'checked': ''%> class="ml3" /> +  允许游客下载 + <%= @organization.is_public? ? "" : "(私有组织不允许游客下载资源)" %> +
+ + + + + + 保存 <% end %>