From 6fbad6d53decfc2bea1b230634532a9af67ba62c Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 3 Jun 2016 08:45:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=B3=E4=BA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- app/views/organizations/_org_custom_right2.html.erb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 8be34a318..66e3d6e05 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -93,7 +93,7 @@ class OrganizationsController < ApplicationController end # 热门项目 if @organization.org_subfields.where(:field_type => "Comppro", :hide => 0).count > 0 - @excellent_projects = Course.where(:is_public => true, :status => true, :hot => true) + @excellent_projects = Project.where(:is_public => true, :status => true, :hot => true) end # 最新动态, 来自我关联的项目和课程 if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0 diff --git a/app/views/organizations/_org_custom_right2.html.erb b/app/views/organizations/_org_custom_right2.html.erb index 7bb2cbf93..335087731 100644 --- a/app/views/organizations/_org_custom_right2.html.erb +++ b/app/views/organizations/_org_custom_right2.html.erb @@ -3,18 +3,18 @@ <% if containers.blank? %>

该模块暂时没有相关内容

<% else %> - <% container = cotainers.first %> + <% container = containers.first %>
  • <%= link_to "#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 fl", :title => container.name, :target => "_blank" %> -

    活跃度<%= static_project_score(@project.project_score) %>

    +

    活跃度<%= static_project_score(container.project_score) %>

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => activity.id, :content=> activity.description, :maxheight => 20, :maxwordsnum => 70, :maxwidth => 0, :cl => "por_project_p"} %> + <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => container.id, :content=> container.description, :maxheight => 20, :maxwordsnum => 70, :maxwidth => 0, :cl => "por_project_p"} %>
  • - <% cotainers[1..4].each do |container| %> + <% containers[1..4].each do |container| %>
  • <%= link_to "#{container.name}".html_safe, project_path(container), :class => "por_hidden_w205 fl", :title => container.name, :target => "_blank" %> -

    活跃度<%= static_project_score(@project.project_score) %>

    +

    活跃度<%= static_project_score(container.project_score) %>

  • <% end %> From fa03867cc2f884e880e929c68362c7f9faac8dff Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 3 Jun 2016 08:56:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E7=A5=9E=E7=95=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_organization_content_extension.html.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/organizations/_organization_content_extension.html.erb b/app/views/organizations/_organization_content_extension.html.erb index 48abd48b9..919961057 100644 --- a/app/views/organizations/_organization_content_extension.html.erb +++ b/app/views/organizations/_organization_content_extension.html.erb @@ -1,8 +1,8 @@ -

    - - <%= content.to_s.html_safe%> - -

    +
    + + <%= content.to_s.html_safe%> + +