From 72e19b8b67aa87485ff9e40eab17999397634050 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 5 May 2016 10:36:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B7=A6=E4=B8=AD=E6=9D=BF?= =?UTF-8?q?=E5=9D=97=E5=86=85=E5=AE=B9=E7=A9=BA=E7=99=BD=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_org_subfield_leftM1.html.erb | 37 ++++++++++++------- .../_org_subfield_leftM1_default.html.erb | 2 +- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/app/views/organizations/_org_subfield_leftM1.html.erb b/app/views/organizations/_org_subfield_leftM1.html.erb index 6aa22e58a..45212d725 100644 --- a/app/views/organizations/_org_subfield_leftM1.html.erb +++ b/app/views/organizations/_org_subfield_leftM1.html.erb @@ -1,18 +1,21 @@ -

<%= field.name %>更多

-
+ <% if is_default_field?(field) %> <% case field.name %> <% when 'course' %> <% if @course_acts.blank? %> +

<%= field.name %>

+
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %> <% else %> +

<%= field.name %>更多

+
<% @course_acts.first(1).each do |act| %> <% if act.org_act_type == "HomeworkCommon" %> <% activity = HomeworkCommon.find(act.org_act_id) %> <% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), student_work_index_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -29,7 +32,7 @@ <% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -50,7 +53,7 @@ <% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), news_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -70,7 +73,7 @@ <% if ( activity.polls_status==2) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -92,15 +95,19 @@ <% end %> <% when 'project' %> <% if @project_acts.blank? %> +

<%= field.name %>

+
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %> <% else %> +

<%= field.name %>更多

+
<% @project_acts.first(1).each do |act| %> <% if act.org_act_type == "Issue" %> <% activity = Issue.find(act.org_act_id) %> <% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), issue_url_in_org(activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -117,7 +124,7 @@ <% iamge_path = get_image_path_from_content(activity.content) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -138,7 +145,7 @@ <% iamge_path = get_image_path_from_content(activity.description) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -158,8 +165,12 @@ <% if field.field_type == "Post" %> <% org_acts = get_subfield_acts field %> <% if org_acts.blank? %> +

<%= field.name %>

+
<%= render :partial => 'organizations/org_subfield_leftM1_default', :locals => {:field => field} %> <% else %> +

<%= field.name %>更多

+
<% org_acts.first(1).each do |activity| %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %> <% document = activity.org_act %> @@ -168,7 +179,7 @@ <% iamge_path = get_image_path_from_content(document.content) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -192,7 +203,7 @@ <% if message.board.org_subfield_id %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -211,7 +222,7 @@ <% else %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), board_message_path(message.board,activity), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> @@ -234,7 +245,7 @@ <% iamge_path = get_image_path_from_content(news.description) %>
<% if iamge_path.nil? %> - <%= link_to image_tag("/images/default_blank/files-default.jpg", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> + <%= link_to image_tag("/images/default_blank/left-02.jpg", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% else %> <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "380", :height => "165"), news_path(news), :target => "_blank", :class =>"sn-news-bigimg",:style=>"display:block;" %> <% end %> diff --git a/app/views/organizations/_org_subfield_leftM1_default.html.erb b/app/views/organizations/_org_subfield_leftM1_default.html.erb index efa0e8a0d..d785b6225 100644 --- a/app/views/organizations/_org_subfield_leftM1_default.html.erb +++ b/app/views/organizations/_org_subfield_leftM1_default.html.erb @@ -1,5 +1,5 @@
- +