diff --git a/app/controllers/sub_document_comments_controller.rb b/app/controllers/sub_document_comments_controller.rb index 2e0890e27..d58734c8f 100644 --- a/app/controllers/sub_document_comments_controller.rb +++ b/app/controllers/sub_document_comments_controller.rb @@ -102,7 +102,7 @@ class SubDocumentCommentsController < ApplicationController @subdomain = @document.sub_domain @org_subfield = @subdomain.org_subfield @organization = @org_subfield.organization - @act = OrgActivity.find(params[:id]) + @act = OrgActivity.find(params[:act_id]) @comment = SubDocumentComment.new(:sub_domain_id => @document.sub_domain, :creator_id => User.current.id, :reply_id => params[:id]) @comment.content = params[:sub_content] @document.children << @comment diff --git a/app/models/course.rb b/app/models/course.rb index cc80a1b4b..13050ddbe 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -24,7 +24,7 @@ class Course < ActiveRecord::Base end end - attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state, :term, :password,:is_public,:description,:class_period, :open_student, :enterprise_name, :is_delete, :syllabus_id + attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state, :term, :password,:is_public,:description,:class_period, :open_student, :enterprise_name, :is_delete, :syllabus_id, :end_time, :end_term #belongs_to :project, :class_name => 'Course', :foreign_key => :extra, primary_key: :identifier belongs_to :teacher, :class_name => 'User', :foreign_key => :tea_id # 定义一个方法teacher,该方法通过tea_id来调用User表 belongs_to :school, :class_name => 'School', :foreign_key => :school_id #定义一个方法school,该方法通过school_id来调用School表 @@ -96,7 +96,9 @@ class Course < ActiveRecord::Base 'class_period', 'open_student', 'is_delete', - 'syllabus_id' + 'syllabus_id', + 'end_time', + 'end_term' acts_as_customizable diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index 9a52fb410..853a43eca 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -35,5 +35,5 @@ <% end %> <% else %> - <%= render :partial => "layouts/no_content" %> + <%#= render :partial => "layouts/no_content" %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 9fe25ce95..7721eeb0d 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -158,6 +158,8 @@ function cookieget(n) }) +<% forum = Forum.where(:id => 1).first %> +<% unless forum.nil? %>
@@ -189,4 +191,5 @@ function cookieget(n)
+<% end %> diff --git a/app/views/layouts/_base_footer_public.html.erb b/app/views/layouts/_base_footer_public.html.erb index 18152c745..043c254e2 100644 --- a/app/views/layouts/_base_footer_public.html.erb +++ b/app/views/layouts/_base_footer_public.html.erb @@ -4,7 +4,10 @@
  • <%= l(:label_about_us)%>|
  • <%= l(:label_contact_us)%>|
  • <%= l(:label_recruitment_information)%>|
  • + <% memo = Memo.where(:id => 1168).first %> + <% unless memo.nil? %>
  • <%= link_to l(:label_surpport_group), "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|
  • + <% end %>
  • <%= l(:label_forums)%>|
  • <%= l(:label_language)%>