This commit is contained in:
yanxd 2014-03-07 20:34:17 +08:00
parent ce1e6c49f1
commit e7841cb512
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
module WelcomeHelper
include CoursesHelper
include ProjectsHelper
def find_new_course limit=15
Project.visible.joins(:course_extra).where("#{Project.table_name}.project_type = ? ", 1).order("courses.time DESC, #{Project.table_name}.created_on DESC").limit(limit).all

View File

@ -125,7 +125,7 @@
<span style="cursor: pointer; display: inline-block; float: right; color: #ec6300; white-space: nowrap;">学生人数:<%= link_to "#{studentCount(project)}", project_member_path(project, :role => 2) ,:course =>'1', :target => "_blank" %></span>
<div id='join_in_course' style='margin: 0px 4px;display:inline-block;float:right;color:#ff4800;'>
<%if User.current.logged? %>
<%if User.current.logged? && !(course_timeout? project)%>
<%= join_in_course(project, User.current) unless project.course_extra.teacher.id == User.current.id %>
<% end %>
</div>