From 01bd394a59a5467b614b0e95a1a3026c80aaf0dc Mon Sep 17 00:00:00 2001 From: Linda <2294690300@qq.com> Date: Tue, 14 Jun 2016 15:08:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E6=88=B7=E9=A6=96=E9=A1=B5=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E7=A5=8E=E6=AC=A30613=E7=89=88=E6=9C=AC=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organizations/_org_custom_header.html.erb | 13 ++-- .../organizations/_org_custom_left1.html.erb | 66 +++--------------- .../organizations/_org_custom_left3.html.erb | 8 +-- .../organizations/_org_custom_right3.html.erb | 26 ------- public/stylesheets/org2.css | 2 +- public/stylesheets/org_custom.css | 68 +++++++------------ public/stylesheets/public.css | 2 +- 7 files changed, 48 insertions(+), 137 deletions(-) diff --git a/app/views/organizations/_org_custom_header.html.erb b/app/views/organizations/_org_custom_header.html.erb index 91ca5aafb..e1dd1d65b 100644 --- a/app/views/organizations/_org_custom_header.html.erb +++ b/app/views/organizations/_org_custom_header.html.erb @@ -1,10 +1,10 @@
-
- <%= image_tag(url_to_avatar(@organization), width:"67", height: "61", :id => 'nh_user_tx', :class => "por_logo fl ", :target => "_blank") %> +
+ <%= image_tag(url_to_avatar(@organization), width:"51", height: "51", :id => 'nh_user_tx', :class => "por_logo fl mt1", :target => "_blank") %> <% if User.current.logged? %> diff --git a/app/views/organizations/_org_custom_left1.html.erb b/app/views/organizations/_org_custom_left1.html.erb index 4c1271ab8..7661b64d0 100644 --- a/app/views/organizations/_org_custom_left1.html.erb +++ b/app/views/organizations/_org_custom_left1.html.erb @@ -8,11 +8,11 @@
    <% if acts.count > 1 %> - <% acts[1..2].each do |activity| %> + <% acts[1..3].each do |activity| %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> <% document = activity.org_act %>
  • - <%= link_to "热门推荐#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %> + <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>

    <%= time_from_now(document.created_at) %> <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -25,7 +25,7 @@ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %> <% if message.board.org_subfield_id %>
  • - <%= link_to "热门推荐#{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> + <%= link_to document.title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>

    <%= time_from_now(message.created_on) %> <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -33,7 +33,7 @@
  • <% else %>
  • - <%= link_to "热门推荐#{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> + <%= link_to document.title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>

    <%= time_from_now(message.created_on) %> <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -44,7 +44,7 @@ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %> <% news = activity.org_act %>
  • - <%= link_to "热门推荐#{news.title}".html_safe, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %> + <%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>

    <%= time_from_now(news.created_on) %> <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -54,54 +54,6 @@ <% end %> <% end %> <% end %> - - <% if acts.count > 3 %> - <% activity = acts[3] %> - <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> - <% document = activity.org_act %> -
  • - <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %> -

    <%= time_from_now(document.created_at) %> - <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% else 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 = activity.org_act %> - <% content = message.parent_id.nil? ? message.content : message.parent.content %> - <% title = message.parent_id.nil? ? message.subject : message.parent.subject %> - <% if message.board.org_subfield_id %> -
  • - <%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> -

    <%= time_from_now(message.created_on) %> - <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% else %> -
  • - <%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> -

    <%= time_from_now(message.created_on) %> - <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% end %> - <% end %> - <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %> - <% news = activity.org_act %> -
  • - <%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %> -

    <%= time_from_now(news.created_on) %> - <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% end %> - <% end %> - <% end %> -
<%# if acts.count > 3 %> @@ -114,9 +66,11 @@ <% else %> <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %> <% end %> - <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %> -

<%= time_from_now(document.created_at) %><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>

- <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %> +
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %> +

<%= time_from_now(document.created_at) %><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>

+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %> +
<% else activity.container_type == 'OrgSubfield' %> diff --git a/app/views/organizations/_org_custom_left3.html.erb b/app/views/organizations/_org_custom_left3.html.erb index 3d5d01dee..fb2b83dd2 100644 --- a/app/views/organizations/_org_custom_left3.html.erb +++ b/app/views/organizations/_org_custom_left3.html.erb @@ -71,8 +71,8 @@ <% end %> <% end %>
- <% unless acts[1..5].nil? %> - <% acts[1..5].each do |activity| %> + <% unless acts[1..4].nil? %> + <% acts[1..4].each do |activity| %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> <% document = activity.org_act %>
- <% unless acts[6..19].nil? %> + <% unless acts[5..16].nil? %>
@@ -65,29 +62,6 @@ <% end %>
-
- -