课程动态
course activities


diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index e649dffb5..38514dfc4 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -81,7 +81,6 @@ class OrganizationsController < ApplicationController @project_acts = get_project_activities_org @organization @course_acts_homework = get_course_homework_activities_org @organization @course_acts_message = get_course_message_activities_org @organization - else if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @organization = Organization.find(params[:id]) diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index db7d6f576..bc143aa65 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -36,4 +36,8 @@ module OrganizationsHelper end + def get_message_org(org_id, field_id) + OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} order by updated_at desc limit 3;") + end + end diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 1c30bc192..f1ec13246 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -130,9 +130,9 @@ 项目动态 <% end %> <% else %> - <% if field.field_type == "Post" %> + <% if field.field_type == "Post" && field.hide == 0 %> <%= link_to field.name, organization_path(@organization), :class => "fl" %> - <% elsif field.field_type == "Resource" %> + <% elsif field.field_type == "Resource" && field.hide == 0%> <%= link_to field.name, organization_path(@organization), :class => "fl" %> <% end %> <% end %> @@ -188,216 +188,233 @@ <% @subfield_content.each do |field| %> -
course activities
project activities
project activities
activity zone
activity zone
resource dwonload