<% @subfield_content.each do |field| %>
<% if field.status.to_i == 6 %>
-
+
最新活动展示更多
@@ -333,7 +336,7 @@
<% elsif field.status.to_i == 7 %>
-
+
关注北斗
@@ -342,9 +345,7 @@
<% elsif field.status.to_i == 8 %>
-
-
-
+ <%= render :partial => 'organizations/org_subfield_rightD', :locals => {:field => field} %>
<% end %>
<% end %>
diff --git a/app/views/organizations/_org_content.html.erb b/app/views/organizations/_org_content.html.erb
index afcbffd02..e69de29bb 100644
--- a/app/views/organizations/_org_content.html.erb
+++ b/app/views/organizations/_org_content.html.erb
@@ -1,259 +0,0 @@
-
-<% if is_default_field?(field) %>
- <% case field.name %>
- <% when 'course' %>
- <% if field.status.to_i == 1 %>
-
- <% elsif field.status.to_i == 2 %>
-
- <% elsif field.status.to_i == 3 %>
-
- <% elsif field.status.to_i == 4 %>
-
- <% elsif field.status.to_i == 5 %>
-
- <% elsif field.status.to_i == 6 %>
-
- <% end %>
-
- <% if field.status == 0 %>
-
-
课程动态
- <% if @course_acts.blank? %>
-
暂无内容,敬请期待!
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% else %>
-
-
- <% unless @course_acts.nil? %>
- <%= render :partial => 'organizations/org_new_course_pic', :locals => {:activities => @course_acts.first(3)} %>
- <% end %>
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
-
-
- <% end %>
-
- <% else %>
-
-
课程动态
- <% if @course_acts.blank? %>
-
暂无内容,敬请期待!
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% else %>
-
- <%= render :partial => 'organizations/org_new_course_act_list', :locals =>{:activities => @course_acts, :field => field, :organization => @organization} %>
-
-
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% when 'project' %>
-
- <% if field.status == 0 %>
-
-
- <% if @project_acts.blank? %>
-
暂无内容,敬请期待!
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% else %>
-
-
- <% unless @project_acts.nil? %>
- <%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %>
- <% end %>
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
-
-
- <% end %>
-
-
- <% else %>
-
-
- <% if @project_acts.blank? %>
-
暂无内容,敬请期待!
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% else %>
-
- <%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %>
-
-
-
- <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% end %>
-
-
- <% end %>
-
- <% end %>
-<% else %>
- <% if field.field_type == "Post" %> <%# 讨论类型 %>
- <% org_subfield = OrgSubfield.find(field.id) %>
- <% org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0 %>
- <% org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc') %>
- <%# message_ats = get_message_org(@organization.id, field.id) %>
- <%# ids = field.org_document_comments.map{|o| o.id}.join(",") %>
-
- <% if field.status == 0 %>
-
-
<%= field.name %>
- <% if org_acts.blank? %>
-
暂无内容,敬请期待!
-
- <% if !field.subfield_subdomain_dir.nil? %>
- <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% else %>
- <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
- <% else %>
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
-
- <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% else %>
-
-
-
- <% org_acts.first(3).each do |act| %>
- <%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %>
- <% end %>
-
-
- <% if !field.subfield_subdomain_dir.nil? %>
- <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% else %>
- <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
- <% else %>
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
- <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
-
- <% end %>
-
-
- <% else %>
-
-
<%= field.name %>
- <% if org_acts.blank? %>
-
暂无内容,敬请期待!
-
- <% if !field.subfield_subdomain_dir.nil? %>
- <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% else %>
- <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
- <% else %>
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
-
- <% else %>
-
- <% org_acts.each do |act| %>
- <%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %>
- <% end %>
-
-
-
- <% if !field.subfield_subdomain_dir.nil? %>
- <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% else %>
- <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
- <% else %>
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
- <% end %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% elsif field.field_type == "Resource" %>
- <% org_attachs = get_attach_org2(field) %>
-
-
-
<%= field.name %>
- <% if org_attachs.blank? %>
-
暂无内容,敬请期待!
-
- <% if !field.subfield_subdomain_dir.nil? %>
- <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
- <% else %>
- <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
- <% end %>
- <% else %>
- <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
- <% end %>
- <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% else %>
-
- <%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
-
-
-
-
- <% if !field.subfield_subdomain_dir.nil? %>
- <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
- <%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
- <% else %>
- <%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
- <% end %>
- <% else %>
- <%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
- <% end %>
- <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
- <% end %>
-
-
-
-
-
- <% end %>
-<% end %>
\ No newline at end of file
diff --git a/app/views/organizations/_org_subfield_leftD.html.erb b/app/views/organizations/_org_subfield_leftD.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/organizations/_org_subfield_leftM1.html.erb b/app/views/organizations/_org_subfield_leftM1.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/organizations/_org_subfield_leftM2.html.erb b/app/views/organizations/_org_subfield_leftM2.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/organizations/_org_subfield_leftMD.html.erb b/app/views/organizations/_org_subfield_leftMD.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/organizations/_org_subfield_leftT.html.erb b/app/views/organizations/_org_subfield_leftT.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/organizations/_org_subfield_rightD.html.erb b/app/views/organizations/_org_subfield_rightD.html.erb
new file mode 100644
index 000000000..7bc2d565d
--- /dev/null
+++ b/app/views/organizations/_org_subfield_rightD.html.erb
@@ -0,0 +1,73 @@
+<% if is_default_field?(field) %>
+ <% case field.name %>
+ <% when 'course' %>
+
暂无内容!
+ <% when 'project' %>
+
暂无内容!
+ <% end %>
+<% else %>
+ <% if field.field_type == "Post" %> <%# 讨论类型 %>
+ <% org_acts = get_subfield_acts field %>
+ <% unless org_acts.blank? %>
+ <% activity = org_acts.first %>
+
+ <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
+ <% document = activity.org_act %>
+ <% org_subfield_id = params[:org_subfield_id] %>
+ <% flag = 2 %>
+ <% iamge_path = get_image_path_from_content(document.content) %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
+ <% end %>
+ <% elsif activity.container_type == 'OrgSubfield' %>
+ <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
+ <% message = Message.find(activity.org_act_id) %>
+ <% if message.board.org_subfield_id %>
+ <% iamge_path = get_image_path_from_content(content) %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
+ <% end %>
+ <% else %>
+ <% iamge_path = get_image_path_from_content(content) %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
+ <% end %>
+ <% end %>
+ <% end %>
+ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
+ <% news = News.find(activity.org_act_id) %>
+ <% iamge_path = get_image_path_from_content(news.description) %>
+ <% if iamge_path.nil? %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), news_path(news), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), news_path(news), :target => "_blank" %>
+ <% end %>
+ <% end %>
+ <% end %>
+
+ <% else %>
+
+
+
+ <% end %>
+ <% elsif field.field_type == "Resource" %>
+ <% org_attachs = get_attach_org2(field) %>
+
+ <% if !field.subfield_subdomain_dir.nil? %>
+ <% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
+ <% else %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
+ <% end %>
+ <% else %>
+ <%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
+ <% end %>
+
+ <% end %>
+<% end %>
diff --git a/app/views/organizations/_org_subfield_rightM.html.erb b/app/views/organizations/_org_subfield_rightM.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/organizations/_org_subfield_rightT.html.erb b/app/views/organizations/_org_subfield_rightT.html.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/images/default_blank/ad-default.jpg b/public/images/default_blank/ad-default.jpg
new file mode 100644
index 000000000..7707775d6
Binary files /dev/null and b/public/images/default_blank/ad-default.jpg differ
diff --git a/public/images/default_blank/banner-default.jpg b/public/images/default_blank/banner-default.jpg
new file mode 100644
index 000000000..1debf41a8
Binary files /dev/null and b/public/images/default_blank/banner-default.jpg differ
diff --git a/public/images/default_blank/default-img2.jpg b/public/images/default_blank/default-img2.jpg
new file mode 100644
index 000000000..8d194d605
Binary files /dev/null and b/public/images/default_blank/default-img2.jpg differ
diff --git a/public/images/default_blank/files-default.jpg b/public/images/default_blank/files-default.jpg
new file mode 100644
index 000000000..5da308927
Binary files /dev/null and b/public/images/default_blank/files-default.jpg differ
diff --git a/public/images/default_blank/left-act.jpg b/public/images/default_blank/left-act.jpg
new file mode 100644
index 000000000..19259035d
Binary files /dev/null and b/public/images/default_blank/left-act.jpg differ
diff --git a/public/images/default_blank/left-act2.jpg b/public/images/default_blank/left-act2.jpg
new file mode 100644
index 000000000..7f105cb1c
Binary files /dev/null and b/public/images/default_blank/left-act2.jpg differ
diff --git a/public/images/default_blank/right-top.jpg b/public/images/default_blank/right-top.jpg
new file mode 100644
index 000000000..591819248
Binary files /dev/null and b/public/images/default_blank/right-top.jpg differ